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 Reply Children
  • I had the example running over the weekend, it had still not failed this morning. Which revisions are the Dongle and the DK, are they both v1.x.x?

  • Its written 1.0.0 on my dongle, for the DK, it was installed by nRF Connect, it reports "Connectivity firmware version: ble-connectivity 0.1.0+Aug-14-2018-15-12-51. SoftDevice API version: 3. Baud rate: 1000000."

    I'm having more difficulties to reproduce the problem those days. After a reboot, I see the freezing one or two times, then I can't reproduce them anymore. I'm wondering if Windows could give the process more priority at some point.

    By the way, could this be a driver issue? When I plug the dongle, it appears in device manager as "nRF Connect USB CDC ACM", pilot used is usbser.sys (from system32/DRIVERS), Microsoft version 10.0.16299.334 (WinBuild.160101.0800). Are you using the same?

  • I'm see the same info, but with driver version 10.0.17134.1. Could you check if you are able to update the driver?

  • Hello Jørgen,

    As you cannot reproduce the problem and as I can on many different computers here, I was wondering if there could be a problem with our Windows setup (like using wrong drivers, or having the antivirus, firewall mess things up or whatever).

    So I took a different computer, formatted the drive and did two tests:

    - Installed Windows 7 (Enterprise with SP1 x64)
    - Simply installed nrfconnectsetup260.exe (to get the good driver and have the dongle appear in Device Manager, it show up as "nRF Connect USB CDC ACM" driver info reports "1.0.1.0" "11/05/2018")
    - Installed vc_redist.x64_2015.exe as nrf-ble-driver uses VS2015 runtimes
    - Downloaded nrf-ble-driver-4.1.1-win_x86_64.zip from github
    - Unzipped it, ran heart_rate_collector_sd_api_v3.exe COM3
    - Pressed Enter, got ~15 notifications and nothing more: so I could reproduce the bug

    Again, formatted the drive and:

    - Installed Windows 10 (Enterprise version_1703)
    - Did not even installed nrfconnectsetup260.exe (as the dongle appears directly in Device Manager)
    - Installed vc_redist.x64_2015.exe as nrf-ble-driver uses VS2015 runtimes
    - Downloaded nrf-ble-driver-4.1.1-win_x86_64.zip from github
    - Unzipped it, ran heart_rate_collector_sd_api_v3.exe COM3
    - Pressed Enter, got ~15 notifications and nothing more: so I could reproduce the bug

    So there is definitely a problem with this driver and it does not come from my setup here.

    - Either your machine has something installed/configured that makes it work better than mine
    - Either I did not explain you correctly how to reproduce the issue

    Could you please test from a freshly installed Windows (following the steps above)?
    Also, can you confirm that when you start notifications with the device from nRF Connect, it sends you frame of data of 20bytes long. And can you also confirm that when you run heart_rate_collector_sd_api_v3.exe program you get lots of data during one second, not only one per second as the standard "Nordic_HRM" app behaves?

    Kind regards,

    Jean

Related