mosquitto_pub question

Home Forums Conduit: mLinux Model mosquitto_pub question

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #10121
    Eduardo Garcia
    Participant

    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

    #10130
    Eduardo Garcia
    Participant

    Hi:

    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

    #10134
    Brandon Bayer
    Blocked

    Eduardo,

    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

    #10142
    Eduardo Garcia
    Participant

    Hi 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!

    #10143
    Brandon Bayer
    Blocked

    Eduardo,

    Sure, you should be able to see all receive and transmit activity in /var/log/lora-network-server.log

    -Brandon

    #10145
    Eduardo Garcia
    Participant

    Brandon:

    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!

    #10151
    Brandon Bayer
    Blocked

    Eduardo,

    Yes the data value is transmitted as the payload.

    -Brandon

    #10157
    Eduardo Garcia
    Participant

    Hi 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!

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.