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

pc-ble-driver example heart_rate_collector get disconnected with error 0x22

Hi,

I am running on pc-ble-driver master branch.

https://github.com/NordicSemiconductor/pc-ble-driver

Currently I am using abce7974fe983c23930d362b1769e51c8fa13cbf.

I am trying to verifying the newly added connectivity firmware for nRF52840 Dongle PCA10059.

So I compiled and loaded hex/sd_api_v6/connectivity_<ver>_usb_with_s140_6.1.0.hex

I am now getting error 0x22 which is BLE_HCI_STATUS_CODE_LMP_RESPONSE_TIMEOUT, once I connect to a Nordic_HRM peripheral. Peripheral is built with nRF5_SDK_15.2.0_9412b96 and run on PCA10040.

My host is Ubuntu 18.04.

I am doing this because the release note 4.0.0 says:"Support SoftDevice API version 2, 3, 5 and 6 in the same release". And I am aware that PCA10059 works fine with https://github.com/NordicSemiconductor/pc-ble-driver/blob/release/v2.3.2/hex/sd_api_v3/connectivity_1.2.3_usb_with_s132_3.1.hex

Beside this problem, I also found that hex/sd_api_v6/connectivity_<ver>_1m_with_s132_6.1.0.hex does not work anymore on PCA10040. Does not know when this has started.

Thanks & best regards,

Chencheng

Parents
  • Hello,

    Regarding your main issue with the nRF52840 dongle:

    I believe that this is still related to the unhandled event with ID 35, which would be a BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST. I have replicated this on both the connectivity_4.0.0_usb_for_s140_6.1.0.hex and the connectivity_4.0.0_1m_with_s132_6.1.0.hex serialization backends, so it doesn't seem to be related to usb + s140, but rather the application. 

    I have forwarded this to our pc-ble-driver team. I will keep you updated with their response. Thank you for reporting this.

     

    Beside this problem, I also found that hex/sd_api_v6/connectivity_<ver>_1m_with_s132_6.1.0.hex does not work anymore on PCA10040. Does not know when this has started.

    Do you refer to the same issue with this .hex file? 

    Best regards,

    Edvin 

  • I believe that this is still related to the unhandled event with ID 35, which would be a BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST. I have replicated this on both the connectivity_4.0.0_usb_for_s140_6.1.0.hex and the connectivity_4.0.0_1m_with_s132_6.1.0.hex serialization backends, so it doesn't seem to be related to usb + s140, but rather the application. 

    Just a quick update.

    I implemented according to this. But I get an error:

    BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST received: sd_ble_gap_data_length_update failed, err_code 19 NRF_ERROR_RESOURCES

    BR/Chencheng

  • Can you describe what you mean by connectivity_4.0.0_1m_with_s132_6.1.0.hex not working? Are you sure you are using the PCA10040 board? The nRF52832 DK?

    Are you sure you are using the ...4.0.0_1m_with_s132... and not the ...4.0.0_1m_for_s132... ?

  • Yes, I am sure PCA10040 nRF52832 DK not working with ..._with_s132_... for release 4.0.0.

    More debug error log:

    Serial port used: /dev/ttyACM2
    Baud rate used: 1000000
    Info: Successfully opened /dev/ttyACM2. Baud rate: 1000000. Flow control: none. Parity: none.
    
    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:        5 ->  [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:        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:     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:        7 ->  [02 7d ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC_RESP]
    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:     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:        9 ->  [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:       10 ->  [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:       11 ->  [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:       12 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:1 payload_length:0 data_integrity:0 err_code:0x0
    Log:       13 ->  [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:       14 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:2 payload_length:0 data_integrity:0 err_code:0x0
    Log:       15 ->  [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:       16 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:3 payload_length:0 data_integrity:0 err_code:0x0
    Log:       17 ->  [00 8a 01 00 01 01 00 00 00 00 00 a0 00 50 00 00 00 01 01 00 00 00 64 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:3 ack#:3 payload_length:7d data_integrity:1 header_checksum:40 err_code:0x0
    Log:       18 ->  [00 8a 01 00 01 01 00 00 00 00 00 a0 00 50 00 00 00 01 01 00 00 00 64 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:3 ack#:3 payload_length:7d data_integrity:1 header_checksum:40 err_code:0x0
    Log:       19 ->  [00 8a 01 00 01 01 00 00 00 00 00 a0 00 50 00 00 00 01 01 00 00 00 64 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:3 ack#:3 payload_length:7d data_integrity:1 header_checksum:40 err_code:0x0
    Log:       20 ->  [00 8a 01 00 01 01 00 00 00 00 00 a0 00 50 00 00 00 01 01 00 00 00 64 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:3 ack#:3 payload_length:7d data_integrity:1 header_checksum:40 err_code:0x0
    Log:       21 ->  [00 8a 01 00 01 01 00 00 00 00 00 a0 00 50 00 00 00 01 01 00 00 00 64 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:3 ack#:3 payload_length:7d data_integrity:1 header_checksum:40 err_code:0x0
    Log:       22 ->  [00 8a 01 00 01 01 00 00 00 00 00 a0 00 50 00 00 00 01 01 00 00 00 64 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:3 ack#:3 payload_length:7d data_integrity:1 header_checksum:40 err_code:0x0
    Status: 4, message: Error sending packet to target. Code: 0x802a
    Scan start failed with error code: 32773
    

  • Shall I open another ticket for PCA10040 issue?

  • what command did you write to get this message? What example are you running? Please post the command like this:

    heart_rate_collector_v6.exe COM7

    that you used to start the example.

    The example is running. It looks like you failed scan start with error code 32773 (=0x8005).

    As far as I can tell, this should not be possible. But let me know what example you are running.

    BR,

    Edvin

  • As I mentioned earlier, I run everything under Ubuntu 18.04. I follow the instruction to compile from source. I compiled connectivity firmware hex file as well. I flashed it using nrf-connect AppImage under Linux with latest updates.

    I am running heart_rate_colletcor_v6 by:

    $ ./heart_rate_collector_v6 /dev/ttyACM2 

Reply Children
  • connectivity_4.0.0_1m_with_s132_6.1.0.hex

    Just for fun, can you try to flash this image instead? The pc-ble-driver has some patches for the connectivity firmware, so depending on how you compiled it, these patches were might not included. Let me know if it still behaves the same.

    BR,

    Edvin

  • Tried flashed under Linux with nRF connect programmer. Didn't work:

    $ ./heart_rate_collector_v6 /dev/ttyACM2 
    Serial port used: /dev/ttyACM2
    Baud rate used: 1000000
    Info: Successfully opened /dev/ttyACM2. Baud rate: 1000000. Flow control: none. Parity: none.
    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:        3 ->  [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    Log:        4 ->  [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    Log:        5 ->  [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    Log:        6 ->  [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    Log:        7 ->  [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    Status: 0, message: No response from device. Tried to send packet 6 times.
    Log: State change: STATE_UNINITIALIZED -> STATE_NO_RESPONSE
    Failed to open nRF BLE Driver. Error code: 0x0D
    

  • Do you reset the nRF after programming it with the .hex file? Try to power cycle it before you run your project from the terminal. Any luck?

  • Then your application is doing something that it isn't allowed to. It would be nice if you can start a new ticket, yes, then someone will help you out.

    BR,

    Edvin

Related