cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Receiving Downlink Data on STM32WL Device Using JSON Format in LoRaWAN

PrathamSalunkhe
Associate

Hi everyone,

I am working on an STM32WL-based device and have successfully operated downlink in LoRaWAN communication when using the following JSON payload format:

 

 

{
"devEui": "0102030405060708",
"confirmed": true,
"fPort": 10,
"data": "ESIzRFU="
}

 

 

In this case, I sent a base64-encoded data string, and the downlink was successfully received by the device. Here's the relevant log output from the device:

 

 

 

[16:16:14:337] 1735817707s657:RX_C on freq 869525000 Hz at DR 0␍␊
[16:17:20:696] 1735817774s061:MAC rxDone␍␊
[16:17:40:846] +EVT:RX_C, PORT 10, DR 0, RSSI -32, SNR 5␍␊
[16:17:40:890] +EVT:12:1122334455␍␊

 

 

 

However, when I attempt to send the following JSON payload, where I pass individual parameters in the object field instead of a base64-encoded string, the payload is successfully sent from the server, but the STM32WL device only receives the fport value. The data and datasize  fields are both zero on the device.

 

 

{
"devEui": "0102030405060708",
"confirmed": true,
"fPort": 10,
"object": {
  "deviceId": 01020304AABBCCDD,
  "cmdType": 01,
  "cmdId": 01,
  "epochTime": 677FAA90
  }
}

 

 

Has anyone encountered a similar issue or can suggest how to resolve this?

Thanks in advance for your help!

Best regards,
Pratham

 

1 REPLY 1

@PrathamSalunkhe wrote:

I am working on an STM32WL-based device and have successfully operated downlink in LoRaWAN communication when using the following JSON payload format:


So where, exactly, are you specifying that JSON payload?

Are you sure that your JSON with an object field is valid for whatever system it is that you're using?

ie, what makes you think that the problem is with the STM32WL-based device - rather than elsewhere in the system?