带有Windows的MQTT-SN [英] MQTT-SN with Windows

查看:162
本文介绍了带有Windows的MQTT-SN的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Windows上运行MQTT(Mosquito)已有一段时间了,感谢ppatierno,它与我的Netduino一起使用效果很好.

I have been running MQTT (Mosquito) for a while on Windows and it works great with my Netduino, thanks ppatierno.

但是现在我需要开始合并mqtt-sn来实现来自Arduino的有线串行连接.具有无线解决方案也是理想的.

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.

我找不到在Windows上完成此操作的任何参考.是否需要将cygwin socat(更希望避免使用)和Mosquito进行某种组合?

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?

推荐答案

真正的小消息代理(RSMB)支持基于UDP的MQTT-SN.来源可从git上的 http://git.eclipse.org上获得/c/mosquitto/org.eclipse.mosquitto.rsmb.git .要构建它,请使用MS Visual Studio并从Cygwin中进行制作.

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.

然后,您需要一个MQTT-SN串行到UDP桥接器.我使用 https://github.com/njh/mqtt-sn-tools 很好.在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可能会完全取代您的MQTT代理,但是如果您想保留Mosquito,请桥接RSMB以将所有消息推送到Mosquito.这是简单的配置文件"broker.cfg":

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

这篇关于带有Windows的MQTT-SN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆