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

MY BLE connection lost during run time!

I mounted the chip onto my own PCB, I am not using a devkit, My board is "Wireless-Tag WT51822-S2", it is a module that uses nRF51822-QFAA as (SoC)

I am the ble_app_uart example inside sdkv10.0.0 as a framework to my application.

My application is simply a smart-remote which contains two interrupts: 1- TIMER1 interrupt (I am using it as a scheduler to run a background code inside the main function). 2- GPIOTE Interrupt that fires when an input pin toggles.

The input pin is sensing the IR receiver sensor and generates an interrupts with each edge, Inside the interrupt I calculate the time between edges.

I load these times into an array, run my algorithm, pack my ble payload, then send the frame to my smart phone.

So when I push any button on my remote-control I am expecting to get a message nRF Toolbox.

But in reality I get a correct responses each push button, and after some trials/time (random) I get my connection lost!!

I don't know exactely why it loses the connection, could anyone help please ? :)

Parents
  • First you need to figure out why you get connection loss. Are any of the devices disconnecting? This is simplest seen on a sniffer trace. You can use nRF Sniffer. If none are disconnecting, one of the devices stops maintaining the connection, which causes the peer to disconnect. This can also be seen on a sniffer trace. If you don't have sniffer I recommend checking if you get a BLE_GAP_EVT_DISCONNECTED event or if your device resets (see this).

Reply
  • First you need to figure out why you get connection loss. Are any of the devices disconnecting? This is simplest seen on a sniffer trace. You can use nRF Sniffer. If none are disconnecting, one of the devices stops maintaining the connection, which causes the peer to disconnect. This can also be seen on a sniffer trace. If you don't have sniffer I recommend checking if you get a BLE_GAP_EVT_DISCONNECTED event or if your device resets (see this).

Children
No Data
Related