ArduinoCore-stm32l0
ArduinoCore-stm32l0 copied to clipboard
Empty lora payload sent on port 0
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.
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.