mosquitto_pub question
Home › Forums › Conduit: mLinux Model › mosquitto_pub question
- This topic has 7 replies, 2 voices, and was last updated 8 years, 5 months ago by Eduardo Garcia.
-
AuthorPosts
-
November 24, 2015 at 4:13 pm #10121Eduardo GarciaParticipant
Hi:
I am trying ty send data to my LoRa device, with no luck. My device ID on the network is 33:33:33:31. I check on the lora-network log and using mosquitto_sub that I am getting messages. However, I try the following:
mosquitto_pub -t lora/33:33:33:31/down -m 'D'
To transmit only a character, with no luck. Am I missing something, or is there a way to know that the conduit is trying to send the data?
Thanks,
-Ed
November 25, 2015 at 8:07 am #10130Eduardo GarciaParticipantHi:
I noticed I mad a mistake, I should use the DevEui, which is 8 bytes in length. However, with that change I still do not receive messages on my device. My device is actin as Class A, and I am receiving messages on the Conduit correctly.
Thanks,
-Ed
November 25, 2015 at 9:39 am #10134Brandon BayerBlockedEduardo,
Look at the transmit section of this page:
http://www.multitech.net/developer/software/lora/conduit-mlinux-lora-communication/As noted there,
The packet must be in JSON format and the data must be Base64 encoded
-Brandon
November 25, 2015 at 1:36 pm #10142Eduardo GarciaParticipantHi Brandon:
Thanks, you are right. I did change the message to be the following:
mosquitto_pub -t lora/01:02:03:04:05:06:07:08/down -m '{ "data":"aGVsbG8=" }'
with the device EUI verified to be 01:02:03:04:05:06:07:08 as noted on node list:
Net Addr Dev EUI Joined Seq Num Up Down 1st 2nd Dropped RSSI min max avg SNR min max avg 33:33:33:32 01:02:03:04:05:06:07:08 2015-11-25T09:00:33Z 154 1173 946 923 23 0 -121 -9 -96 -16.5 13.8 -4.7
But I still do not receive anything. Is there a way to see if the Conduit has tried to send the message on the receive frames? Thanks!
November 25, 2015 at 3:26 pm #10143Brandon BayerBlockedEduardo,
Sure, you should be able to see all receive and transmit activity in
/var/log/lora-network-server.log
-Brandon
November 25, 2015 at 4:42 pm #10145Eduardo GarciaParticipantBrandon:
Thank you for your reply. In the device side I seem to get a response, but it does not detect a payload. Does the mosquitto command send whatever is in the “data” parameter as the payload?
Thanks!
November 30, 2015 at 8:28 am #10151Brandon BayerBlockedEduardo,
Yes the data value is transmitted as the payload.
-Brandon
November 30, 2015 at 8:55 am #10157Eduardo GarciaParticipantHi Brandon:
It seems that my device (Nucleo Board with the LoRaWAN-lmic-app from SemTech in mBed, available https://developer.mbed.org/teams/Semtech/code/LoRaWAN-lmic-app/) needs that we also especify the port. For example, the following code in the conduit was received correctly:
mosquitto_pub -t lora/01:02:03:04:05:06:07:08/down -m '{ "data":"aGVsbG8=", "port":6 }'
I hope this may be of use to somebody now or in the future using the same devices I am using now!
-
AuthorPosts
- You must be logged in to reply to this topic.