eclipse / paho.mqtt-sn.embedded-c

Paho C MQTT-SN gateway and libraries for embedded systems. Paho is an Eclipse IoT project.
https://eclipse.org/paho
Other
315 stars 179 forks source link

Bluetooth LE support for the Gateway #69

Open icraggs opened 7 years ago

icraggs commented 7 years ago

To allow this scenario https://blog.benjamin-cabe.com/2017/01/16/using-mqtt-sn-over-ble-with-the-bbc-microbit to work better.

MichalFoksa commented 7 years ago

Hi Ian,

It requires having somewhere MQTT-SN Forwarder encapsulation (#27) on each end, right?

I believe it should be added into the gateway.

Michal

icraggs commented 7 years ago

Hi Michal,

I don't know if it requires encapsulation. I must admit to not understanding when encapsulation is needed - I probably haven't thought about it enough.

ty4tw commented 7 years ago

I'm going to study about BLE UARTService from Nordic.
I think the Gateway can directory connect to the BLE networks. so, there's no chance to use encapsulation message. the purpose of the encapsulation message is forwarding the message to the gateway which can not directly connect to the client's network.

ty4tw commented 7 years ago

Latest version of Bluez library was released this September. http://www.bluez.org/download/ It supports the BLE meshnetwork https://www.bluetooth.com/specifications/mesh-specifications.

As a gateway, it is better to adopt this Mesh network without forcing the UARTService which is lacking in function. I thought of a power technique to wait for L2CAP sockets with select () in order to realize 1: N communication, but I think that adopting Mesh network will solve this problem. The micro: bit will support BLE Mesh network either, I will decide to go on a royal road. Any help would be appreciated.

ty4tw commented 6 years ago

I implemented a Forwarder encapsulation message (#27).

arekmd commented 6 years ago

I added Serial port Forwarder encapsulated frames support in my fork here: https://github.com/arekmd/paho.mqtt-sn.embedded-c/commit/5f9c82f4d6bbc9a6783de14f1b3ffb9d06372967

It was implemented as new SensorNetwork module.

I was not aware, that Tomoaki is working on similar enhancement. Anyway, I decided to not create 'pull request' because those changes are not compatible.

ty4tw commented 6 years ago

Hi Arek,

Thank you for your information.
I thought the gateway should support Forwarders and Clients simultaneously.
So, I decided to add Forwarder class to the gateway. and also ClientProxy class for QoS-1. #34
More than one Forwarder can connect to the gateway.
I have implemented all the functions specified in the specification, I think.

ty4tw commented 3 years ago

The BLE implementation I'm coding requires bluetooth / bluetooth.h and libbluetooth. It can run only on Linux.

ty4tw commented 3 years ago

RFCOMM of Bluetooth classic is implemented. I don't know how to connect a BLE RFCOMM. Can anyone help me?
I will push it as a future branch.

ty4tw commented 3 years ago

micro:bits uses Nordic uart service. So, GW needs a GATT NUS running on a linux. Any information is appreciated.