# How to power BLE back on using node-red-contrib-noble-bluetooth

**URL:** <https://discourse.nodered.org/t/how-to-power-ble-back-on-using-node-red-contrib-noble-bluetooth/32002>\
**Category:** General\
**Created:** [25 August 2020 19:58 UTC](https://discourse.nodered.org/t/how-to-power-ble-back-on-using-node-red-contrib-noble-bluetooth/32002 "2020-08-25T19:58:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hbull1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hbull1/32/28929_2.png) [@hbull1](https://discourse.nodered.org/u/hbull1)\
**Post date:** [25 August 2020 19:58 UTC](https://discourse.nodered.org/t/how-to-power-ble-back-on-using-node-red-contrib-noble-bluetooth/32002/1 "2020-08-25T19:58:42Z")

</div>

I've managed to get node-red-contrib-noble-bluetooth to scan for BLE devices and subscribe to one devices's characteristics, but I'm having a recurring error that typically requires a reboot of my Raspberry Pi 4. Any ideas how to prevent or catch this error?  
`Error scanning for devices: Error: Could not start scanning, state is poweredOff (not poweredOn)`

---

<div class="post-metadata">

**Author:** ![hbull1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hbull1/32/28929_2.png) [@hbull1](https://discourse.nodered.org/u/hbull1)\
**Post date:** [26 August 2020 15:11 UTC](https://discourse.nodered.org/t/how-to-power-ble-back-on-using-node-red-contrib-noble-bluetooth/32002/2 "2020-08-26T15:11:23Z")

</div>

I've been able to avoid rebooting in some instances with the following commands in the terminal, but it would be much more useful to catch and correct this from within node-red. Any ideas?

`sudo systemctl restart bluetooth.service`  
`sudo systemctl restart nodered.service`

---

<div class="post-metadata">

**Author:** ![hbull1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hbull1/32/28929_2.png) [@hbull1](https://discourse.nodered.org/u/hbull1)\
**Post date:** [30 August 2020 18:46 UTC](https://discourse.nodered.org/t/how-to-power-ble-back-on-using-node-red-contrib-noble-bluetooth/32002/3 "2020-08-30T18:46:10Z")

</div>

I seem to have been able to reduce the occurrence of this error by stopping BLE scanning as soon as a BLE device is connected. I've been reading that some BLE chipsets fail if you attempt to connect to a BLE device while still scanning. I still haven't found a complete solutions, so any tips would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [29 October 2020 18:46 UTC](https://discourse.nodered.org/t/how-to-power-ble-back-on-using-node-red-contrib-noble-bluetooth/32002/4 "2020-10-29T18:46:18Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
