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

Handling network server mac commands

Open SloMusti opened this issue 4 years ago • 3 comments

Using this library, I have observed issues and device hangs on receiving mac commands from the network server, for example receiving something similar to this: https://lorawan-packet-decoder-0ta6puiniaut.runkit.sh/?data=0708f80084500709c8088450070a98108450070b68188450&nwkskey=&appskey=

How is this handled in this library. It appears like ti should be implemented at low level. Anyone has experience by using various public networks?

SloMusti avatar Nov 19 '20 19:11 SloMusti

Requirement from a network provider provider: The “Data rate ACK” and “Power Ack” can be set to 0. The network server is only retrying the message because the Channel Mask Ack bit is set to 0 So a proper response will be with ADR OFF Data rate ACK 0 Channel Mask ACK 1 Power ACK 0

SloMusti avatar Nov 19 '20 20:11 SloMusti

There appears to be necessary support here https://github.com/GrumpyOldPizza/ArduinoCore-stm32l0/blob/c845a3b4b90b8a8fe95c6fedd4fa927dae14ba45/system/STM32L0xx/Source/LoRa/Mac/LoRaMac.c#L1641, investigating if this works or what must be done for it.

SloMusti avatar Nov 19 '20 20:11 SloMusti

Downlink messages are handled here and mac commands processed: https://github.com/GrumpyOldPizza/ArduinoCore-stm32l0/blob/c845a3b4b90b8a8fe95c6fedd4fa927dae14ba45/system/STM32L0xx/Source/LoRa/Mac/LoRaMac.c#L1084

SloMusti avatar Nov 19 '20 20:11 SloMusti