Device stops BLE advertising after some time in the application code.

Hi,

I have one application that includes one basic BLE services such as one Custom service, ANCS, DFU and NUS.

I have a custom board with three i2c sensors, and one SPI peripheral device. Initially, my application code works fine. I can see all my peripherals working as expected with BLE advertisement and runs the data exchange if it is connected.

I have tested the board for almost 2-3 hours and after that my application code got stuck due to some issues in my application. Here, my device which was connected with nRF connect in Mobile app, gets disconnected. 

After that I restart the device, but I am unable to see the device advertisement in nRF connect for Mobile in both Android and IOS mobile phones.

After this I erased the board with using command : " nrfjprog --recover ". and then programmed the same application code. Everything is working as expected. But this time also I couldn't see my device advertising when I am checking with nRF connect mobile app. I have ensured that my device was not connected to any other device.

After that I erased the board and loaded the Nordic_blinky code from sample application in nRF5 SDK_17.1.0, but again the same error. Blinky application was running but I was not able to see the advertising name in the mobile app. I have checked all the error code with regards to BLE initilization and advertisment. The error code is always NRF_SUCCESS but still unable to see the advertising name in nRF connect for mobile app.

This happened in case of 2 custom boards. Kindly let me know how can I fix this and see the device advertising.

Please let me know if you need any other information regarding the same.

Thanks,

Mushtakh 

Related