ArduinoCore-stm32l0 icon indicating copy to clipboard operation
ArduinoCore-stm32l0 copied to clipboard

Empty lora payload sent on port 0

Open jpmeijers opened this issue 3 years ago • 1 comments

If I send a lorawan message with an empty payload, even if I specify a port, the message is sent on port 0. This is invalid, as port 0 is reserved for mac commands.

Screenshot from 2021-03-03 08-47-07

jpmeijers avatar Mar 03 '21 07:03 jpmeijers

I believe the issue is related to this block of code: https://github.com/GrumpyOldPizza/ArduinoCore-stm32l0/blob/b1cf1cd6eba2f06bbe4edbe76aa43ae5971e8d8c/system/STM32L0xx/Source/LoRa/Mac/LoRaMac.c#L2308-L2310

The port is only added to the payload if the payload is > 0, but that should be >=0.

jpmeijers avatar Mar 03 '21 08:03 jpmeijers