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

s140 pc-ble-driver 4.0.0 freezes when receiving too many data

I have a nRF52840-PCA10059 dongle.

I have a PCA10040 dev boeard on which I programmed the ble_app_hrs_freertos_pca10040_s132 example after I modified HEART_RATE_MEAS_INTERVAL and BATTERY_LEVEL_MEAS_INTERVAL variables (lines 100 and 95 of main.c) with value 10 (10ms for 100Hz).

If I connect this fast "Nordic_HRM" using nRF Connect (it programmed my dongle with API v3 SoftDevice, I can connect and get notifications from the device.

If I connect this fast "Nordic_HRM" using heart_rate_collector_v3 or heart_rate_collector_v6 example programs (compiled from https://github.com/NordicSemiconductor/pc-ble-driver/tree/v4.0.0), then I only get a few notifications and then the app freezes.

When it's frozen, using a debugger I can see that UartBoost::readHandler is not called anymore. If I press Enter (supposed to toggle notifications OFF), I see written

"Setting HRM CCCD"

I see:

UartBoost::readHandler receives: c0 10 0 0 f0 c0 c0 d6 6e 0 bc 1 9c 11 0 0 0 61 3e c0
SerializationTransport::readHandler receives: 1 9c 11 0 0 0

But "Received write response." never shows up. Looks like the soft device freezed and does not send my anything.

When using heart_rate_collector_v2 with a old nRF51 dongle, I observe no freezing.

When using heart_rate_collector_v3, I kept the SoftDevice programmed by "nRF Connect". Also tried with connectivity_4.0.0_usb_with_s132_3.1.0.hex, same behaviour observed.

When using heart_rate_collector_v6, I used connectivity_4.0.0_usb_with_s140_6.1.0.hex.

"Nordic HRM" unmodified device (low sampling rate) does not freeze.

Any ides what could cause this? What does nRF Connect make differently than heart_rate_collector sample?

Parents
  • Hi,

    Could you check which connection interval nRF Connect and the HR collector example is connected to the peripheral with? If you decrease the sample interval without lowering the connection interval, you might fill up the notification buffers, resulting in the device getting an error code and crashing. Can you also post the log output from the HR collector example that is output to the terminal when you run it?

    Best regards,
    Jørgen

  • Hello,

    Thank you for looking at my issue.

    Final connection intervals are:
    min_conn_interval= 6 units (7 ms)
    max_conn_interval= 6 units (7 ms)
    slave_latency= 0
    conn_sup_timeout= 400 units (4000 ms)

    Also, I see the following parameters are used when establishing the connection with the dongle:
    retransmission_interval=100
    respond_timeout=100

    Here is the HR collector output:

    Serial port used: COM9
    Baud rate used: 1000000
    Info: Successfully opened COM9. 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:     1/ 0 <-  [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    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:     2/ 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:     3/ 0 <-  [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    Log:        6 ->  [02 7d ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC_RESP]
    Log:        7 ->  [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:        8 ->  [00 60 01 00 00 00 01 01 01 00 17 00 00 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:0 ack#:0 payload_length:11 data_integrity:1 header_checksum:21 err_code:0x0
    Log:        9 ->  [00 60 01 00 00 00 01 01 01 00 17 00 00 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:0 ack#:0 payload_length:11 data_integrity:1 header_checksum:21 err_code:0x0
    Log:     5/ 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:       10 ->  [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:       11 ->  [00 60 01 00 00 00 01 01 01 00 17 00 00 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:0 ack#:0 payload_length:11 data_integrity:1 header_checksum:21 err_code:0x0
    Log:     6/ 0 <-  [N/A] type:                 ACK reliable: no seq#:0 ack#:1 payload_length:0 data_integrity:0 err_code:0x0
    Log:     7/ 0 <-  [01 60 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 68 01 00 00 00 01 02 03 03 ] type:     VENDOR_SPECIFIC reliable:yes seq#:1 ack#:1 payload_length:a data_integrity:1 header_checksum:89 err_code:0x0
    Log:     8/ 0 <-  [N/A] type:                 ACK reliable: no seq#:0 ack#:2 payload_length:0 data_integrity:0 err_code:0x0
    Log:     9/ 0 <-  [01 68 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 8a 01 00 a0 00 50 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:2 ack#:2 payload_length:a data_integrity:1 header_checksum:80 err_code:0x0
    Log:    10/ 0 <-  [N/A] type:                 ACK reliable: no seq#:0 ack#:3 payload_length:0 data_integrity:0 err_code:0x0
    Log:    11/ 0 <-  [01 8a 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
    Scan started
    Log:    12/ 0 <-  [02 1d 00 ff ff 02 3a 86 d8 94 5b f2 00 0a 00 01 20 48 13 ca 00 1b 01 03 19 41 03 02 01 06 07 03 0d 18 0f 18 0a 18 0b 09 4e 6f 72 64 69 63 5f 48 52 4d ] type:     VENDOR_SPECIFIC reliable:yes seq#:3 ack#:3 payload_length:32 data_integrity:1 header_checksum:f4 err_code:0x0
    Log:       17 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:4 payload_length:0 data_integrity:0 err_code:0x0
    Received advertisement report with device address: 0xF25B94D8863A
    Log:       18 ->  [00 8c 01 02 3a 86 d8 94 5b f2 01 00 a0 00 50 00 00 00 01 06 00 06 00 00 00 90 01 ] type:     VENDOR_SPECIFIC reliable:yes seq#:3 ack#:4 payload_length:1b data_integrity:1 header_checksum:5e err_code:0x0
    Log:    13/ 0 <-  [N/A] type:                 ACK reliable: no seq#:0 ack#:4 payload_length:0 data_integrity:0 err_code:0x0
    Log:    14/ 0 <-  [01 8c 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:4 ack#:4 payload_length:6 data_integrity:1 header_checksum:ae err_code:0x0
    Log:       19 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:5 payload_length:0 data_integrity:0 err_code:0x0
    Log:    15/ 0 <-  [02 10 00 00 00 02 3a 86 d8 94 5b f2 02 06 00 06 00 00 00 90 01 ] type:     VENDOR_SPECIFIC reliable:yes seq#:5 ack#:4 payload_length:15 data_integrity:1 header_checksum:bc err_code:0x0
    Log:       20 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:6 payload_length:0 data_integrity:0 err_code:0x0
    Connection established
    Final connection parameters
    min_conn_interval= 6 units (7 ms)
    max_conn_interval= 6 units (7 ms)
    slave_latency= 0
    conn_sup_timeout= 400 units (4000 ms)
    Discovering primary services
    Log:       21 ->  [00 94 00 00 01 00 01 0d 18 01 ] type:     VENDOR_SPECIFIC reliable:yes seq#:4 ack#:6 payload_length:a data_integrity:1 header_checksum:5e err_code:0x0
    Log:    16/ 0 <-  [N/A] type:                 ACK reliable: no seq#:0 ack#:5 payload_length:0 data_integrity:0 err_code:0x0
    Log:    17/ 0 <-  [01 94 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:6 ack#:5 payload_length:6 data_integrity:1 header_checksum:a4 err_code:0x0
    Log:       22 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:7 payload_length:0 data_integrity:0 err_code:0x0
    Log:    18/ 0 <-  [02 30 00 00 00 00 00 00 00 01 00 0d 18 01 0e 00 13 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:7 ack#:5 payload_length:12 data_integrity:1 header_checksum:e2 err_code:0x0
    Log:       23 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:0 payload_length:0 data_integrity:0 err_code:0x0
    Received service discovery response
    Discovered heart rate service. UUID: 0x180D, start handle: 0x000E, end handle: 0x0013
    Discovering characteristics
    Log:       24 ->  [00 96 00 00 01 0e 00 13 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:5 ack#:0 payload_length:9 data_integrity:1 header_checksum:9d err_code:0x0
    Log:    19/ 0 <-  [N/A] type:                 ACK reliable: no seq#:0 ack#:6 payload_length:0 data_integrity:0 err_code:0x0
    Log:    20/ 0 <-  [01 96 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:0 ack#:6 payload_length:6 data_integrity:1 header_checksum:a2 err_code:0x0
    Log:       25 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:1 payload_length:0 data_integrity:0 err_code:0x0
    Log:    21/ 0 <-  [02 32 00 00 00 00 00 00 00 02 00 37 2a 01 10 00 0f 00 10 00 38 2a 01 02 00 12 00 13 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:1 ack#:6 payload_length:1d data_integrity:1 header_checksum:30 err_code:0x0
    Log:       26 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:2 payload_length:0 data_integrity:0 err_code:0x0
    Received characteristic discovery response, characteristics count: 2
    Characteristic handle: 0x000F, UUID: 0x2A37
    Characteristic handle: 0x0012, UUID: 0x2A38
    Discovering characteristic's descriptors
    Log:       27 ->  [00 97 00 00 01 0f 00 13 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:6 ack#:2 payload_length:9 data_integrity:1 header_checksum:8c err_code:0x0
    Log:    22/ 0 <-  [N/A] type:                 ACK reliable: no seq#:0 ack#:7 payload_length:0 data_integrity:0 err_code:0x0
    Log:    23/ 0 <-  [01 97 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:2 ack#:7 payload_length:6 data_integrity:1 header_checksum:98 err_code:0x0
    Log:       28 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:3 payload_length:0 data_integrity:0 err_code:0x0
    Log:    24/ 0 <-  [02 33 00 00 00 00 00 00 00 05 00 0f 00 03 28 01 10 00 37 2a 01 11 00 02 29 01 12 00 03 28 01 13 00 38 2a 01 ] type:     VENDOR_SPECIFIC reliable:yes seq#:3 ack#:7 payload_length:24 data_integrity:1 header_checksum:b5 err_code:0x0
    Log:       29 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:4 payload_length:0 data_integrity:0 err_code:0x0
    Received descriptor discovery response, descriptor count: 5
    Descriptor handle: 0x000F, UUID: 0x2803
    Descriptor handle: 0x0010, UUID: 0x2A37
    Descriptor handle: 0x0011, UUID: 0x2902
    Press enter to toggle notifications on the HRM characteristic
    Descriptor handle: 0x0012, UUID: 0x2803
    Descriptor handle: 0x0013, UUID: 0x2A38
    Setting HRM CCCD
    Log:       30 ->  [00 9c 00 00 01 01 cc 11 00 00 00 02 00 01 01 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:7 ack#:4 payload_length:10 data_integrity:1 header_checksum:a err_code:0x0
    Log:    25/ 0 <-  [N/A] type:                 ACK reliable: no seq#:0 ack#:0 payload_length:0 data_integrity:0 err_code:0x0
    Log:    26/ 0 <-  [01 9c 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:4 ack#:0 payload_length:6 data_integrity:1 header_checksum:ce err_code:0x0
    Log:       31 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:5 payload_length:0 data_integrity:0 err_code:0x0
    Log:    27/ 0 <-  [02 38 00 00 00 00 00 00 00 11 00 01 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:5 ack#:0 payload_length:10 data_integrity:1 header_checksum:2c err_code:0x0
    Log:       32 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:6 payload_length:0 data_integrity:0 err_code:0x0
    Received write response.
    Log:    28/ 0 <-  [02 39 00 00 00 00 00 00 00 10 00 01 14 00 00 00 00 00 8c 56 00 20 7d b4 02 00 c8 61 00 20 fb 6b 02 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:6 ack#:0 payload_length:22 data_integrity:1 header_checksum:a err_code:0x0
    Log:       33 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:7 payload_length:0 data_integrity:0 err_code:0x0
    Log:    29/ 0 <-  [02 39 00 00 00 00 00 00 00 10 00 01 14 00 00 00 00 00 8c 56 00 20 7d b4 02 00 c8 61 00 20 fb 6b 02 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:7 ack#:0 payload_length:22 data_integrity:1 header_checksum:9 err_code:0x0
    Log:       34 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:0 payload_length:0 data_integrity:0 err_code:0x0
    Log:    30/ 0 <-  [02 39 00 00 00 00 00 00 00 10 00 01 14 00 00 00 00 00 8c 56 00 20 7d b4 02 00 c8 61 00 20 fb 6b 02 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:0 ack#:0 payload_length:22 data_integrity:1 header_checksum:10 err_code:0x0
    Log:       35 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:1 payload_length:0 data_integrity:0 err_code:0x0
    Log:    31/ 0 <-  [02 39 00 00 00 00 00 00 00 10 00 01 14 00 00 00 00 00 8c 56 00 20 7d b4 02 00 c8 61 00 20 fb 6b 02 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:1 ack#:0 payload_length:22 data_integrity:1 header_checksum:f err_code:0x0
    Log:       36 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:2 payload_length:0 data_integrity:0 err_code:0x0
    Log:    32/ 0 <-  [02 39 00 00 00 00 00 00 00 10 00 01 14 00 00 00 00 00 8c 56 00 20 7d b4 02 00 c8 61 00 20 fb 6b 02 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:2 ack#:0 payload_length:22 data_integrity:1 header_checksum:e err_code:0x0
    Log:       37 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:3 payload_length:0 data_integrity:0 err_code:0x0
    Log:    33/ 0 <-  [02 39 00 00 00 00 00 00 00 10 00 01 14 00 00 00 00 00 8c 56 00 20 7d b4 02 00 c8 61 00 20 fb 6b 02 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:3 ack#:0 payload_length:22 data_integrity:1 header_checksum:d err_code:0x0
    Log:       38 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:4 payload_length:0 data_integrity:0 err_code:0x0
    Log:    34/ 0 <-  [02 39 00 00 00 00 00 00 00 10 00 01 14 00 00 00 00 00 8c 56 00 20 7d b4 02 00 c8 61 00 20 fb 6b 02 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:4 ack#:0 payload_length:22 data_integrity:1 header_checksum:c err_code:0x0
    Log:       39 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:5 payload_length:0 data_integrity:0 err_code:0x0
    Log:    35/ 0 <-  [02 39 00 00 00 00 00 00 00 10 00 01 14 00 00 00 00 00 8c 56 00 20 7d b4 02 00 c8 61 00 20 fb 6b 02 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:5 ack#:0 payload_length:22 data_integrity:1 header_checksum:b err_code:0x0
    Log:       40 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:6 payload_length:0 data_integrity:0 err_code:0x0
    Log:    36/ 0 <-  [02 39 00 00 00 00 00 00 00 10 00 01 14 00 00 00 00 00 8c 56 00 20 77 b4 02 00 c8 61 00 20 fb 6b 02 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:6 ack#:0 payload_length:22 data_integrity:1 header_checksum:a err_code:0x0
    Log:       41 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:7 payload_length:0 data_integrity:0 err_code:0x0
    Log:    37/ 0 <-  [02 39 00 00 00 00 00 00 00 10 00 01 14 00 00 00 00 00 8c 56 00 20 77 b4 02 00 c8 61 00 20 fb 6b 02 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:7 ack#:0 payload_length:22 data_integrity:1 header_checksum:9 err_code:0x0
    Log:       42 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:0 payload_length:0 data_integrity:0 err_code:0x0
    Log:    38/ 0 <-  [02 39 00 00 00 00 00 00 00 10 00 01 14 00 00 00 00 00 8c 56 00 20 77 b4 02 00 c8 61 00 20 fb 6b 02 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:0 ack#:0 payload_length:22 data_integrity:1 header_checksum:10 err_code:0x0
    Log:       43 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:1 payload_length:0 data_integrity:0 err_code:0x0
    Log:    39/ 0 <-  [02 39 00 00 00 00 00 00 00 10 00 01 14 00 00 00 00 00 8c 56 00 20 77 b4 02 00 c8 61 00 20 fb 6b 02 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:1 ack#:0 payload_length:22 data_integrity:1 header_checksum:f err_code:0x0
    Log:       44 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:2 payload_length:0 data_integrity:0 err_code:0x0
    Log:    40/ 0 <-  [02 39 00 00 00 00 00 00 00 10 00 01 14 00 00 00 00 00 8c 56 00 20 77 b4 02 00 c8 61 00 20 fb 6b 02 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:2 ack#:0 payload_length:22 data_integrity:1 header_checksum:e err_code:0x0
    Log:       45 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:3 payload_length:0 data_integrity:0 err_code:0x0
    

    So far, I saw no significant difference with "nRF Connect - Bluetooth Low Energy app" log, except that "nRF Connect" sends [00 6d 01 ] (and receives [01 6d 00 00 00 00 02 df e4 9d ed bb dd ] as answer) after dongle port is opened. This is apparently reserved (BLE_RESERVED_SVC_BASE), dunno what it means and if it may explain the behavioural difference.

    I also noticed that the sample does more retries than "nRF Connect", like [03 fc 11 ] sent 3 times in a row at the beginning while I see "nRF Connect - Bluetooth Low Energy app" sends it once only. That's probably due to retransmission_interval being different but I have know way to know what "nRF Connect" uses.

    If it can help, here is "nRF Connect" log file: https://pastebin.com/s4sH3efp

    Jean

Reply
  • Hello,

    Thank you for looking at my issue.

    Final connection intervals are:
    min_conn_interval= 6 units (7 ms)
    max_conn_interval= 6 units (7 ms)
    slave_latency= 0
    conn_sup_timeout= 400 units (4000 ms)

    Also, I see the following parameters are used when establishing the connection with the dongle:
    retransmission_interval=100
    respond_timeout=100

    Here is the HR collector output:

    Serial port used: COM9
    Baud rate used: 1000000
    Info: Successfully opened COM9. 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:     1/ 0 <-  [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    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:     2/ 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:     3/ 0 <-  [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    Log:        6 ->  [02 7d ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC_RESP]
    Log:        7 ->  [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:        8 ->  [00 60 01 00 00 00 01 01 01 00 17 00 00 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:0 ack#:0 payload_length:11 data_integrity:1 header_checksum:21 err_code:0x0
    Log:        9 ->  [00 60 01 00 00 00 01 01 01 00 17 00 00 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:0 ack#:0 payload_length:11 data_integrity:1 header_checksum:21 err_code:0x0
    Log:     5/ 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:       10 ->  [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:       11 ->  [00 60 01 00 00 00 01 01 01 00 17 00 00 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:0 ack#:0 payload_length:11 data_integrity:1 header_checksum:21 err_code:0x0
    Log:     6/ 0 <-  [N/A] type:                 ACK reliable: no seq#:0 ack#:1 payload_length:0 data_integrity:0 err_code:0x0
    Log:     7/ 0 <-  [01 60 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 68 01 00 00 00 01 02 03 03 ] type:     VENDOR_SPECIFIC reliable:yes seq#:1 ack#:1 payload_length:a data_integrity:1 header_checksum:89 err_code:0x0
    Log:     8/ 0 <-  [N/A] type:                 ACK reliable: no seq#:0 ack#:2 payload_length:0 data_integrity:0 err_code:0x0
    Log:     9/ 0 <-  [01 68 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 8a 01 00 a0 00 50 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:2 ack#:2 payload_length:a data_integrity:1 header_checksum:80 err_code:0x0
    Log:    10/ 0 <-  [N/A] type:                 ACK reliable: no seq#:0 ack#:3 payload_length:0 data_integrity:0 err_code:0x0
    Log:    11/ 0 <-  [01 8a 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
    Scan started
    Log:    12/ 0 <-  [02 1d 00 ff ff 02 3a 86 d8 94 5b f2 00 0a 00 01 20 48 13 ca 00 1b 01 03 19 41 03 02 01 06 07 03 0d 18 0f 18 0a 18 0b 09 4e 6f 72 64 69 63 5f 48 52 4d ] type:     VENDOR_SPECIFIC reliable:yes seq#:3 ack#:3 payload_length:32 data_integrity:1 header_checksum:f4 err_code:0x0
    Log:       17 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:4 payload_length:0 data_integrity:0 err_code:0x0
    Received advertisement report with device address: 0xF25B94D8863A
    Log:       18 ->  [00 8c 01 02 3a 86 d8 94 5b f2 01 00 a0 00 50 00 00 00 01 06 00 06 00 00 00 90 01 ] type:     VENDOR_SPECIFIC reliable:yes seq#:3 ack#:4 payload_length:1b data_integrity:1 header_checksum:5e err_code:0x0
    Log:    13/ 0 <-  [N/A] type:                 ACK reliable: no seq#:0 ack#:4 payload_length:0 data_integrity:0 err_code:0x0
    Log:    14/ 0 <-  [01 8c 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:4 ack#:4 payload_length:6 data_integrity:1 header_checksum:ae err_code:0x0
    Log:       19 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:5 payload_length:0 data_integrity:0 err_code:0x0
    Log:    15/ 0 <-  [02 10 00 00 00 02 3a 86 d8 94 5b f2 02 06 00 06 00 00 00 90 01 ] type:     VENDOR_SPECIFIC reliable:yes seq#:5 ack#:4 payload_length:15 data_integrity:1 header_checksum:bc err_code:0x0
    Log:       20 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:6 payload_length:0 data_integrity:0 err_code:0x0
    Connection established
    Final connection parameters
    min_conn_interval= 6 units (7 ms)
    max_conn_interval= 6 units (7 ms)
    slave_latency= 0
    conn_sup_timeout= 400 units (4000 ms)
    Discovering primary services
    Log:       21 ->  [00 94 00 00 01 00 01 0d 18 01 ] type:     VENDOR_SPECIFIC reliable:yes seq#:4 ack#:6 payload_length:a data_integrity:1 header_checksum:5e err_code:0x0
    Log:    16/ 0 <-  [N/A] type:                 ACK reliable: no seq#:0 ack#:5 payload_length:0 data_integrity:0 err_code:0x0
    Log:    17/ 0 <-  [01 94 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:6 ack#:5 payload_length:6 data_integrity:1 header_checksum:a4 err_code:0x0
    Log:       22 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:7 payload_length:0 data_integrity:0 err_code:0x0
    Log:    18/ 0 <-  [02 30 00 00 00 00 00 00 00 01 00 0d 18 01 0e 00 13 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:7 ack#:5 payload_length:12 data_integrity:1 header_checksum:e2 err_code:0x0
    Log:       23 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:0 payload_length:0 data_integrity:0 err_code:0x0
    Received service discovery response
    Discovered heart rate service. UUID: 0x180D, start handle: 0x000E, end handle: 0x0013
    Discovering characteristics
    Log:       24 ->  [00 96 00 00 01 0e 00 13 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:5 ack#:0 payload_length:9 data_integrity:1 header_checksum:9d err_code:0x0
    Log:    19/ 0 <-  [N/A] type:                 ACK reliable: no seq#:0 ack#:6 payload_length:0 data_integrity:0 err_code:0x0
    Log:    20/ 0 <-  [01 96 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:0 ack#:6 payload_length:6 data_integrity:1 header_checksum:a2 err_code:0x0
    Log:       25 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:1 payload_length:0 data_integrity:0 err_code:0x0
    Log:    21/ 0 <-  [02 32 00 00 00 00 00 00 00 02 00 37 2a 01 10 00 0f 00 10 00 38 2a 01 02 00 12 00 13 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:1 ack#:6 payload_length:1d data_integrity:1 header_checksum:30 err_code:0x0
    Log:       26 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:2 payload_length:0 data_integrity:0 err_code:0x0
    Received characteristic discovery response, characteristics count: 2
    Characteristic handle: 0x000F, UUID: 0x2A37
    Characteristic handle: 0x0012, UUID: 0x2A38
    Discovering characteristic's descriptors
    Log:       27 ->  [00 97 00 00 01 0f 00 13 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:6 ack#:2 payload_length:9 data_integrity:1 header_checksum:8c err_code:0x0
    Log:    22/ 0 <-  [N/A] type:                 ACK reliable: no seq#:0 ack#:7 payload_length:0 data_integrity:0 err_code:0x0
    Log:    23/ 0 <-  [01 97 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:2 ack#:7 payload_length:6 data_integrity:1 header_checksum:98 err_code:0x0
    Log:       28 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:3 payload_length:0 data_integrity:0 err_code:0x0
    Log:    24/ 0 <-  [02 33 00 00 00 00 00 00 00 05 00 0f 00 03 28 01 10 00 37 2a 01 11 00 02 29 01 12 00 03 28 01 13 00 38 2a 01 ] type:     VENDOR_SPECIFIC reliable:yes seq#:3 ack#:7 payload_length:24 data_integrity:1 header_checksum:b5 err_code:0x0
    Log:       29 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:4 payload_length:0 data_integrity:0 err_code:0x0
    Received descriptor discovery response, descriptor count: 5
    Descriptor handle: 0x000F, UUID: 0x2803
    Descriptor handle: 0x0010, UUID: 0x2A37
    Descriptor handle: 0x0011, UUID: 0x2902
    Press enter to toggle notifications on the HRM characteristic
    Descriptor handle: 0x0012, UUID: 0x2803
    Descriptor handle: 0x0013, UUID: 0x2A38
    Setting HRM CCCD
    Log:       30 ->  [00 9c 00 00 01 01 cc 11 00 00 00 02 00 01 01 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:7 ack#:4 payload_length:10 data_integrity:1 header_checksum:a err_code:0x0
    Log:    25/ 0 <-  [N/A] type:                 ACK reliable: no seq#:0 ack#:0 payload_length:0 data_integrity:0 err_code:0x0
    Log:    26/ 0 <-  [01 9c 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:4 ack#:0 payload_length:6 data_integrity:1 header_checksum:ce err_code:0x0
    Log:       31 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:5 payload_length:0 data_integrity:0 err_code:0x0
    Log:    27/ 0 <-  [02 38 00 00 00 00 00 00 00 11 00 01 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:5 ack#:0 payload_length:10 data_integrity:1 header_checksum:2c err_code:0x0
    Log:       32 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:6 payload_length:0 data_integrity:0 err_code:0x0
    Received write response.
    Log:    28/ 0 <-  [02 39 00 00 00 00 00 00 00 10 00 01 14 00 00 00 00 00 8c 56 00 20 7d b4 02 00 c8 61 00 20 fb 6b 02 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:6 ack#:0 payload_length:22 data_integrity:1 header_checksum:a err_code:0x0
    Log:       33 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:7 payload_length:0 data_integrity:0 err_code:0x0
    Log:    29/ 0 <-  [02 39 00 00 00 00 00 00 00 10 00 01 14 00 00 00 00 00 8c 56 00 20 7d b4 02 00 c8 61 00 20 fb 6b 02 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:7 ack#:0 payload_length:22 data_integrity:1 header_checksum:9 err_code:0x0
    Log:       34 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:0 payload_length:0 data_integrity:0 err_code:0x0
    Log:    30/ 0 <-  [02 39 00 00 00 00 00 00 00 10 00 01 14 00 00 00 00 00 8c 56 00 20 7d b4 02 00 c8 61 00 20 fb 6b 02 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:0 ack#:0 payload_length:22 data_integrity:1 header_checksum:10 err_code:0x0
    Log:       35 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:1 payload_length:0 data_integrity:0 err_code:0x0
    Log:    31/ 0 <-  [02 39 00 00 00 00 00 00 00 10 00 01 14 00 00 00 00 00 8c 56 00 20 7d b4 02 00 c8 61 00 20 fb 6b 02 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:1 ack#:0 payload_length:22 data_integrity:1 header_checksum:f err_code:0x0
    Log:       36 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:2 payload_length:0 data_integrity:0 err_code:0x0
    Log:    32/ 0 <-  [02 39 00 00 00 00 00 00 00 10 00 01 14 00 00 00 00 00 8c 56 00 20 7d b4 02 00 c8 61 00 20 fb 6b 02 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:2 ack#:0 payload_length:22 data_integrity:1 header_checksum:e err_code:0x0
    Log:       37 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:3 payload_length:0 data_integrity:0 err_code:0x0
    Log:    33/ 0 <-  [02 39 00 00 00 00 00 00 00 10 00 01 14 00 00 00 00 00 8c 56 00 20 7d b4 02 00 c8 61 00 20 fb 6b 02 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:3 ack#:0 payload_length:22 data_integrity:1 header_checksum:d err_code:0x0
    Log:       38 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:4 payload_length:0 data_integrity:0 err_code:0x0
    Log:    34/ 0 <-  [02 39 00 00 00 00 00 00 00 10 00 01 14 00 00 00 00 00 8c 56 00 20 7d b4 02 00 c8 61 00 20 fb 6b 02 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:4 ack#:0 payload_length:22 data_integrity:1 header_checksum:c err_code:0x0
    Log:       39 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:5 payload_length:0 data_integrity:0 err_code:0x0
    Log:    35/ 0 <-  [02 39 00 00 00 00 00 00 00 10 00 01 14 00 00 00 00 00 8c 56 00 20 7d b4 02 00 c8 61 00 20 fb 6b 02 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:5 ack#:0 payload_length:22 data_integrity:1 header_checksum:b err_code:0x0
    Log:       40 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:6 payload_length:0 data_integrity:0 err_code:0x0
    Log:    36/ 0 <-  [02 39 00 00 00 00 00 00 00 10 00 01 14 00 00 00 00 00 8c 56 00 20 77 b4 02 00 c8 61 00 20 fb 6b 02 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:6 ack#:0 payload_length:22 data_integrity:1 header_checksum:a err_code:0x0
    Log:       41 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:7 payload_length:0 data_integrity:0 err_code:0x0
    Log:    37/ 0 <-  [02 39 00 00 00 00 00 00 00 10 00 01 14 00 00 00 00 00 8c 56 00 20 77 b4 02 00 c8 61 00 20 fb 6b 02 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:7 ack#:0 payload_length:22 data_integrity:1 header_checksum:9 err_code:0x0
    Log:       42 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:0 payload_length:0 data_integrity:0 err_code:0x0
    Log:    38/ 0 <-  [02 39 00 00 00 00 00 00 00 10 00 01 14 00 00 00 00 00 8c 56 00 20 77 b4 02 00 c8 61 00 20 fb 6b 02 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:0 ack#:0 payload_length:22 data_integrity:1 header_checksum:10 err_code:0x0
    Log:       43 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:1 payload_length:0 data_integrity:0 err_code:0x0
    Log:    39/ 0 <-  [02 39 00 00 00 00 00 00 00 10 00 01 14 00 00 00 00 00 8c 56 00 20 77 b4 02 00 c8 61 00 20 fb 6b 02 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:1 ack#:0 payload_length:22 data_integrity:1 header_checksum:f err_code:0x0
    Log:       44 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:2 payload_length:0 data_integrity:0 err_code:0x0
    Log:    40/ 0 <-  [02 39 00 00 00 00 00 00 00 10 00 01 14 00 00 00 00 00 8c 56 00 20 77 b4 02 00 c8 61 00 20 fb 6b 02 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:2 ack#:0 payload_length:22 data_integrity:1 header_checksum:e err_code:0x0
    Log:       45 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:3 payload_length:0 data_integrity:0 err_code:0x0
    

    So far, I saw no significant difference with "nRF Connect - Bluetooth Low Energy app" log, except that "nRF Connect" sends [00 6d 01 ] (and receives [01 6d 00 00 00 00 02 df e4 9d ed bb dd ] as answer) after dongle port is opened. This is apparently reserved (BLE_RESERVED_SVC_BASE), dunno what it means and if it may explain the behavioural difference.

    I also noticed that the sample does more retries than "nRF Connect", like [03 fc 11 ] sent 3 times in a row at the beginning while I see "nRF Connect - Bluetooth Low Energy app" sends it once only. That's probably due to retransmission_interval being different but I have know way to know what "nRF Connect" uses.

    If it can help, here is "nRF Connect" log file: https://pastebin.com/s4sH3efp

    Jean

Children
No Data
Related