Changing lora transmit interval using downlink payload

I want to change the hex downlink payload to include a command to set the APP_TX_DUTYCYCLE to 5 minutes within a downlink data packet. Given the packet structure “0158232352455345542323BAE6FF” (X##RESET##ºæÿ),
how should I modify this packet to include the new command right before the CRC-16 value?

Downlink Structure
[Packet Num]: Arbitrary number, let’s use 01.
[88]: Calling soft reset function mode.
[##RESET##]: 232352455345542323.
[CRC-16]: BAE6.
[0xFF]: Indicates the end of the transmitted packet.

Adjusted Structure
Packet Num: 01.
Reset Function Mode: 88.
Matching String: ##RESET## as 232352455345542323.
CRC-16: BAE6.
End of Packet: FF.
Complete Packet
fport is 99

Additional information that might be helpful:

ComputedCRC = BAE6

[01] [58] [23] [23] [52] [45] [53] [45] [54] [23] [23] [BA] [E6]

Performed remote soft reset <<<

Debug: USART2

FW_VERSION: V1.1.2 R2

APP_VERSION: V1.1.0 MW_LORAWAN_VERSION: V2.3.0 MW_RADIO_VERSION: V1.1.0

OTAA Settings

DevEui: 383735326F306913 JoinEui: 0105010808010208 AppKey: 367E99AA28A2D2A6CCF7158899CF4F3C

*** Loading System settings from EEPROM *** APP_TX_START_DUTYCYCLE = 10 sec APP_TX_DUTYCYCLE = 15 min RTC_WDG_TIMEOUT = 20 min CURRENT STORED FLASH LOCATION : 0x8018000 LAST STORED FLASH LOCATION : 0x8018000 VL53L1X PEOPLE HEIGHT THRESHOLD DETECTION LEVEL = 80 cm VL53L1X DOOR HEIGHT THRESHOLD DETECTION LEVEL = 200 cm
TIMING BUDGET = 20 ms

*** Start of RTC RX8900CE initialization ***

RTC RX8900CE initialisation → Done <<< *** Start of VL53L1X initialisation *** → Chip booted! → Set registers to default → Identification Check - OK, ID : 0xEACC → Sample Count: [20/20], Floor height = 1.92 m <<< → Initialization completed!

*** Initiate LoRAWAN Connectivity Join ***

JOINED → OTAA <<<

APP_TX_DUTYCYCLE = 15 min
how do i change APP_TX_DUTYCYCLE = 5 min

Extra info: This is kind of like the reply after i send the downlink payload
example: 260801
[26] - Indicate reply acknowledgement
[08] - The return packet number that used earlier
[01] - Received data, CRC-ok, [0] - CRC-error

mostly when i try to change the downlink payload it replies with 26 01 00 and 26 05 00 as i keep failing the crc.

@brocaar or anyone who understands downlink payload, hope you guys can get to me as soon as possible. Thanks for reading.

Hi,

The most important information is missing. What device/sensor/programming environment are you talking about?

Based on the log information, it looks like you’re asking for help with some kind of “people counter” project? You are testing something like this: DIY Laser People Counter

The (LoRa)problem itself is not difficult to solve by changing the value of the APP_TX_DUTYCYCLE variable/timer in the sensor’s firmware code (if you have access to the source code and have a programming environment, tools).

Maybe you should ask help from “people counter” -project site? Maybe the problem is better understood there?


Good luck

Thank you for answering my question. It was very insightful.

Can I ask how is it possible to use lora for arduino?

So far when i use lora devices i dont use arduino. And thus far i have only been able to connect devices i have bought to connect to the gateway.

I saw this project from the insstructables site. Agri-Stick : 28 Steps (with Pictures) - Instructables

Assuming if i want to build something similiar how is it that arduino is able to connect using lora? and not using esp8266 or 32 wifi module

`
Hi,

Assuming if i want to build something similar how is it that arduino is able to connect using lora? and not using esp8266 or 32 wifi module

Check out step 12 “CIRCUIT IN EAGLE PCB FOR AGRI” in the article. RA-02 (the lora chip, wireless LoRa RFM95W) is connected to ARDUINO nano board in the circuit diagram.

The Arduino LoRa code example can be found in step 25 “Arduino Code for Agri-Stick” in the article.

Try google about LoRA, RA-02 and Arduino. For example:

There are a lot of cheap postage stamp size Soc chips that have the LoRa radio part and the MCU on the same package. (e.g. STMicroelectronic: STM32WL Series, AI-thinker RA-09, RA-08 … ). One cheap chip can do all the job.

For example, something like this tiny prototype board.

G3D

But that’s another story how to …

You may get better advice from other forums regarding specific hardware topics for your project.

1 Like