MQTT Gateway - works, pings but no messages while listening to broker
-
Hi!
I'm having hard time setting up MQTT ethernet gateway. My gateway is set up on 10.0.35:
magdalena@magdalena-laptop:~$ ping 10.0.0.35 PING 10.0.0.35 (10.0.0.35) 56(84) bytes of data. 64 bytes from 10.0.0.35: icmp_seq=1 ttl=128 time=0.236 ms ^C --- 10.0.0.35 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.236/0.236/0.236/0.000 msI can connect with mosquitto_sub:
magdalena@magdalena-laptop:~$ mosquitto_sub -h 10.0.0.35 -d -t 'MyMQTT/#' Received CONNACK Received SUBACK Subscribed (mid: 1): 0 Sending PINGREQ Received PINGRESPOn the serial console on gateway I have:
Started! 0;0;3;0;9;read: 20-20-0 s=255,c=3,t=11,pt=0,l=18:Temperature Sensor 0;0;3;0;9;read: 20-20-0 s=255,c=3,t=12,pt=0,l=3:1.0 0;0;3;0;9;read: 20-20-0 s=255,c=0,t=17,pt=0,l=5:1.4.1^^^ this is my temperature sensor showing
0;0;3;0;9;read: 20-20-0 s=255,c=3,t=6,pt=1,l=1:0 0;0;3;0;9;read: 20-20-0 s=255,c=3,t=11,pt=0,l=18:Temperature Sensor 0;0;3;0;9;read: 20-20-0 s=255,c=3,t=12,pt=0,l=3:1.0^^^ I restarted the sensor node.
<<10 24 00 06 4D 51 49 73 64 70 03 02 00 3C 00 16 6D 6F 73 71 5F 73 75 62 5F 35 38 37 37 5F 6D 61 67 64 61 6C 65 6E >>20 02 00 00 <<82 06 00 01 00 01 23 00 >>90 03 00 01 00^^^ sometimes I get something like this (what is it?)
0;0;3;0;9;read: 20-20-0 s=255,c=0,t=17,pt=0,l=5:1.4.1 0;0;3;0;9;read: 20-20-0 s=255,c=3,t=6,pt=1,l=1:0 0;0;3;0;9;send: 0-0-20-20 s=255,c=3,t=6,pt=0,l=1,st=ok:M 0;0;3;0;9;read: 20-20-0 s=255,c=3,t=11,pt=0,l=18:Temperature Sensor 0;0;3;0;9;read: 20-20-0 s=255,c=3,t=12,pt=0,l=3:1.0 <<C0 00 >>D0 00 <<C0 00 >>D0 00 <<C0 00 >>D0 00^^^ some more garbage.
I'm using:
Arduino Uno (GW)
Ethernet Shield on W5100Arduino Pro mini 3,3V
NRF24L01 Radios. SoftSPI enabled.
So the problem is that I do not get anything with mosquittp_sub. What is wrong?
PS. I did not connect decoupling capacitor. Gateway and sensor are laying 5cm besides each other.
-
OK, I've probably fixed it :)
It was bad connection on Dallas sensor so sensor node did not send any data and that was why I did not receive any :)
But what is this garbage on the serial?
0;0;3;0;9;read: 20-20-0 s=255,c=0,t=17,pt=0,l=5:1.4.1
0;0;3;0;9;read: 20-20-0 s=255,c=3,t=6,pt=1,l=1:0
0;0;3;0;9;send: 0-0-20-20 s=255,c=3,t=6,pt=0,l=1,st=ok:M
0;0;3;0;9;read: 20-20-0 s=255,c=3,t=11,pt=0,l=18:Temperature Sensor
0;0;3;0;9;read: 20-20-0 s=255,c=3,t=12,pt=0,l=3:1.0
0;0;3;0;9;read: 20-20-0 s=0,c=0,t=6,pt=0,l=5:1.4.1
0;0;3;0;9;read: 20-20-0 s=0,c=1,t=0,pt=7,l=5:24.6
MyMQTT/20/0/V_TEMP
>>30 18 00 12 4D 79 4D 51 54 54 2F 32 30 2F 30 2F 56 5F 54 45 4D 50 32 34 2E 36
<<C0 00
>>D0 00 -
<<C0 00 >>D0 00is a MQTT hartbeat
The 0;0;3;0;9 are gateway log messages.
-
OK, I've probably fixed it :)
It was bad connection on Dallas sensor so sensor node did not send any data and that was why I did not receive any :)
But what is this garbage on the serial?
0;0;3;0;9;read: 20-20-0 s=255,c=0,t=17,pt=0,l=5:1.4.1
0;0;3;0;9;read: 20-20-0 s=255,c=3,t=6,pt=1,l=1:0
0;0;3;0;9;send: 0-0-20-20 s=255,c=3,t=6,pt=0,l=1,st=ok:M
0;0;3;0;9;read: 20-20-0 s=255,c=3,t=11,pt=0,l=18:Temperature Sensor
0;0;3;0;9;read: 20-20-0 s=255,c=3,t=12,pt=0,l=3:1.0
0;0;3;0;9;read: 20-20-0 s=0,c=0,t=6,pt=0,l=5:1.4.1
0;0;3;0;9;read: 20-20-0 s=0,c=1,t=0,pt=7,l=5:24.6
MyMQTT/20/0/V_TEMP
>>30 18 00 12 4D 79 4D 51 54 54 2F 32 30 2F 30 2F 56 5F 54 45 4D 50 32 34 2E 36
<<C0 00
>>D0 00@cayco Those lines are just the data that is being received/transmitted through the Ethernet module and its showing as HEX.
If you convert the hex to ascii you can see what it is..In your example you are getting: "**$MQIsdp<mosq_sub_5877_magdalen**"
Here is a good tool: http://www.asciitohex.com/
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login