问题
I have been running MQTT (Mosquito) for a while on Windows and it works great with my Netduino, thanks ppatierno.
But now I need to start incorporating mqtt-sn for a wired serial connection from an Arduino. Having a solution capable of wireless is also desirable.
I can not find any references for accomplishing this on Windows. Does it need to be some combination of cygwin socat (would prefer to avoid) and Mosquito or what?
回答1:
Really Small Message Broker (RSMB) has support for MQTT-SN over UDP. Source is available from git on http://git.eclipse.org/c/mosquitto/org.eclipse.mosquitto.rsmb.git. To build it use MS Visual Studio and make from Cygwin.
Then you need a MQTT-SN serial to UDP bridge. I use https://github.com/njh/mqtt-sn-tools , works very well. Build it in Cygwin.
RSMB might completely replace your MQTT broker, but if you want to keep Mosquito, then bridge RSMB to push all messages to Mosquito. Here is simple configuration file 'broker.cfg':
# will show you packets being sent and received
trace_output protocol
# normal MQTT listener
listener 1884 INADDR_ANY
# MQTT-S listener
listener 1885 INADDR_ANY mqtts
# MQTT-S outgoing multicast bridge (QoS -1)
connection Bridge_2_Mosquito
address mosquito_host_name:1883
# publish all messages
topic # out
来源:https://stackoverflow.com/questions/28558038/mqtt-sn-with-windows