This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/CC2652R: HostTest bluetooth connection problem

Part Number: CC2652R

Tool/software: Code Composer Studio

good day to all.

I'm using Btool to check how the host test works and try to add services in run time(it is required in my application), so I add  -DGATT_DB_OFF_CHIP in file build_config.opt.

I did the following in Btool:

  1. HCIExt_ResetSystemCmd ( chipReset)
  2. GAP_DeviceInit                  ( role - peripheral)
  3. GapAdv_create
  4. GapAdv_enable

Next i trying to connect from android App ( it is NRF connect:  https://play.google.com/store/apps/details?id=no.nordicsemi.android.mcp&hl=ru) and it is fail at the stage of discovering services.

If i don't include -DGATT_DB_OFF_CHIP in file build_config.opt connection works fine, but I lose possibility to add services from external MCU wich I will use after I will know ho it should be work with Btool.

P.S. sorry for my English :-)

upd: bTool log file

[1] : <Tx> - 03:40:32.465
-Type           : 0x01 (Command)
-OpCode         : 0xFC1D (HCIExt_ResetSystemCmd)
-Data Length    : 0x01 (1) byte(s)
 Type           : 0x00 (0) (Chip Reset)
Dump(Tx):
0000:01 1D FC 01 00                                  .....
--------------------------------------------------------------------
[2] : <Rx> - 03:40:32.488
-Type           : 0x04 (Event)
-EventCode      : 0x00FF (HCI_LE_ExtEvent)
-Data Length    : 0x05 (5) bytes(s)
 Event          : 0x041D (1053) (HCIExt_ResetSystemCmdDone)
 Status         : 0x00 (0) (SUCCESS)
 CmdOpCode      : 0xFC1D (HCIExt_ResetSystemCmd)
Dump(Rx):
0000:04 FF 05 1D 04 00 1D FC                         ........
--------------------------------------------------------------------
[3] : <Tx> - 03:40:37.329
-Type           : 0x01 (Command)
-OpCode         : 0xFE00 (GAP_DeviceInit)
-Data Length    : 0x08 (8) byte(s)
 ProfileRole    : 0x04 (4) (
                  Peripheral)
 AddrMode       : 0x00 (0) (ADDRMODE_PUBLIC)
 RandomAddr     : 00:00:00:00:00:00
Dump(Tx):
0000:01 00 FE 08 04 00 00 00 00 00 00 00             ............
--------------------------------------------------------------------
[4] : <Rx> - 03:40:37.352
-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         : 0xFE00 (GAP_DeviceInit)
 DataLength     : 0x00 (0)
Dump(Rx):
0000:04 FF 06 7F 06 00 00 FE 00                      .........
--------------------------------------------------------------------
[5] : <Rx> - 03:40:37.363
-Type           : 0x04 (Event)
-EventCode      : 0x00FF (HCI_LE_ExtEvent)
-Data Length    : 0x2C (44) bytes(s)
 Event          : 0x0600 (1536) (GAP_DeviceInitDone)
 Status         : 0x00 (0) (SUCCESS)
 DevAddr        : 80:6F:B0:1E:35:CA
 DataPktLen     : 0x0205 (517)
 NumDataPkts    : 0x05 (5)
 IRK            : 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
 CSRK           : 60:80:EC:29:62:BD:C2:46:94:AD:4F:FB:1B:D1:B5:02
Dump(Rx):
0000:04 FF 2C 00 06 00 CA 35 1E B0 6F 80 05 02 05 00 ..,....5..o.....
0010:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60 ...............`
0020:80 EC 29 62 BD C2 46 94 AD 4F FB 1B D1 B5 02    ..)b..F..O.....
--------------------------------------------------------------------
[6] : <Tx> - 03:40:44.177
-Type           : 0x01 (Command)
-OpCode         : 0xFE3E (GapAdv_create)
-Data Length    : 0x15 (21) byte(s)
 Properties     : 0x0013 (19) (
                  GAP_ADV_PROP_CONNECTABLE
                  GAP_ADV_PROP_SCANNABLE
                  GAP_ADV_PROP_LEGACY)
 IntervalMin    : 0x000032 (50)
 IntervalMax    : 0x0000A0 (160)
 PrimaryChMap   : 0x07 (7) (
                  GAP_ADV_CHAN_37
                  GAP_ADV_CHAN_38
                  GAP_ADV_CHAN_39)
 PeerAddrType   : 0x00 (0) (PEER_ADDRTYPE_PUBLIC_OR_PUBLIC_ID)
 PeerAddress    : 00:00:00:00:00:00
 FilterPolicy   : 0x00 (0) (
                  AdvFilterPolicy Bit Mask Is Not Set)
 TxPower        : 0x7F (127)
 PrimaryPHY     : 0x01 (1) (GAP_ADV_PRIM_PHY_1_MBPS)
 SecondaryPHY   : 0x01 (1) (GAP_ADV_SEC_PHY_1_MBPS)
 SID            : 0x00 (0)
Dump(Tx):
0000:01 3E FE 15 13 00 32 00 00 A0 00 00 07 00 00 00 .>....2.........
0010:00 00 00 00 00 7F 01 01 00                      .........
--------------------------------------------------------------------
[7] : <Rx> - 03:40:44.216
-Type           : 0x04 (Event)
-EventCode      : 0x00FF (HCI_LE_ExtEvent)
-Data Length    : 0x07 (7) bytes(s)
 Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
 Status         : 0x00 (0) (SUCCESS)
 OpCode         : 0xFE3E (GapAdv_create)
 DataLength     : 0x01 (1)
 Handle         : 0x00 (0)
Dump(Rx):
0000:04 FF 07 7F 06 00 3E FE 01 00                   ......>...
--------------------------------------------------------------------
[8] : <Tx> - 03:40:47.826
-Type           : 0x01 (Command)
-OpCode         : 0xFE3F (GapAdv_enable)
-Data Length    : 0x04 (4) byte(s)
 Handle         : 0x00 (0)
 EnableOptions  : 0x00 (0) (GAP_ADV_ENABLE_OPTIONS_USE_MAX)
 DurationMaxEvnt: 0x0000 (0)
Dump(Tx):
0000:01 3F FE 04 00 00 00 00                         .?......
--------------------------------------------------------------------
[9] : <Rx> - 03:40:47.849
-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         : 0xFE3F (GapAdv_enable)
 DataLength     : 0x00 (0)
Dump(Rx):
0000:04 FF 06 7F 06 00 3F FE 00                      ......?..
--------------------------------------------------------------------
[10] : <Rx> - 03:41:09.770
-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        : 6D:8D:F4:C7:0F:74
 ConnHandle     : 0x0000 (0)
 ConnRole       : 0x04 (4) (
                  Peripheral)
 ConnInterval   : 0x0027 (39)
 ConnLatency    : 0x0000 (0)
 ConnTimeout    : 0x01F4 (500)
 ClockAccuracy  : 0x01 (1)
Dump(Rx):
0000:04 FF 14 05 06 00 01 74 0F C7 F4 8D 6D 00 00 04 .......t....m...
0010:27 00 00 00 F4 01 01                            '......
--------------------------------------------------------------------
[11] : <Tx> - 03:41:09.770
-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.
--------------------------------------------------------------------
[12] : <Info> - 03:41:09.821
Device Connected
Handle = 0x0000
Addr Type = 0x01 (ADDRTYPE_RANDOM)
BDAddr = 6D:8D:F4:C7:0F:74
--------------------------------------------------------------------
[13] : <Rx> - 03:41:09.814
-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                      ...." ...
--------------------------------------------------------------------
[14] : <Rx> - 03:41:09.880
-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       : 0x00000000000059FD (23037) (
                  Encryption
                  Reject_Extended_Indication
                  Slave_Features_Exchange
                  Ping
                  Data_Packet_Length_Extension
                  Privacy
                  Extended_Scanner_Filter_Policies
                  PHY_2M
                  Coded_PHY
                  Extended_Advertising
                  Channel_Selection_Algorithm_2)
Dump(Rx):
0000:04 3E 0C 04 00 00 00 FD 59 00 00 00 00 00 00    .>......Y......
--------------------------------------------------------------------
[15] : <Rx> - 03:41:09.990
-Type           : 0x04 (Event)
-EventCode      : 0x00FF (HCI_LE_ExtEvent)
-Data Length    : 0x08 (8) bytes(s)
 Event          : 0x0502 (1282) (ATT_ExchangeMTUReq)
 Status         : 0x00 (0) (SUCCESS)
 ConnHandle     : 0x0000 (0)
 PduLen         : 0x02 (2)
 ClientRxMTU    : 0x0205 (517)
Dump(Rx):
0000:04 FF 08 02 05 00 00 00 02 05 02                ...........
--------------------------------------------------------------------
[16] : <Rx> - 03:41:10.231
-Type           : 0x04 (Event)
-EventCode      : 0x00FF (HCI_LE_ExtEvent)
-Data Length    : 0x0B (11) bytes(s)
 Event          : 0x0607 (1543) (GAP_LinkParamUpdate)
 Status         : 0x00 (0) (SUCCESS)
 ConnHandle     : 0x0000 (0)
 ConnInterval   : 0x0006 (6)
 ConnLatency    : 0x0000 (0)
 ConnTimeout    : 0x01F4 (500)
Dump(Rx):
0000:04 FF 0B 07 06 00 00 00 06 00 00 00 F4 01       ..............
--------------------------------------------------------------------
[17] : <Rx> - 03:41:10.329
-Type           : 0x04 (Event)
-EventCode      : 0x00FF (HCI_LE_ExtEvent)
-Data Length    : 0x0B (11) bytes(s)
 Event          : 0x0607 (1543) (GAP_LinkParamUpdate)
 Status         : 0x00 (0) (SUCCESS)
 ConnHandle     : 0x0000 (0)
 ConnInterval   : 0x0027 (39)
 ConnLatency    : 0x0000 (0)
 ConnTimeout    : 0x01F4 (500)
Dump(Rx):
0000:04 FF 0B 07 06 00 00 00 27 00 00 00 F4 01       ........'.....
--------------------------------------------------------------------
[18] : <Error> - 03:41:21.422
Could Not Convert Some Of The Data In The Following Message
(A Specific Message Handler Is Needed To Process The Data)
--------------------------------------------------------------------
[19] : <Warning> - 03:41:21.427
The Last 8 Byte(s) In The Following Message Were Not Decoded
(Message Has More Than The Expected Number Of Data Bytes)
--------------------------------------------------------------------
[20] : <Rx> - 03:41:21.422
-Type           : 0x04 (Event)
-EventCode      : 0x003E (HCI_LE_GenericReportEvent)
-Data Length    : 0x09 (9) bytes(s)
 LE Event Code  : 0x82 (130) (Unknown LeEvtCode #130)
 LE Event Code  : 0x82 (130) (Unknown LeEvtCode #130)
 Raw            : 82 00 00 0D 00 FE FF FF 01 
Dump(Rx):
0000:04 3E 09 82 00 00 0D 00 FE FF FF 01             .>..........
--------------------------------------------------------------------
[21] : <Error> - 03:41:22.441
Could Not Convert Some Of The Data In The Following Message
(A Specific Message Handler Is Needed To Process The Data)
--------------------------------------------------------------------
[22] : <Warning> - 03:41:22.446
The Last 8 Byte(s) In The Following Message Were Not Decoded
(Message Has More Than The Expected Number Of Data Bytes)
--------------------------------------------------------------------
[23] : <Rx> - 03:41:22.441
-Type           : 0x04 (Event)
-EventCode      : 0x003E (HCI_LE_GenericReportEvent)
-Data Length    : 0x09 (9) bytes(s)
 LE Event Code  : 0x82 (130) (Unknown LeEvtCode #130)
 LE Event Code  : 0x82 (130) (Unknown LeEvtCode #130)
 Raw            : 82 00 00 1F 00 FF FF FF 01 
Dump(Rx):
0000:04 3E 09 82 00 00 1F 00 FF FF FF 01             .>..........
--------------------------------------------------------------------
[24] : <Error> - 03:41:23.409
Could Not Convert Some Of The Data In The Following Message
(A Specific Message Handler Is Needed To Process The Data)
--------------------------------------------------------------------
[25] : <Warning> - 03:41:23.414
The Last 8 Byte(s) In The Following Message Were Not Decoded
(Message Has More Than The Expected Number Of Data Bytes)
--------------------------------------------------------------------
[26] : <Rx> - 03:41:23.409
-Type           : 0x04 (Event)
-EventCode      : 0x003E (HCI_LE_GenericReportEvent)
-Data Length    : 0x09 (9) bytes(s)
 LE Event Code  : 0x82 (130) (Unknown LeEvtCode #130)
 LE Event Code  : 0x82 (130) (Unknown LeEvtCode #130)
 Raw            : 82 00 00 02 FF FF FF FF 01 
Dump(Rx):
0000:04 3E 09 82 00 00 02 FF FF FF FF 01             .>..........
--------------------------------------------------------------------
[27] : <Info> - 03:41:39.986
Device Disconnected
Handle = 0x0000
Addr Type = 0x01 (ADDRTYPE_RANDOM)
BDAddr = 6D:8D:F4:C7:0F:74
--------------------------------------------------------------------
[28] : <Rx> - 03:41:39.986
-Type           : 0x04 (Event)
-EventCode      : 0x00FF (HCI_LE_ExtEvent)
-Data Length    : 0x06 (6) bytes(s)
 Event          : 0x0606 (1542) (GAP_TerminateLink)
 Status         : 0x00 (0) (SUCCESS)
 ConnHandle     : 0x0000 (0)
 Reason         : 0x13 (19) (PEER_REQUESTED_TERM)
Dump(Rx):
0000:04 FF 06 06 06 00 00 00 13                      .........
--------------------------------------------------------------------