ImperialSpaceSociety / picotracker-Lora

This is the code base and hardware design files for the Lora pico tracker to be flown around the world
13 stars 3 forks source link

First transmission after boot contains empty frame #46

Closed MedadRufus closed 3 years ago

MedadRufus commented 3 years ago

This is present in EU868 and US915 settings. Not tested on AS923. It apparently happens when packet size is large for EU868; otherwise, in small packets, this problem does happen.

MedadRufus commented 3 years ago

Seems like in the first tx, the max payload size is the size for DR0. For EU868 its 51 and US915 its 11 bytes.

Max payload size is determined here: https://github.com/ImperialSpaceSociety/picotracker-Lora/blob/e4c69432c70054fe17441823a9cea540fa57e12c/Software/Middlewares/Third_Party/LoRaWAN/Mac/LoRaMac.c#L3358

The data rate gets set to 0(DR_0) although I have hardcoded it to be DR_4

MedadRufus commented 3 years ago

https://github.com/ImperialSpaceSociety/picotracker-Lora/blob/e4c69432c70054fe17441823a9cea540fa57e12c/Software/Middlewares/Third_Party/LoRaWAN/Mac/LoRaMac.c#L3351 This is where the datarate is set(to 0).