This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

I don't get any BLE_GAP_AD_TYPE_COMPLETE_LOCAL_NAME or BLE_GAP_AD_TYPE_SHORT_LOCAL_NAME with pc-ble-driver (v5 and v6) and firmware (sd_api_v6 and sd_api_v5)

Hi,

I currently did many test with BLE our new devices, and i am stuck on this probleme since days.  The goal of those test are to have internal too for validation process, and production on PC, but will also influence the decision of the futur component we will use in our next devices. 

The scan sent me BLE_GAP_EVT_ADV_REPORT like in the sample "heart_rate_collector" but the data in p_ble_gap_evt->params.adv_report.data don't contain the name ( using : adv_report_parse with BLE_GAP_AD_TYPE_COMPLETE_LOCAL_NAME  or BLE_GAP_AD_TYPE_SHORT_LOCAL_NAME ) .

if i look directly in memory, i only get 4 data value :

  • BLE_GAP_AD_TYPE_16BIT_SERVICE_UUID_MORE_AVAILABLE
  • BLE_GAP_AD_TYPE_APPEARANCE
  • BLE_GAP_AD_TYPE_TX_POWER_LEVEL
  • BLE_GAP_AD_TYPE_128BIT_SERVICE_UUID_COMPLETE and it could be suffisent, but not ...  

If i do the same test with an ESP32 I get the same 4 value in the same order with 2 more : 

  • BLE_GAP_AD_TYPE_16BIT_SERVICE_UUID_MORE_AVAILABLE
  • BLE_GAP_AD_TYPE_APPEARANCE
  • BLE_GAP_AD_TYPE_TX_POWER_LEVEL
  • BLE_GAP_AD_TYPE_128BIT_SERVICE_UUID_COMPLETE
  • BLE_GAP_AD_TYPE_COMPLETE_LOCAL_NAME
  • BLE_GAP_AD_TYPE_MANUFACTURER_SPECIFIC_DATA

So with ESP32 (Bluedroid BLE stack) i got exactly what i was looking for and i did not find the way to do with your BT stack ...  did i forgot to do something or you have a bug somewhere ?  

Regards,

Nicolas PERRET. 

  • Hi,

    Is this data placed in the advertising packet, or in the scan response packet? If it is in the scan response packet, you need to enable active scanning to receive the packet. In the heart_rate_collector, active scanning is not enabled.

    Best regards,
    Jørgen

  • Hi, thanks for the response :) 

    So in confirm, I talk about the data received  in the case of BLE_GAP_EVT_ADV_REPORT so for the heart_rate_collector in on_adv_report(const ble_gap_evt_t * const p_ble_gap_evt) and in    p_ble_gap_evt->params.adv_report.data ! (i tried with the V5 and V6 of FW and SDK ). 

    So ok : I just did the test with the active scanning = 1 :

    • On V5 (sdk on pc and firmware) : look to work but not in the same message : I got 2 message by device, the first one with 

    BLE_GAP_AD_TYPE_16BIT_SERVICE_UUID_MORE_AVAILABLE

    BLE_GAP_AD_TYPE_APPEARANCE

    BLE_GAP_AD_TYPE_TX_POWER_LEVEL

    BLE_GAP_AD_TYPE_128BIT_SERVICE_UUID_COMPLETE

    and next with

    BLE_GAP_AD_TYPE_COMPLETE_LOCAL_NAME

    BLE_GAP_AD_TYPE_MANUFACTURER_SPECIFIC_DATA

    • On  V6 (sdk on pc and firmware) and with the TRACE level log and I got an error : 

    Log: State change: STATE_START -> STATE_RESET
    Log: 1 -> [N/A] type: RESERVED_5 reliable: no seq#:0 ack#:0 payload_length:0 data_integrity:0 err_code:0x0
    Status: 6, message: Target Reset performed
    Log: State change: STATE_RESET -> STATE_UNINITIALIZED
    Log: 2 -> [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    Log: 1/ 0 <- [02 7d ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC_RESP]
    Log: State change: STATE_UNINITIALIZED -> STATE_INITIALIZED
    Log: 3 -> [03 fc 11 ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:3 data_integrity:0 err_code:0x0 [CONFIG [ sliding-window-size:1 out-of-frame:0 data-integrity-check-type:1 version-number:0 ]]
    Log: 4 -> [03 fc 11 ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:3 data_integrity:0 err_code:0x0 [CONFIG [ sliding-window-size:1 out-of-frame:0 data-integrity-check-type:1 version-number:0 ]]
    Log: 2/ 0 <- [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    Log: 5 -> [02 7d ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC_RESP]
    Log: 6 -> [03 fc 11 ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:3 data_integrity:0 err_code:0x0 [CONFIG [ sliding-window-size:1 out-of-frame:0 data-integrity-check-type:1 version-number:0 ]]
    Log: 3/ 0 <- [03 fc 11 ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:3 data_integrity:0 err_code:0x0 [CONFIG [ sliding-window-size:1 out-of-frame:0 data-integrity-check-type:1 version-number:0 ]]
    Log: 7 -> [04 7b 11 ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:3 data_integrity:0 err_code:0x0 [CONFIG_RESP [ sliding-window-size:1 out-of-frame:0 data-integrity-check-type:1 version-number:0 ]]
    Log: 8 -> [03 fc 11 ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:3 data_integrity:0 err_code:0x0 [CONFIG [ sliding-window-size:1 out-of-frame:0 data-integrity-check-type:1 version-number:0 ]]
    Log: 4/ 0 <- [04 7b 11 ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:3 data_integrity:0 err_code:0x0 [CONFIG_RESP [ sliding-window-size:1 out-of-frame:0 data-integrity-check-type:1 version-number:0 ]]
    Log: State change: STATE_INITIALIZED -> STATE_ACTIVE
    Status: 7, message: Connection active
    Log: 9 -> [00 69 40 00 00 00 01 00 01 00 01 00 ] type: VENDOR_SPECIFIC reliable:yes seq#:0 ack#:0 payload_length:c data_integrity:1 header_checksum:72 err_code:0x0
    Log: 5/ 0 <- [N/A] type: ACK reliable: no seq#:0 ack#:1 payload_length:0 data_integrity:0 err_code:0x0
    Log: 6/ 0 <- [01 69 00 00 00 00 ] type: VENDOR_SPECIFIC reliable:yes seq#:0 ack#:1 payload_length:6 data_integrity:1 header_checksum:ca err_code:0x0
    Log: 10 -> [N/A] type: ACK reliable: no seq#:0 ack#:1 payload_length:0 data_integrity:0 err_code:0x0
    Log: 11 -> [00 69 23 00 00 00 01 01 96 00 ] type: VENDOR_SPECIFIC reliable:yes seq#:1 ack#:1 payload_length:a data_integrity:1 header_checksum:89 err_code:0x0
    Log: 7/ 0 <- [N/A] type: ACK reliable: no seq#:0 ack#:2 payload_length:0 data_integrity:0 err_code:0x0
    Log: 8/ 0 <- [01 69 00 00 00 00 ] type: VENDOR_SPECIFIC reliable:yes seq#:1 ack#:2 payload_length:6 data_integrity:1 header_checksum:c1 err_code:0x0
    Log: 12 -> [N/A] type: ACK reliable: no seq#:0 ack#:2 payload_length:0 data_integrity:0 err_code:0x0
    Log: 13 -> [00 60 ] type: VENDOR_SPECIFIC reliable:yes seq#:2 ack#:2 payload_length:2 data_integrity:1 header_checksum:0 err_code:0x0
    Log: 9/ 0 <- [N/A] type: ACK reliable: no seq#:0 ack#:3 payload_length:0 data_integrity:0 err_code:0x0
    Log: 10/ 0 <- [01 60 00 00 00 00 ] type: VENDOR_SPECIFIC reliable:yes seq#:2 ack#:3 payload_length:6 data_integrity:1 header_checksum:b8 err_code:0x0
    Log: 14 -> [N/A] type: ACK reliable: no seq#:0 ack#:3 payload_length:0 data_integrity:0 err_code:0x0
    Log: 15 -> [00 8a 01 04 01 01 00 00 00 00 00 a0 00 50 00 00 00 01 01 00 00 00 64 00 ] type: VENDOR_SPECIFIC reliable:yes seq#:3 ack#:3 payload_length:18 data_integrity:1 header_checksum:96 err_code:0x0
    Log: 11/ 0 <- [N/A] type: ACK reliable: no seq#:0 ack#:4 payload_length:0 data_integrity:0 err_code:0x0
    Log: 12/ 0 <- [01 8a 00 00 00 00 ] type: VENDOR_SPECIFIC reliable:yes seq#:3 ack#:4 payload_length:6 data_integrity:1 header_checksum:af err_code:0x0
    Log: 16 -> [N/A] type: ACK reliable: no seq#:0 ack#:4 payload_length:0 data_integrity:0 err_code:0x0
    Scan started
    Log: 17 -> [00 8a 01 04 01 01 00 00 00 00 00 a0 00 50 00 00 00 01 02 00 00 00 64 00 ] type: VENDOR_SPECIFIC reliable:yes seq#:4 ack#:4 payload_length:18 data_integrity:1 header_checksum:8d err_code:0x0
    Log: 13/ 0 <- [N/A] type: ACK reliable: no seq#:0 ack#:5 payload_length:0 data_integrity:0 err_code:0x0
    Log: 14/ 0 <- [01 8a 08 00 00 00 ] type: VENDOR_SPECIFIC reliable:yes seq#:4 ack#:5 payload_length:6 data_integrity:1 header_checksum:a6 err_code:0x0
    Log: 18 -> [N/A] type: ACK reliable: no seq#:0 ack#:5 payload_length:0 data_integrity:0 err_code:0x0
    Scan start failed with error code: 8
    Log: 15/ 0 <- [02 1d 00 ff ff 00 00 04 a5 69 15 da 29 7a fe 00 00 00 00 00 00 01 ff 7f cc 25 ff 00 00 00 00 00 00 1f 00 01 1e ff 06 00 01 09 20 06 62 f0 40 81 e1 7d ae 66 92 75 42 4b 71 6e cc 66 59 81 b0 d2 ae 3b ee 00 00 00 ] type: VENDOR_SPECIFIC reliable:yes seq#:5 ack#:5 payload_length:46 data_integrity:1 header_checksum:a1 err_code:0x0
    Log: 19 -> [N/A] type: ACK reliable: no seq#:0 ack#:6 payload_length:0 data_integrity:0 err_code:0x0
    Error: Failed to decode event, error code is 14/0xe.
    Status: 3, message: Failed to decode event, error code is 14/0xe.

    but ok as it look to work with the V5 i will use the V5 for now ! 

    Thanks

    Best regards,

    Nicolas

     

  • Hi,

    no comment ? i did something wrong of the v6 or you have something wrong somewhere ? 

    Regards, 

  • It looks like you get an error when starting the scan: "Scan start failed with error code: 8".

    Error code 8 means NRF_ERROR_INVALID_STATE. If this was from sd_ble_gap_scan_start(), this is the possible causes according to the documentation:

    NRF_ERROR_INVALID_STATE Invalid state to perform operation. Either:
    • Scanning is already ongoing and p_scan_params was not NULL
    • Scanning is not running and p_scan_params was NULL.
    • The scanner has timed out when this function is called to continue scanning.
Related