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

Device not advertising after few minutes when concurrent scan and advert procedure is ongoing on nrf52810 with SDK 14.2 and S132 v5.10 soft device

I have an application where in i need to scan for non connectable advertisements as well as advertise beacons on the device. I am using the Fanstel BT832A module which contains the nrf 52810 chipset on it.

To have both the broadcaster and the scanner role supported on the same device i had to work with the S132 soft device version v5.10 and SDK 14.2 which is tested for production version.

I have written an application which scans for a specific beacons as well as advertises a beacon regularly. The problem is the scanning always works but advertisement being sent is sporadic as well as the device goes into a mode where it would never send the advertisements at all. The broadcaster and scanner role works perfectly if they are tested individually but only when both roles are done simultaneously we get the above issue.

My query would be has anyone tested the concurrent roles on the nrf52810 with the S132 device? Also is there a way to workaround the issue.

The same program of both the roles running concurrently when compiled on the BT832 module which has the nrf52832 and the same SDK with the same soft device works well as expected. Hence i do not think that this is an issue with the application that has been written. 

One difference i can see between the modules that i am testing is that the BT832A module with nrf52810 works on internal clock where as the BT832 with nrf52832 has an external crystal. The sdk_config.h is updated with the required config setting for the same.

If anyone can suggest a solution or give an insight onto the issue faced it would be great.

Regards

Ashwin

Parents Reply Children
  • Hi Kenneth,

      Thanks for your suggestion. I had earlier used scan interval and scan window of 1 second but as per your suggestion changed its value to 2.5ms. After changing the i am able to get advertisements more consistently but even then after a period of 5+ odd minutes the advertisement from the device completely stops but the scan has been working without any interruptions at all. By the way i am advertising the beacons every 1 second and forever.

    Regards

    Ashwin

  • So you are using "m_adv_params.timeout     = 0;       // Never time out." I assume? 

    What about the scanning? You are only calling sd_ble_gap_scan_start() with .timeout  = 0 there also?

    You never get a timeout event?

  • Hi Kenneth,

         Yes, you are right i am using "never time out" in both the cases. One more point to note is once the underlying firmware goes into such a mode it never advertises again even if you restart the device with a power toggle nor re-flashing the same app again.

         The only way i can recover is to re-flash the soft device and then flash an application sending connectable advertisements then it starts to advertise again and i am able to run any application.

         I have also tried the below way of scheduling advertisements and scanning independently using a timer as mentioned in the below steps and this case ran in for few hours before it had the same above mentioned problem.

    Scan 5 seconds

    Stop Scan

    Advertise for 5 seconds

    Stop advertise

    Then again Scan 5 seconds 

    Regards

    Ashwin

  • Ashwin said:
    One more point to note is once the underlying firmware goes into such a mode it never advertises again even if you restart the device with a power toggle nor re-flashing the same app again.

    This does not make any sense no. Are you writing any data to flash? 

    You can readout the flash content by calling: nrfjprog --readcode dump.hex

    Do readout on a fresh working product and on a failing, compare the hex files to find the memory area that might have changed.

    I assume you have already checked out:
    http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/nrf52810_user_guide.html?cp=4_0_0_5_0 

    You may also consider updating to the latest nRF5 SDK and S132: 
    http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52/dita/nrf52/compatibility_matrix/nRF52810_ic_rev_sdk_sd_comp_matrix.html?cp=2_2_3_2 

    Best regards,
    Kenneth

  • Hi Kenneth,

       I am not writing any data onto the flash. The application is just a simple beacon example application in nordic SDK and i have added the scanner functionality to it. If you just keep the scan window and scan interval to 1 second and the beacon advertisement interval to 1 second it is very easy to reproduce the same. If you want me to send the application please let me know.

        I cant use the latest SDK because it does not support the production version of S132 softdevice for nrf52810 chipset and i have to use the S132 softdevice and not s112 as i need scanning and broadcasting in my application.

        The hex dump of the application built as well as the one downloaded differs. I am attaching the hex files as well as IAR ROM & RAM configuration file for your reference. 

    Regards

    Ashwin

    hex_files_with_config.zip

Related