MQTT win7 server --- win 7 JAVA client --- VMware ubuntu 测试C client

本文介绍了如何在Windows平台上配置MQTT服务器,并使用Java客户端及Ubuntu下的C语言客户端进行连接测试。具体步骤包括安装Apache Apollo作为MQTT服务器,以及通过paho库实现不同平台上的客户端配置。

1->  MQTT-SERVER:        win7 : 

      apache-apollo-1.7.1-windows-distro.zip

2-> MQTT-CLIENT JAVA  win7 :

      org.fusesource.mqtt-client

3-> MQTT-CLIENT C        VMware ubuntu (网络设置为NAT 模式):

     paho.mqtt.c

       ubuntu  pub :

        ./paho_c_pub topic    --host   (win7 主机ip)  xxxxxx  --port 61613 --username admin --password password

      ubutntu sub:

        ./paho_c_sub  topic   --host  (win7 主机ip)  xxxxxx  --port 61613 --username admin --password password

  

    


    

     

 



sed@sed-VMware-Virtual-Platform:~/gui/linux$ make debug Using Paho MQTT dynamic library Paho MQTT header found: /home/sed/local/include/MQTTClient.h === Build Configuration === Paho MQTT directory: /home/sed/local Paho MQTT header: /home/sed/local/include/MQTTClient.h Paho MQTT static library: Paho MQTT dynamic library: /home/sed/local/lib/libpaho-mqtt3c.so /home/sed/local/lib/libpaho-mqtt3c.so.1 /home/sed/local/lib/libpaho-mqtt3c.so.1.3 Paho MQTT link options: -L/home/sed/local/lib -lpaho-mqtt3c === Directory Contents === Files in /home/sed/local/include: 总计 232 drwxrwxr-x 2 sed sed 4096 11月 11 23:02 . drwxrwxr-x 4 sed sed 4096 11月 11 23:28 .. -rw-r--r-- 1 root root 98714 11月 11 23:02 MQTTAsync.h -rw-r--r-- 1 root root 88552 11月 11 23:02 MQTTClient.h -rw-r--r-- 1 root root 11559 11月 11 23:02 MQTTClientPersistence.h -rw-r--r-- 1 root root 1208 11月 11 23:02 MQTTExportDeclarations.h -rw-r--r-- 1 root root 9908 11月 11 23:02 MQTTProperties.h -rw-r--r-- 1 root root 3222 11月 11 23:02 MQTTReasonCodes.h -rw-r--r-- 1 root root 1847 11月 11 23:02 MQTTSubscribeOpts.h Files in /home/sed/local/lib: 总计 2412 drwxrwxr-x 2 sed sed 4096 11月 11 23:28 . drwxrwxr-x 4 sed sed 4096 11月 11 23:28 .. lrwxrwxrwx 1 root root 19 11月 11 23:02 libpaho-mqtt3a.so -> libpaho-mqtt3a.so.1 lrwxrwxrwx 1 sed sed 21 11月 11 22:57 libpaho-mqtt3a.so.1 -> libpaho-mqtt3a.so.1.3 -rw-r--r-- 1 root root 618072 11月 11 23:28 libpaho-mqtt3a.so.1.3 lrwxrwxrwx 1 root root 20 11月 11 23:02 libpaho-mqtt3as.so -> libpaho-mqtt3as.so.1 lrwxrwxrwx 1 sed sed 22 11月 11 22:57 libpaho-mqtt3as.so.1 -> libpaho-mqtt3as.so.1.3 -rw-r--r-- 1 root root 677856 11月 11 23:28 libpaho-mqtt3as.so.1.3 lrwxrwxrwx 1 root root 19 11月 11
最新发布
11-13
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值