MQTT-SN with Windows

荒凉一梦 提交于 2019-11-30 20:50:30

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!