Help with BlueTooth protocol

Sorry folks I know it is kind of Off topic to Node-Red, but I have to start somewhere.

Connecting devices is usually done via WiFi or Ethernet.

Can Bluetooth work?

I want to send messages (MQTT at a push) and am not sure how to get it all working.

MQTT would make life a lot easier as I then don't need to worry about protocols/formats.
It is all done inside MQTT.

But the mechanics of how to do that is beyond me and I don't really know where else to ask.

Most of the stuff I find on it is how to play audio - which I thought was the only use of BT....
But I then see you can send files via it, and some remote controls use BT as their comms method.

So it must be possible. Just getting into it is the part which has me stumped.

The issue I see is the fact the BT/BLE must be on the device, supported by whatever MQTT client that device might use, but you also need some form of BT/BLE transceiver within whatever transmitting distance it has.

In the case of the RPi, it has BT, but not sure if it is any good for file transfer... and then again how to get NR and MQTT to use it.

If the devices you want to use are ESP8266 or ESP32, then save your hair and stick with MQTT over WiFi

1 Like

Thanks.

Yeah, all this is a new world for me.

I was only asking as BT/BLE needs a lot less power and, if I am understanding it correctly, isn't like WiFi because WiFi is always on/transmitting.

Seems that it is too much trouble for what I am wanting, and I may need to stick with WiFi.

Depending on the devices you are referring too, and your use case...

Perhaps a lot of work... but using something like an ESP32 as a line powered "base station" that listens for incoming signals from battery powered BLE devices (another ESP32 using deep sleep?), and once it gets a signal, switches to WiFi and re-transmits it to your NR server via MQTT, then back to BLE for more listening.

ESP32 can use both...

1 Like

Again thanks.

But I think that is making something more complicated than it needs to be for the sake of....
not much.

I was only asking out of curiosity and small interest in how BlueTooth works as a pipe/protocol to send messages.

Here is a short read :stuck_out_tongue:
https://learn.sparkfun.com/tutorials/bluetooth-basics/all

1 Like

The espruino IoT devices are very good for BLE, there's a tutorial on communicating to them via an MQTT/BLE Bridge here Bluetooth LE and Node-RED with MQTT - Espruino

Although you need to think about why you want to use Bluetooth rather than WiFi, BLE has some power advantages for small devices running on a battery, but cost wise WiFi chips like the ESP32 can be had for less than $1 in quantity, BLE also then requires you to setup some sort of receiver/hub like a Raspberry Pi whereas WiFi would use the existing infrastructure.

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