So, I've given it a basic trial using an XBee and I'm happy to say it works. My set up was:
- MQTTSNGateway in Ubuntu 16 Server VM using FTDI Serial adapter directly to XBee (coordinator). Only changes were for API mode 1, and Makefile change for XBee sensor network.
- Mosquitto broker in same VM
- Arduino UNO using slightly modded Paho MQTTSN packet lib with an XBee (router) shield, running my own state machine (lightly tested against my own MQTTSN gateway).
The Arduino uses SEARCHGW to find the gateway. It then connects, publishes status topic (with retain), and subscribes to two topics. It also publishes a rolling counter on a topic. It flips a couple of pins on the subscriptions. It also uses a Will topic/message on the status topic.
Everything seemed to work well from an MQTT perspective; I used mosquito_sub/pub to monitor change, plus observed the pins on the XBee. There were some hitches, but not all are reproducible; for example, ^C did not seem to exit the gateway in all states, I observed the CPU pegged at one point, etc., but these are all fairly minor bugs. The makefile could use better dependency setup. It would be nice if a cross platform (at least Linux and OS X and maybe other BSD variants) lib was used for the threading; some recommend an apache lib, but I do not have direct experience with it.
I hope to deploy it on a pi or in a docker instance soonish and let it soak against my 'house' mosquito broker, which has some activity (though certainly not 'busy'), and maybe have it fire up things on a display or something. Alas, I have family and job so this might take a couple of weeks.
PK