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
  • Hi,

    I suggest to set scan window = scan interval = BLE_GAP_SCAN_WINDOW_MIN. This should have the least effect on active links or other procedures you may have.

    Best regards,
    Kenneth

  • 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

Reply
  • 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

Children
Related