MQTT over BLE

181 views
Skip to first unread message

Krishna Kumar

unread,
Aug 25, 2023, 7:55:58 PM8/25/23
to MQTT
Hi, 
I am working on a project to implement MQTT over BLE. I have implemented MQTT over WiFi and now I need to implement MQTT over BLE and then work on end-to-end communication, publishing or subscribing from WiFi client to BLE client and vice versa. Can someone please help me on this?

Regards,
Krishna 

Greg Troxel

unread,
Aug 25, 2023, 8:04:37 PM8/25/23
to Krishna Kumar, MQTT
Krishna Kumar <din...@gmail.com> writes:

> I am working on a project to implement MQTT over BLE. I have implemented

Are you working on this as a company employee, consultant, student
project, as part of an open source project that will be published for
others to use, a hobbyist, or something else?

Krishna Kumar

unread,
Aug 27, 2023, 9:43:52 AM8/27/23
to MQTT
Hi,
I am doing this as a hobby. I am working on implementing an end-to-end solution of IoT devices with different communication networks. I have implemented MQTT over WiFi and was able to send message from MQTT client device to MQTT broker (a Raspberry Pi 4 as a Gateway). Now I am planning to implement a MQTT connection over BLE. For this, I have configured rsmb broker in my gateway. Now I would like to communicate BLE client to the rsmb broker. I am struck in this. Also please do let me know if there's any other efficient approach to establish a MQTT over BLE communication.

Thanks and Regards,
Krishna 

Greg Troxel

unread,
Aug 27, 2023, 11:59:09 AM8/27/23
to Krishna Kumar, MQTT
Krishna Kumar <din...@gmail.com> writes:

> Hi,
> I am doing this as a hobby. I am working on implementing an end-to-end

Thanks. Many do not want to provide free consulting to people working
at companies who post using gmail and don't identify the context.

> solution of IoT devices with different communication networks. I have
> implemented MQTT over WiFi and was able to send message from MQTT client
> device to MQTT broker (a Raspberry Pi 4 as a Gateway). Now I am planning to
> implement a MQTT connection over BLE. For this, I have configured rsmb
> broker in my gateway. Now I would like to communicate BLE client to the
> rsmb broker. I am struck in this. Also please do let me know if there's any
> other efficient approach to establish a MQTT over BLE communication.

As I understand it, MQTT is primarily defined to operate over TCP and
thus implicitly over IPv4 or IPv6. But it is also defined, at least in
practice, to operate over websockets.

It seems obvious that you could have some sort of data stream (meaning
same characteristics to the next-higher layer as TCP) in BLE, put mqtt
in that, and then have the BLE/IP gateway glue that stream to a
connection to the server. There's a fair bit of code to be written,
probably.

I found this:

https://iot.stackexchange.com/questions/1825/is-mqtt-protocol-appropriate-for-transmitting-sensor-readings-over-ble

which has a lot of advice (which seems sensible to me on a quick
reading).

Andy Stanford-Clark

unread,
Aug 28, 2023, 2:34:58 AM8/28/23
to mq...@googlegroups.com
There was some discussion a while back about defining a Bluetooth Profile for MQTT - it would be a higher-level encapsulation that would define all the parts of an MQTT message, which could then be easily gatewayed through to MQTT.
It didn’t happen, though.

I’d be looking at MQTT-SN rather than MQTT over this kind of network.

You could quite easily use the serial profile and just stream MQTT / MQTT-SN over BLE, but that’s probably not what you have in mind…?

Andy
> --
> To learn more about MQTT see https://mqtt.org
> ---
> You received this message because you are subscribed to the Google Groups "MQTT" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/mqtt/rmisf84zdbq.fsf%40s1.lexort.com.
>

Reply all
Reply to author
Forward
0 new messages