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.

CC2650MODA: Privacy 1.2, SimplePeripheral and ble_sdk_2_02_02_25

Part Number: CC2650MODA
Other Parts Discussed in Thread: BLE-STACK

Hello,

I am running SimplePeripheral in CC2650MODA and I believe I did the proper modifications as Developer Guide document for enabling Privacy 1.2

So far, this works OK:

  • I'm able to connect and bond with an Android phone (Moto E4 plus) using BLE scanner app
  • SimplePeripheral changes his BLE address every 5 minutes correctly.
  • I able to reconnect to SimplePeripheral with android phone after address changed.

However, if I reset or remove power from CC2650MODA and power up again, I am unable to reconnect.

Not sure what I am missing, isn't the following statements help to reconnect with the Android phone after reset?

uint8_t autoSyncWl = TRUE;

GAPBondMgr_SetParameter(GAPBOND_AUTO_SYNC_WL, sizeof(uint8_t), &autoSyncWl);

What other modifications do I need to do to SimplePeripheral in order to reconnect after reset?

Thanks in advance,

Gabohkiin

  • Hi Gabohkiin,

    Is the device advertising after reset?

  • Hi Joakim, thanks for you reply.

    Yes, SimplePeripheral is advertising after reset.

    I did same testing with other phones (Galaxy Note 9 and iPhone 7) and noticed a different behavior: after reset the phones can connect to simplepheripheral but they attempt to pair again, I see the pair request pop up dialog again requesting the pair code (# 000000), what I think is that:

    1. SimplePeripheral is not saving the bond information correctly to NVM.
    2. SimplePeripheral stops resolving address due above.

    Unable to determine what else do I need to enable to work correctly.

    Thanks,

  • Hi Gabohkiin,

    1. Can you post a sniffer log of the failed connection attempt?

    2. Can you try re-connecting without re-starting the device? In this case, do the devices use bonding information or re-do the pairing?

  • Hi Marie,

    Sorry, but I do not have a sniffer, therefore I can't provide a log.

    In regards of your question #2: Yes, I can reconnect successfully to device (SimplePeripheral) without restarting it. Even more, after address change of simplePeripheral, the android phone is able to resolve sucessfully (I assume vice versa: the device is able to resolve the phone address). Apparently the issue is when I power cycle the device (simplePeripheral).

    Thank you.

  • Hi Gabohkiin,

    If you have an extra CC26x2 or CC1352 launchPad you can use it as a sniffer ( see 

    )

    Can you use BTool and Host test to behave the same way as your simple peripheral, reproduce the issue and post the log from BTool?

    BTW what version of Android are you using?

  • Hi,

    Did you figure it out?

    I will close this thread due to inactivity.

  • Hi Marie,

    Very sorry, for my late answer. I still do not figure out, I will the test as you suggest using host test and BTool.

    The version of Android that I am using is 7.1.1

    Thanks,

  • [1] : <Tx> - 04:40:29.563
    -Type           : 0x01 (Command)
    -OpCode         : 0xFE06 (GAP_MakeDiscoverable)
    -Data Length    : 0x0A (10) byte(s)
     EventType      : 0x00 (0) (Connectable Undirect Advertisement)
     InitAddrType   : 0x00 (0) (Public)
     InitAddrs      : 00:00:00:00:00:00
     ChannelMap     : 0x07 (7) (Channel 37
                      Channel 38
                      Channel 39)
     FilterPolicy   : 0x00 (0) (Allow Scan Requests From Any, Allow
                      Connect Request From Any.)
    Dump(Tx):
    0000:01 06 FE 0A 00 00 00 00 00 00 00 00 07 00       ..............
    --------------------------------------------------------------------
    [2] : <Rx> - 04:40:29.578
    -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         : 0xFE06 (GAP_MakeDiscoverable)
     DataLength     : 0x00 (0)
    Dump(Rx):
    0000:04 FF 06 7F 06 00 06 FE 00                      .........
    --------------------------------------------------------------------
    [3] : <Rx> - 04:40:29.593
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x03 (3) bytes(s)
     Event          : 0x0603 (1539) (GAP_MakeDiscoverable)
     Status         : 0x00 (0) (Success)
    Dump(Rx):
    0000:04 FF 03 03 06 00                               ......
    --------------------------------------------------------------------
    [4] : <Info> - 04:40:35.040
    Device Connected
    Handle = 0x0000
    Addr Type = 0x01 (Static)
    BDAddr = 7C:BF:E0:4D:2E:90
    --------------------------------------------------------------------
    [5] : <Rx> - 04:40:35.036
    -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) (Random)
     DevAddr        : 7C:BF:E0:4D:2E:90
     ConnHandle     : 0x0000 (0)
     ConnRole       : 0x04 (4) (Peripheral)
     ConnInterval   : 0x0027 (39)
     ConnLatency    : 0x0000 (0)
     ConnTimeout    : 0x07D0 (2000)
     ClockAccuracy  : 0x05 (5)
    Dump(Rx):
    0000:04 FF 14 05 06 00 01 90 2E 4D E0 BF 7C 00 00 04 .........M..|...
    0010:27 00 00 00 D0 07 05                            '......
    --------------------------------------------------------------------
    [6] : <Error> - 04:40:35.409
    Could Not Convert Some Of The Data In The Following Message
    (A Specific Message Handler Is Needed To Process The Data)
    --------------------------------------------------------------------
    [7] : <Warning> - 04:40:35.413
    The Last 10 Bytes In The Following Message Were Not Decoded
    (Message Has More Than The Expected Number Of Data Bytes)
    --------------------------------------------------------------------
    [8] : <Rx> - 04:40:35.406
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x0D (13) bytes(s)
     Event          : 0x0612 (1554) (Unknown Op Code)
     Status         : 0x00 (0) (Success)
     Raw            : 00 00 00 06 00 06 00 00 00 D0 07
    Dump(Rx):
    0000:04 FF 0D 12 06 00 00 00 06 00 06 00 00 00 D0 07 ................
    --------------------------------------------------------------------
    [9] : <Warning> - 04:40:42.600
    The Last 11 Bytes In The Following Message Were Not Decoded
    (Message Has More Than The Expected Number Of Data Bytes)
    --------------------------------------------------------------------
    [10] : <Tx> - 04:40:42.596
    -Type           : 0x01 (Command)
    -OpCode         : 0xFE12 (Unknown Op Code)
    -Data Length    : 0x0B (11) byte(s)
     Raw            : 00 00 06 00 06 00 00 00 D0 07 01
    Dump(Tx):
    0000:01 12 FE 0B 00 00 06 00 06 00 00 00 D0 07 01    ...............
    --------------------------------------------------------------------
    [11] : <Error> - 04:40:42.621
    Could Not Convert Some Of The Data In The Following Message
    (A Specific Message Handler Is Needed To Process The Data)
    --------------------------------------------------------------------
    [12] : <Rx> - 04:40:42.620
    -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         : 0xFE12 (Unknown Op Code)
     DataLength     : 0x00 (0)
     Raw            : 00 12 FE 00
    Dump(Rx):
    0000:04 FF 06 7F 06 00 12 FE 00                      .........
    --------------------------------------------------------------------
    [13] : <Rx> - 04:40:42.636
    -Type           : 0x04 (Event)
    -EventCode      : 0x000E (HCI_CommandCompleteEvent)
    -Data Length    : 0x06 (6) bytes(s)
     Packets        : 0x01 (1)
     OpCode         : 0x2020 (HCI_LERemoteConnectionParameterRequestReply)
     Status         : 0x12 (18) (Invalid HCI Command Parameters)
     Handle         : 0x0000 (0)
    Dump(Rx):
    0000:04 0E 06 01 20 20 12 00 00                      ....  ...
    --------------------------------------------------------------------
    [14] : <Rx> - 04:40:43.191
    -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    : 0x07D0 (2000)
    Dump(Rx):
    0000:04 FF 0B 07 06 00 00 00 06 00 00 00 D0 07       ..............
    --------------------------------------------------------------------
    [15] : <Error> - 04:40:43.254
    Could Not Convert Some Of The Data In The Following Message
    (A Specific Message Handler Is Needed To Process The Data)
    --------------------------------------------------------------------
    [16] : <Warning> - 04:40:43.255
    The Last 10 Bytes In The Following Message Were Not Decoded
    (Message Has More Than The Expected Number Of Data Bytes)
    --------------------------------------------------------------------
    [17] : <Rx> - 04:40:43.253
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x0D (13) bytes(s)
     Event          : 0x0612 (1554) (Unknown Op Code)
     Status         : 0x00 (0) (Success)
     Raw            : 00 00 00 27 00 27 00 00 00 D0 07
    Dump(Rx):
    0000:04 FF 0D 12 06 00 00 00 27 00 27 00 00 00 D0 07 ........'.'.....
    --------------------------------------------------------------------
    [18] : <Warning> - 04:40:45.184
    The Last 11 Bytes In The Following Message Were Not Decoded
    (Message Has More Than The Expected Number Of Data Bytes)
    --------------------------------------------------------------------
    [19] : <Tx> - 04:40:45.180
    -Type           : 0x01 (Command)
    -OpCode         : 0xFE12 (Unknown Op Code)
    -Data Length    : 0x0B (11) byte(s)
     Raw            : 00 00 06 00 06 00 00 00 D0 07 01
    Dump(Tx):
    0000:01 12 FE 0B 00 00 06 00 06 00 00 00 D0 07 01    ...............
    --------------------------------------------------------------------
    [20] : <Error> - 04:40:45.224
    Could Not Convert Some Of The Data In The Following Message
    (A Specific Message Handler Is Needed To Process The Data)
    --------------------------------------------------------------------
    [21] : <Rx> - 04:40:45.223
    -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         : 0xFE12 (Unknown Op Code)
     DataLength     : 0x00 (0)
     Raw            : 00 12 FE 00
    Dump(Rx):
    0000:04 FF 06 7F 06 00 12 FE 00                      .........
    --------------------------------------------------------------------
    [22] : <Rx> - 04:40:45.239
    -Type           : 0x04 (Event)
    -EventCode      : 0x000E (HCI_CommandCompleteEvent)
    -Data Length    : 0x06 (6) bytes(s)
     Packets        : 0x01 (1)
     OpCode         : 0x2020 (HCI_LERemoteConnectionParameterRequestReply)
     Status         : 0x12 (18) (Invalid HCI Command Parameters)
     Handle         : 0x0000 (0)
    Dump(Rx):
    0000:04 0E 06 01 20 20 12 00 00                      ....  ...
    --------------------------------------------------------------------
    [23] : <Rx> - 04:40:45.300
    -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    : 0x07D0 (2000)
    Dump(Rx):
    0000:04 FF 0B 07 06 00 00 00 27 00 00 00 D0 07       ........'.....
    --------------------------------------------------------------------
    [24] : <Error> - 04:40:55.285
    Could Not Convert Some Of The Data In The Following Message
    (A Specific Message Handler Is Needed To Process The Data)
    --------------------------------------------------------------------
    [25] : <Warning> - 04:40:55.288
    The Last 10 Bytes In The Following Message Were Not Decoded
    (Message Has More Than The Expected Number Of Data Bytes)
    --------------------------------------------------------------------
    [26] : <Rx> - 04:40:55.284
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x0D (13) bytes(s)
     Event          : 0x0612 (1554) (Unknown Op Code)
     Status         : 0x00 (0) (Success)
     Raw            : 00 00 00 06 00 06 00 00 00 D0 07
    Dump(Rx):
    0000:04 FF 0D 12 06 00 00 00 06 00 06 00 00 00 D0 07 ................
    --------------------------------------------------------------------
    [27] : <Rx> - 04:40:55.346
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x0A (10) bytes(s)
     Event          : 0x060F (1551) (GAP_PairingRequested)
     Status         : 0x00 (0) (Success)
     ConnHandle     : 0x0000 (0)
     IOCap          : 0x04 (4) (KeyboardDisplay)
     OobDataFlag    : 0x00 (0) (Out-Of-Bounds (OOB) Data Is NOT Available)
     AuthReq        : 0x2D (45) (Bonding
                      Man In The Middle
                      Secure Connections)
     MaxEncKeySiz   : 0x10 (16)
     KeyDist        : 0x77 (119) (Slave Encryption Key
                      Slave Identification Key
                      Slave Signing
                      Master Encryption Key
                      Master Identification Key
                      Master Signing Key)
    Dump(Rx):
    0000:04 FF 0A 0F 06 00 00 00 04 00 2D 10 77          ..........-.w
    --------------------------------------------------------------------
    [28] : <Info> - 04:41:28.346
    Device Disconnected
    Handle = 0x0000
    Addr Type = 0x01 (Static)
    BDAddr = 7C:BF:E0:4D:2E:90
    --------------------------------------------------------------------
    [29] : <Rx> - 04:41:28.344
    -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)
    Dump(Rx):
    0000:04 FF 06 06 06 00 00 00 13                      .........
    --------------------------------------------------------------------

    I attempt to bond from my phone but unable to do so and the link has dropped. What do I need to answer to GAP_PairingRequested ?

    Thanks

  • Hi,

    It looks like there are a lot of events and commands BTool is not able to interpret. Are you using the BTool version buldled with the BLE-Stack? (Found in tools/btool.)

    To complete the pairing you should answer the GAP_PairingRequested event. Please open the Pairing/Bonding tab.

  • Hi,

    Did you figure out what's going on? I will close this thread due to inactivity.

  • Hello Marie,

    The project's application end up not using Privacy 1.2 after all.

    Thanks for the support!

    Best Regards,