So far I have been running some experiments with MQTT over WiFi using 3 Raspberry Pi's:
MQTT publisher --> WiFi link --> MQTT Broker (mosquitto) --> Ethernet link --> MQTT subscriber
I have been using mosquitto as the MQTT broker and the clients (publisher and subscriber) that come with it. Everything has been running over TCP/IP and it has been pretty easy to setup.
Now I would like to replace the WiFi link with a Bluetooth link, however I am having problems to do this. Since MQTT requires TCP/IP, which Bluetooth does not provide, I need to switch to MQTT-SN which can be run over any technology.
I have found the way to implement the middle node (the broker). I would keep the mosquitto (MQTT) broker and use the MQTT-SN gateway from Eclipse Paho (https://www.eclipse.org/paho/components ... nt-gateway
) to convert the MQTT-SN packets into MQTT packets that the mosquitto broker could process. Moreover, since the packets would be received through a serial port (Bluetooth), I need a bridge like this one https://github.com/njh/mqtt-sn-tools/bl ... l-bridge.c
. All this would sort out the broker.
The problem is on the publisher's side. All the MQTT-SN publishers that I have found are implemented to run over UDP, which assumes an underlying IP connection. I have not found any code for an MQTT-SN publisher that I can run on a Raspberry Pi to send the packets through a Bluetooth link. There is some code for micro-controllers but not something that I could run on RBPi to do the same. I was wondering if there is any implementation of an MQTT-SN client that I could run in a Raspberry Pi to send the data through Bluetooth to the MQTT-SN gateway. If not, how could I achieve what I need? Any help would be much appreciated.