Hello,
I am really new in using BLE protocols and probably you can help me.. I try to create a L2CAP connection between 2 devices using Btool application. The CC2640 is flashed with host_test.
Steps:
1. I connect the devices (connection succesul)
2. Try to execute L2CAP_RegisterPSM() with different PSM values. It always fails with Status 0x01 (Failure) which is not described in functions return values in API Documentation
I copy here the send message and the response.
[21] : <Tx> - 12:21:18.675 -Type : 0x01 (Command) -OpCode : 0xFE62 (GapInit_connect) -Data Length : 0x0A (10) byte(s) PeerAddrType : 0x01 (1) (PEER_ADDRTYPE_RANDOM_OR_RANDOM_ID) PeerAddr : C2:DE:2E:9B:28:27 InitiatingPhy : 0x01 (1) ( INIT_PHY_1M) Timeout : 0x0000 (0) Dump(Tx): 0000:01 62 FE 0A 01 27 28 9B 2E DE C2 01 00 00 .b...'(....... -------------------------------------------------------------------- [22] : <Rx> - 12:21:18.713 -Type : 0x04 (Event) -EventCode : 0x00FF (HCI_LE_ExtEvent) -Data Length : 0x06 (6) bytes(s) Event : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus) Status : 0x00 (0) (SUCCESS) OpCode : 0xFE62 (GapInit_connect) DataLength : 0x00 (0) Dump(Rx): 0000:04 FF 06 7F 06 00 62 FE 00 ......b.. -------------------------------------------------------------------- [23] : <Rx> - 12:21:18.768 -Type : 0x04 (Event) -EventCode : 0x00FF (HCI_LE_ExtEvent) -Data Length : 0x14 (20) bytes(s) Event : 0x0605 (1541) (GAP_EstablishLink) Status : 0x00 (0) (SUCCESS) DevAddrType : 0x01 (1) (ADDRTYPE_RANDOM) DevAddr : C2:DE:2E:9B:28:27 ConnHandle : 0x0000 (0) ConnRole : 0x08 (8) ( Central) ConnInterval : 0x0050 (80) ConnLatency : 0x0000 (0) ConnTimeout : 0x07D0 (2000) ClockAccuracy : 0x00 (0) Dump(Rx): 0000:04 FF 14 05 06 00 01 27 28 9B 2E DE C2 00 00 08 .......'(....... 0010:50 00 00 00 D0 07 00 P...... -------------------------------------------------------------------- [24] : <Tx> - 12:21:18.769 -Type : 0x01 (Command) -OpCode : 0x2022 (HCI_LE_SetDataLength) -Data Length : 0x06 (6) byte(s) Handle : 0x0000 (0) TxOctets : 0x00FB (251) TxTime : 0x0848 (2120) Dump(Tx): 0000:01 22 20 06 00 00 FB 00 48 08 ." .....H. -------------------------------------------------------------------- [25] : <Info> - 12:21:18.851 Device Connected Handle = 0x0000 Addr Type = 0x01 (ADDRTYPE_RANDOM) BDAddr = C2:DE:2E:9B:28:27 -------------------------------------------------------------------- [26] : <Rx> - 12:21:18.822 -Type : 0x04 (Event) -EventCode : 0x000E (HCI_CommandCompleteEvent) -Data Length : 0x06 (6) bytes(s) Packets : 0x01 (1) OpCode : 0x2022 (HCI_LE_SetDataLength) Status : 0x00 (0) (SUCCESS) Handle : 0x0000 (0) Dump(Rx): 0000:04 0E 06 01 22 20 00 00 00 ...." ... -------------------------------------------------------------------- [27] : <Rx> - 12:21:19.053 -Type : 0x04 (Event) -EventCode : 0x003E (HCI_LE_GenericReportEvent) -Data Length : 0x0C (12) bytes(s) LE Event Code : 0x04 (4) (HCI_LE_ReadRemoteUsedFeaturesCompleteEvent) LE Event Code : 0x04 (4) (HCI_LE_ReadRemoteUsedFeaturesCompleteEvent) Status : 0x00 (0) (SUCCESS) ConnectionId : 0x0000 (0) Features : 0x00000000000041F5 (16885) ( Encryption Reject_Extended_Indication Ping Data_Packet_Length_Extension Privacy Extended_Scanner_Filter_Policies PHY_2M Channel_Selection_Algorithm_2) Dump(Rx): 0000:04 3E 0C 04 00 00 00 F5 41 00 00 00 00 00 00 .>......A...... -------------------------------------------------------------------- [28] : <Tx> - 12:21:42.989 -Type : 0x01 (Command) -OpCode : 0xFCF1 (L2CAP_RegisterPsm) -Data Length : 0x0A (10) byte(s) PSM : 0x1001 (4097) MTU : 0x0017 (23) InitialPeerCrs : 0x000A (10) PeerCrThreshld : 0x0001 (1) MaxNumChannels : 0x01 (1) SecurityVrfctn : 0x00 (0) (No) Dump(Tx): 0000:01 F1 FC 0A 01 10 17 00 0A 00 01 00 01 00 .............. -------------------------------------------------------------------- [29] : <Rx> - 12:21:43.038 -Type : 0x04 (Event) -EventCode : 0x00FF (HCI_LE_ExtEvent) -Data Length : 0x06 (6) bytes(s) Event : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus) Status : 0x01 (1) (FAILURE) OpCode : 0xFCF1 (L2CAP_RegisterPsm) DataLength : 0x00 (0) Dump(Rx): 0000:04 FF 06 7F 06 01 F1 FC 00 ......... --------------------------------------------------------------------