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)
]
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.
did you do the pre requirements for the 'pi' user as defined in the instructions? (see: node-red-contrib-generic-ble (node) - Node-RED) - 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.
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
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.
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.
sudo usermod -G bluetooth -a pi
Then reboot the OS so that the policy changes take effect.
@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.
@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.
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.