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

nrf51-ble-driver_win_0.3.0 question

Hi!

I realize that the paint on this is still drying, but I'm wondering if anyone is seeing the following behavior?

I can run an program based on this API once. When I try to run it again, sd_ble_gap_scan_start() never returns. If I control-c the program, unplug the device and plug it back in, then the program runs -- once.

I've tried this with both a program that I have written and the S120 Multi-Link example. I've also tried a nRF51822 dongle (PCA10000) and a nRF51422 dongle (PCA10031).

The firmware I have loaded is

 s120_nrf51822_1.0.1_softdevice.hex

and

 connectivity_1M.hex

I have also tried connectivity_115k2.hex and changed the program code to match.

When using s120_nrf51_2.0.0_softdevice.hex I can't load either connectivity app since the newer software device appears to be bigger.

Any ideas?

Thanks!

Parents
  • First of all, thank you for the feedback. I have handed this over to our developers so and they are aware of the issue you are reporting with regard to only be able to run the application once.

    For now, the recommendation would be to ensure that sd_rpc_close() runs at closing and that you might also be able to reset the application by using nrfjprog->pinreset.

    We suspect that the issue you are seeing is due to data left in the Segger chips buffers. This should be possible to handle by using sd_rpc_close().

  • Hi.

    Finally could make nrfprog partially (see below) work. Ran nrfprog --ids first to get all serial number and the ran --pinreset for each one.

    But this does not fully fix the problem:

    Let's define a function that simply:

    • Opens the port
    • Plays with BTLE (start/stop device lookup for instance is enough)
    • Closes the port

    Now, create one program calling this function:

    • Run the program
    • Reset device using --pinreset
    • Run the program again. It works

    Now, create another program running this function, then doing the pinresets (system calls) and then calling the function again:

    • Run the program. First function run works, second fails. It reports Error: File: (null), Line: 0, Error code: 3 when sd_rpc_open() is invoked, and then sd_ble_gap_scan_start hangs for ever.

    So, looks like the s120_nrf51_ble_driver.dll library itslef remains in an unstable state. Only having it be loaded from a brand new process makes it work again.

Reply
  • Hi.

    Finally could make nrfprog partially (see below) work. Ran nrfprog --ids first to get all serial number and the ran --pinreset for each one.

    But this does not fully fix the problem:

    Let's define a function that simply:

    • Opens the port
    • Plays with BTLE (start/stop device lookup for instance is enough)
    • Closes the port

    Now, create one program calling this function:

    • Run the program
    • Reset device using --pinreset
    • Run the program again. It works

    Now, create another program running this function, then doing the pinresets (system calls) and then calling the function again:

    • Run the program. First function run works, second fails. It reports Error: File: (null), Line: 0, Error code: 3 when sd_rpc_open() is invoked, and then sd_ble_gap_scan_start hangs for ever.

    So, looks like the s120_nrf51_ble_driver.dll library itslef remains in an unstable state. Only having it be loaded from a brand new process makes it work again.

Children
No Data
Related