MQTT ?
Tank (53) 375 posts |
Has anyone looked at either porting or writing a MQTT client for RISC OS ? |
Chris Gransden (337) 1207 posts |
I just did a quick port of Eclipse Mosquitto to see if it would work on RISC OS. It’s command line only for subscribe and publish. The broker seems to work too. The ‘hello world’ test on the mosquitto gitbhub page worked to a broker running on RISC OS. |
Steve Pampling (1551) 8172 posts |
There’s a collection of code over on the mbed site. |
Chris Gransden (337) 1207 posts |
Not until I saw your post. You can download mosquitto 2.0.11 for RISC OS from here. It’s only had minimal testing but seems to work OK. Update mosquitto.conf to set the listener.
Also set ‘allow_anonymous false’ or create a password file with mosquitto_passwd and set,
To run the broker use e.g.,
To test it’s working,
|
Steve Pampling (1551) 8172 posts |
Fast work. Probably unlikely to become an issue, but I think you need to include the source to match the terms of the licence. |
Tank (53) 375 posts |
Chris, did you build on RISC OS or cross compile ? |
Chris Gransden (337) 1207 posts |
I used the GCCSDK autobuilder to cross compile. The libmosquitto (C and C++) library and it’s dependencies will appear via PackMan soon. It will then be possible to create a RISC OS app that uses it without having to cross compile. There are also some examples in C and C++ included. |
Chris Gransden (337) 1207 posts |
The link to the source code is in RiscPkg.Copyright already. |
Tank (53) 375 posts |
Just to let you know that I have tested with my local MQTT server and have subscribed to both a test feed set up with the library and a “real” feed from my SMART meter. |
Chris Johns (8262) 242 posts |
I’ve been playing with MQTT on linux.. now I can play with it from RO too. Another thing to add to my ever-increasing list of stuff. Hmm.. I wonder if one of the python libs could be ported. |
Tank (53) 375 posts |
Finally got an app running using the library… |