# Bluetooth testing on Raspberry pi

**URL:** <https://discourse.nodered.org/t/bluetooth-testing-on-raspberry-pi/44494>\
**Category:** General\
**Created:** [21 April 2021 10:09 UTC](https://discourse.nodered.org/t/bluetooth-testing-on-raspberry-pi/44494 "2021-04-21T10:09:24Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![DSongra11\_forum.com](https://avatars.discourse-cdn.com/v4/letter/d/f04885/32.png) [@DSongra11\_forum.com](https://discourse.nodered.org/u/DSongra11_forum.com)\
**Post date:** [21 April 2021 10:09 UTC](https://discourse.nodered.org/t/bluetooth-testing-on-raspberry-pi/44494/1 "2021-04-21T10:09:24Z")

</div>

Hi,

I am testing raspberry pi, I have installed node-red V 1.3.3. For Bluetooth testing, I am getting the below error message in debug window.

[  
/\_\_bledev/6b582bf82aab err:Error: Missing Peripheral Device  
=\>Error: Missing Peripheral Device  
at Peripheral.a (/home/pi/.node-red/node\_modules/node-red-contrib-generic-ble/dist/generic-ble.js:217:31)  
at Object.onceWrapper (events.js:420:28)  
at Peripheral.emit (events.js:314:20)  
at PeripheralRemovableNoble.Noble.onDisconnect (/home/pi/.node-red/node\_modules/@abandonware/noble/lib/noble.js:245:16)  
at BluezBindings.emit (events.js:314:20)  
at ProxyInterface. (/home/pi/.node-red/node\_modules/node-red-contrib-generic-ble/dist/noble/lib/bluez/noble/lib/bluez/bindings.js:623:18)  
at ProxyInterface.emit (events.js:314:20)  
at EventEmitter.$listeners. (/home/pi/.node-red/node\_modules/dbus-next/lib/client/proxy-interface.js:108:17)  
at EventEmitter.emit (events.js:326:22)  
at handleMessage (/home/pi/.node-red/node\_modules/dbus-next/lib/bus.js:118:23)  
]

Could you please help me to solve this issue

Br,  
Devendra

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [21 April 2021 11:03 UTC](https://discourse.nodered.org/t/bluetooth-testing-on-raspberry-pi/44494/2 "2021-04-21T11:03:47Z")

</div>

1. is this the first time you are using this node on any release of NR?
2. did you do the pre requirements for the 'pi' user as defined in the instructions? (see: [node-red-contrib-generic-ble (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-generic-ble))
3. What RPI are you using?

You should open an issue on the node's github page: [Issues · CANDY-LINE/node-red-contrib-generic-ble · GitHub](https://github.com/CANDY-LINE/node-red-contrib-generic-ble/issues)

---

<div class="post-metadata">

**Author:** ![DSongra11\_forum.com](https://avatars.discourse-cdn.com/v4/letter/d/f04885/32.png) [@DSongra11\_forum.com](https://discourse.nodered.org/u/DSongra11_forum.com)\
**Post date:** [21 April 2021 12:53 UTC](https://discourse.nodered.org/t/bluetooth-testing-on-raspberry-pi/44494/3 "2021-04-21T12:53:40Z")

</div>

Hi,  
**strong text**  
Thanks for your response.

1. is this the first time you are using this node on any release of NR? - **Yes, the First time this is the fresh raspberry pi I just installed node-red and Bluetooth node.**

2. did you do the pre requirements for the 'pi' user as defined in the instructions? (see: [node-red-contrib-generic-ble (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-generic-ble)) - In permission, I did not understand which permission need to enable/set **process owner's permission properly and manually** could you please let me know what I need to do. attached permission details screenshot.  

3. What RPI are you using? - **Raspberry Pi 3**

Br,  
Devendra

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [21 April 2021 14:04 UTC](https://discourse.nodered.org/t/bluetooth-testing-on-raspberry-pi/44494/4 "2021-04-21T14:04:51Z")

</div>

The default permissions on a Linux device does not allow users to access Bluetooth.

Many people in the past suggested running Node-RED under the "root" user but this is really poor practice for security reasons.

Instead you need to make sure that the user running Node-RED (typically "pi" on a Raspberry Pi) has access to the bluetooth device. Check the permissions on the device by running `ls -l /dev`

Example /dev output:

```auto
crw--w---- 1 root tty 4, 9 Apr 18 14:41 tty9
crw-rw---- 1 root dialout 204, 64 Apr 18 14:42 ttyAMA0
crw------- 1 root root 5, 3 Apr 18 14:41 ttyprintk
crw--w---- 1 root tty 4, 64 Apr 18 14:42 ttyS0
crw------- 1 root root 10, 239 Apr 18 14:41 uhid
crw------- 1 root root 10, 223 Apr 18 14:41 uinput
crw-rw-rw- 1 root root 1, 9 Apr 18 14:41 urandom
drwxr-xr-x 3 root root 60 Apr 18 14:41 v4l
crw-rw---- 1 root video 243, 0 Apr 18 14:41 vchiq
crw-rw---- 1 root video 248, 0 Apr 18 14:41 vcio

```

Note that many devices are owned by root:root. But in the case above, I changed the `ttyAMA0` (USB) device to be owned by `root:dialout`. Dialout being the traditional Linux user group for devices like USB/Serial, etc (from the old modem days). Then you add the pi user to the dialout group.

I typically don't use Bluetooth on my devices so I can't give you the exact device names.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [21 April 2021 15:07 UTC](https://discourse.nodered.org/t/bluetooth-testing-on-raspberry-pi/44494/5 "2021-04-21T15:07:43Z")

</div>

From the readme I pointed you to:

# Installation Note (Linux)

The Node-RED process owner must belong to `bluetooth` group in order to access BlueZ D-Bus API, otherwise this node doesn't work at all because of bluetoothd permission issue. For example, if you're going to run the process by `pi` user, run the following command.

```auto
sudo usermod -G bluetooth -a pi

```

Then reboot the OS so that the policy changes take effect.

```auto
sudo reboot

```

---

<div class="post-metadata">

**Author:** ![DSongra11\_forum.com](https://avatars.discourse-cdn.com/v4/letter/d/f04885/32.png) [@DSongra11\_forum.com](https://discourse.nodered.org/u/DSongra11_forum.com)\
**Post date:** [22 April 2021 04:12 UTC](https://discourse.nodered.org/t/bluetooth-testing-on-raspberry-pi/44494/6 "2021-04-22T04:12:21Z")

</div>

@Zenofmud, I did this sudo usermod -G bluetooth -a pi but still facing the same issue.

If I do bluetooth testing through the console It is working only not communicating in node-red.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [22 April 2021 07:05 UTC](https://discourse.nodered.org/t/bluetooth-testing-on-raspberry-pi/44494/7 "2021-04-22T07:05:19Z")

</div>

Have you opened an issue on the GitHub page?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [22 April 2021 08:28 UTC](https://discourse.nodered.org/t/bluetooth-testing-on-raspberry-pi/44494/8 "2021-04-22T08:28:44Z")

</div>

Have you checked that the bluetooth device actually belongs to the bluetooth group?

---

<div class="post-metadata">

**Author:** ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)\
**Post date:** [22 April 2021 08:46 UTC](https://discourse.nodered.org/t/bluetooth-testing-on-raspberry-pi/44494/9 "2021-04-22T08:46:18Z")

</div>

You will need to logout and then log back in after running the usermod command (but probably easier to just reboot the pi)

---

<div class="post-metadata">

**Author:** ![DSongra11\_forum.com](https://avatars.discourse-cdn.com/v4/letter/d/f04885/32.png) [@DSongra11\_forum.com](https://discourse.nodered.org/u/DSongra11_forum.com)\
**Post date:** [22 April 2021 12:08 UTC](https://discourse.nodered.org/t/bluetooth-testing-on-raspberry-pi/44494/10 "2021-04-22T12:08:51Z")

</div>

@zenofmud - no I have not opened an issue on the GitHub page.

@TotallyInformation - am using Ipad6 as a Bluetooth device. On Ipad, I have Installed the LightBlue application.

Now I can see a change, my raspberry pi got to connect with Ipad for a few seconds and then disconnect. while connecting raspberry pi with Ipad on the Ipad screen showing pair request again and again even click on Pair.

One year before I did same steps with the same raspberry pi & Ipad as bluetooth device, at that time it was working perfectly. but I don't know why this problem come.

---

<div class="post-metadata">

**Author:** ![DSongra11\_forum.com](https://avatars.discourse-cdn.com/v4/letter/d/f04885/32.png) [@DSongra11\_forum.com](https://discourse.nodered.org/u/DSongra11_forum.com)\
**Post date:** [23 April 2021 12:44 UTC](https://discourse.nodered.org/t/bluetooth-testing-on-raspberry-pi/44494/11 "2021-04-23T12:44:38Z")

</div>

Hello,

My raspberry pi got connected with my Ipad & iPhone also.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/d/1d0641322a248ed172f6ac75e3982a967a144ae6.png)

but not able to read data. my node-red flow attached. is there anything I am missing?  
[flows (2).json](https://discourse.nodered.org/uploads/short-url/dCjWgJhTYk3wVDvocdzSPccI6GC.json) (3.1 KB)

Br,  
Devendra

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [25 April 2021 10:35 UTC](https://discourse.nodered.org/t/bluetooth-testing-on-raspberry-pi/44494/12 "2021-04-25T10:35:43Z")

</div>

What bluetooth app are you using on the iPad?

---

<div class="post-metadata">

**Author:** ![DSongra11\_forum.com](https://avatars.discourse-cdn.com/v4/letter/d/f04885/32.png) [@DSongra11\_forum.com](https://discourse.nodered.org/u/DSongra11_forum.com)\
**Post date:** [26 April 2021 04:12 UTC](https://discourse.nodered.org/t/bluetooth-testing-on-raspberry-pi/44494/13 "2021-04-26T04:12:56Z")

</div>

I am using the LightBlue app for custom data as Blank selected.

Br,  
Devendra

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [27 April 2021 09:16 UTC](https://discourse.nodered.org/t/bluetooth-testing-on-raspberry-pi/44494/14 "2021-04-27T09:16:52Z")

</div>

Hmm, wish I could help but I can't seem to get my iPad Pro using lightBlue see my rpi4 at all.

---

<div class="post-metadata">

**Author:** ![DSongra11\_forum.com](https://avatars.discourse-cdn.com/v4/letter/d/f04885/32.png) [@DSongra11\_forum.com](https://discourse.nodered.org/u/DSongra11_forum.com)\
**Post date:** [27 April 2021 09:38 UTC](https://discourse.nodered.org/t/bluetooth-testing-on-raspberry-pi/44494/15 "2021-04-27T09:38:29Z")

</div>

@zenofmud thanks for your time for this testing, could you please give me Bluetooth testing details/document/suggestion. So that I will follow according to your testing.

for lightBlue testing, you need to create one Virtual Devices in this app at the application bottom you will see this, then add (+) one off the peripheral. then only you will see this in your node-red Bluetooth node.

Br,  
Devendra

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [27 April 2021 10:38 UTC](https://discourse.nodered.org/t/bluetooth-testing-on-raspberry-pi/44494/16 "2021-04-27T10:38:19Z")

</div>

> [@DSongra11\_forum.com](#):
>
> for lightBlue testing, you need to create one Virtual Devices in this app at the application bottom you will see this, then add (+) one off the peripheral. then only you will see this in your node-red Bluetooth node.

So do you define it as a 'Blank' peripheral? I tried that but it doesn't show in the Pi4 when trying to use bluetooth to discover devices

---

<div class="post-metadata">

**Author:** ![DSongra11\_forum.com](https://avatars.discourse-cdn.com/v4/letter/d/f04885/32.png) [@DSongra11\_forum.com](https://discourse.nodered.org/u/DSongra11_forum.com)\
**Post date:** [27 April 2021 10:57 UTC](https://discourse.nodered.org/t/bluetooth-testing-on-raspberry-pi/44494/17 "2021-04-27T10:57:23Z")

</div>

Yes, I have defined Blank peripheral, first time while searching you will see Mac address then after the first communication is done then it will show as a Blank replacement on Mac address.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [27 April 2021 11:17 UTC](https://discourse.nodered.org/t/bluetooth-testing-on-raspberry-pi/44494/18 "2021-04-27T11:17:20Z")

</div>

That’s the problem, I don’t see the iPad’s Bluetooth MAC address in the pi Bluetooth connection. I do see my Mac mini

---

<div class="post-metadata">

**Author:** ![DSongra11\_forum.com](https://avatars.discourse-cdn.com/v4/letter/d/f04885/32.png) [@DSongra11\_forum.com](https://discourse.nodered.org/u/DSongra11_forum.com)\
**Post date:** [28 April 2021 03:54 UTC](https://discourse.nodered.org/t/bluetooth-testing-on-raspberry-pi/44494/19 "2021-04-28T03:54:14Z")

</div>

you are checking in node-red Bluetooth node?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [28 April 2021 07:40 UTC](https://discourse.nodered.org/t/bluetooth-testing-on-raspberry-pi/44494/20 "2021-04-28T07:40:58Z")

</div>

checking in both node-red ond in the Pi's bluetooth manager. It doesn't look like I'll be much help to you...sorry.

[Next page](https://discourse.nodered.org/t/bluetooth-testing-on-raspberry-pi/44494.md?page=2)
