# BLE Intermittent Crashing

**URL:** <https://discourse.nodered.org/t/ble-intermittent-crashing/66337>\
**Category:** General\
**Created:** [11 August 2022 19:00 UTC](https://discourse.nodered.org/t/ble-intermittent-crashing/66337 "2022-08-11T19:00:40Z")\
**Posts on this page:** 1\
**Showing post:** 21

<div class="post-metadata">

**Author:** ![jgreenmt](https://avatars.discourse-cdn.com/v4/letter/j/7feea3/32.png) [@jgreenmt](https://discourse.nodered.org/u/jgreenmt)\
**Post date:** [15 August 2022 02:06 UTC](https://discourse.nodered.org/t/ble-intermittent-crashing/66337/21 "2022-08-15T02:06:28Z")

</div>

Another update.

Last night I established a connection, made sure I could read and write, then left it overnight. I checked about two hours in and still had a connection. In the morning the device had disconnected but I didn't have any errors. I assumed it might have been because I wasn't keeping the connection alive via a "ping" of some kind.

I changed the program to toggle the value on for 10 seconds, then off again, every 5 minutes. In addition to reading the state every 2 seconds. Everything worked properly for about 6 hours at which the device disconnected. I could not scroll far enough up the terminal to see if there was an error, but Node-RED appeared not to have crashed or reset, but was generating an error every 2 seconds due to trying to read from a disconnected device.

I checked right before I had to step out for some errands and upon seeing the disconnection without any errors I closed my laptop in frustration which turned off my Arduino. When I came back and turned on the laptop again I was able to reconnect without restarting my Node-RED program.

I'm still going to try the other BLE packages to try to get better results but I fear this might be the sort of thing I run into with any of them. I'm going to check again, but I don't think I can use a catch node to catch the disconnect state. I would feel better if I could at least detect a disconnect so that I could attempt to reconnect. Is there another way besides a catch node to catch an error?

---

_[View the full topic](https://discourse.nodered.org/t/ble-intermittent-crashing/66337)._
