1 Reply Latest reply on Apr 2, 2016 6:44 AM by vikasv_56

    PRIVACY :LE Create Connection Command

      I am evaluating the CY5676A PRoC BLE 256KB Module in HCI mode. I am trying to create connection by using Private Addresses.


      I do before advertising with these parameters :


       @13:41:26.316 <+    13 msec> TED command
         raw = [0x01, 0x06, 0x20, 0x0F, 0xCC, 0x00, 0xCC, 0x00, 0x01, 0x02, 0x02, 0x80, 0x95, 0x19, 0x29, 0x49, 0x80, 0x07, 0x00]
         Opcode = 0x2006 (HCI_LE_SET_ADVERTISING_PARAMETERS)
         Parameter Total Length = 0xF
         Advertising_Interval_Min = 0xCC
         Advertising_Interval_Max = 0xCC
         Advertising_Type = 0x1 (ADV_DIRECT_IND)
         Own_Address_Type = 0x2 (Public Identity Address)
         Direct_Address_Type = 0x2 (Public Identity Address)
         Direct_Address = 0x804929199580
         Advertising_Channel_Map = 0x7 (ch 37|ch 38|ch 39)
         Advertising_Filter_Policy = 0x0 (Allow Scan Request from Any, Allow Connect Request from Any)
       @13:41:26.335 <+    19 msec> TED event
         raw = [0x04, 0x0E, 0x04, 0x01, 0x06, 0x20, 0x00]
         Event Code = 0xE (HCI_COMMAND_COMPLETE)
         Parameter Total Length = 0x4
         Num_HCI_Command_Packets = 0x1
         Command_Opcode = 0x2006 (HCI_LE_SET_ADVERTISING_PARAMETERS)
         Status = 0x0 (Success)  


      After i do the scan with these parameters :


       @13:41:26.392 <+    10 msec> DUT command
         raw = [0x01, 0x0B, 0x20, 0x07, 0x01, 0x10, 0x00, 0x10, 0x00, 0x02, 0x00]
         Opcode = 0x200B (HCI_LE_SET_SCAN_PARAMETERS)
         Parameter Total Length = 0x7
         LE_Scan_Type = 0x1 (Active scanning)
         LE_Scan_Interval = 0x10
         LE_Scan_Window = 0x10
         Own_Address_Type = 0x2 (Public Identity Address)
         Scanning_Filter_Policy = 0x0 (Accept all advertisement packets)


      but the connection complete is missing for this type of advertising?


       @13:41:26.463 <+     0 msec> DUT command
         raw = [0x01, 0x0D, 0x20, 0x19, 0x10, 0x00, 0x10, 0x00, 0x00, 0x02, 0x80, 0x95, 0x19, 0x29, 0x49, 0x80, 0x02, 0x64, 0x00, 0x64, 0x00, 0x00, 0x00, 0x80, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF]
         Opcode = 0x200D (HCI_LE_CREATE_CONNECTION)
         Parameter Total Length = 0x19
         LE_Scan_Interval = 0x10
         LE_Scan_Window = 0x10
         Initiator_Filter_Policy = 0x0 (White list is not used)
         Peer_Address_Type = 0x2 (Public Identity Address)
         Peer_Address = 0x804929199580
         Own_Address_Type = 0x2 (Public Identity Address)
         Conn_Interval_Min = 0x64
         Conn_Interval_Max = 0x64
         Conn_Latency = 0x0
         Supervision_Timeout = 0xC80
         Minimum_CE_Length = 0xFFFF
         Maximum_CE_Length = 0xFFFF
       @13:41:26.479 <+    16 msec> DUT event
         raw = [0x04, 0x0F, 0x04, 0x00, 0x01, 0x0D, 0x20]
         Event Code = 0xF (HCI_COMMAND_STATUS)
         Parameter Total Length = 0x4
         Status = 0x0 (Success)
         Num_HCI_Command_Packets = 0x1
         Command_Opcode = 0x200D (HCI_LE_CREATE_CONNECTION)
       @13:41:36.480 Marker
         Type = ERROR
         Text = HCI timeout waiting for event HCI_LE_META




      Is it possible to create connection with  privacy and advertising type is ADV_DIRECT_IND?

        • 1. Re: PRIVACY :LE Create Connection Command





          Check these things:




          1)As you are using resolvable private address with the local IRK, the address of the peripheral when advertising would be different


          to 0x804929199580. 


          2)On the central ise before initiating the connection request , first try to scan for the peripheral and see whether you can see any direct adv packet or not. If you are not getting there may be two issue


          a) as peripheral is doing HIGH DC direct advertisement it would stop advertisement after 1.024ms. So if we start scanning /initate connection request after 1.204ms it may see the adv packet/establish the connection. 


          So better start scanning first and then start direct adv to see the adv packet. in case if you don't see the adv packet , then give the address in the reverse order. i.e LSB first 


          it should definitely see the adv packet.




          3) IN the connection request, as you are providing the public address of the peripheral, it won't establish the connection unless the both the devices have bonded before or the central has the IRK that is used by the peripheral.