Windows 的 MQTT-SN

MQTT-SN with Windows

我在 Windows 上使用 运行 MQTT (Mosquito) 有一段时间了,它与我的 Netduino 配合得很好,谢谢 ppatierno。

但现在我需要开始合并 mqtt-sn 以实现来自 Arduino 的有线串行连接。拥有无线解决方案也是可取的。

我在 Windows 上找不到完成此操作的任何参考资料。是否需要结合使用 cygwin socat(最好避免)和 Mosquito 或什么?

Really Small Message Broker (RSMB) 支持基于 UDP 的 MQTT-SN。来源可从 http://git.eclipse.org/c/mosquitto/org.eclipse.mosquitto.rsmb.git 的 git 获得。要构建它,请使用 MS Visual Studio 并从 Cygwin 制作。

那么你需要一个 MQTT-SN 串口转 UDP 桥。我使用 https://github.com/njh/mqtt-sn-tools ,效果很好。在 Cygwin 中构建它。

RSMB 可能会完全取代您的 MQTT 代理,但如果您想保留 Mosquito,则桥接 RSMB 以将所有消息推送到 Mosquito。这是简单的配置文件 '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