Vraag

LoRa MAC DeviceTimeReq often fails.

  • 2 October 2019
  • 1 reactie
  • 1023 keer bekeken

About a year ago Tim B has announced the introduction of the DeviceTimeReq MAC message. This MAC message is introduced in LoRaWan since version 1.0.3. And the KPN network is using 1.0.3 to my best knowledge, so it should support said MAC command.

And sometimes it does!.

I have tried using the DeviceTimeReq (0x0D) mac command. Once in a while I get the expected DeviceTimeAns (0x0D) reply back, but very often the network does not send a reply. Perhaps only 1 out of 6 times it works as expected.

But when it does work, I get an accurate network time

So, why does it only works sometimes?

Some details: my class C node is ADR connected and ran on SF9 during the experiments. The reported SNR and RSSI for application messages are well within the norm and upstream messages almost never get lost. I send the DeviceTimeReq MAC message as FRMPayload on port 0.

1 reactie

Sample of a working one:

---------------------------------------------------------------------------------
11:12:26 AM TX -> Transmitting 40 wakeup chars....
---------------------------------------------------------------------------------
11:12:26 AM TX -> LoRaWAN-HCI-Frame
Dst: 10 [LoRaWAN]
MsgID: 0D [Send UData Req]
Pay: [005] 00 0D 00 00 00
Port : [1] 00 (0x00) <---- port = 0
Payload1 : [1] 0D (0x0D) <---- DeviceTimeRequest
Payload2 : [1] 00 (0x00)
Payload3 : [1] 00 (0x00)
Payload4 : [1] 00 (0x00)
CRC E9 87 [ok]
Raw-Frame: [009]: 10 0D 00 0D 00 00 00 E9 87
Slip-Frame: [011]: C0 10 0D 00 0D 00 00 00 E9 87 C0

---------------------------------------------------------------------------------
11:12:26 AM RX -> LoRaWAN-HCI-Frame
Dst: 10 [LoRaWAN]
MsgID: 0E [Send UData Rsp]
Pay: [001] 00
Status : [1] 00 (0x00)
CRC 49 D9 [ok]
Raw-Frame: [005]: 10 0E 00 49 D9
Slip-Frame: [007]: C0 10 0E 00 49 D9 C0

---------------------------------------------------------------------------------
11:12:26 AM RX -> LoRaWAN-HCI-Frame
Dst: 10 [LoRaWAN]
MsgID: 0F [Send UData TX Ind]
Pay: [001] 00
Status / Format : [1] 00 (0x00)
CRC 91 C0 [ok]
Raw-Frame: [005]: 10 0F 00 91 C0
Slip-Frame: [008]: C0 10 0F 00 91 DB DC C0

---------------------------------------------------------------------------------
11:12:29 AM RX -> LoRaWAN-HCI-Frame
Dst: 10 [LoRaWAN]
MsgID: 10 [RX UData Ind]
Pay: [008] 00 00 0D 8A 2C BF 4A 6C
Status / Format : [1] 00 (0x00)
LoRaWAN Port : [1] 00 (0x00)
App-Payload-1 : [1] 0D (0x0D) <-- DeviceTimeAns
App-Payload-2 : [1] 8A (0x8A) <-- 5 bytes of time info
App-Payload-3 : [1] 2C (0x2C)
App-Payload-4 : [1] BF (0xBF)
Channel-Index : [1] 4A (0x4A)
DataRate Index : [1] 6C (0x6C)
CRC 02 77 [ok]
Raw-Frame: [012]: 10 10 00 00 0D 8A 2C BF 4A 6C 02 77
Slip-Frame: [014]: C0 10 10 00 00 0D 8A 2C BF 4A 6C 02 77 C0

But often the last frame I get afer about 2 seconds is a NoData indication, which is the way the IMST module tells you that it did not get anything in Rx1 or Rx2 after the DeviceTimeReq uplink treansmit.

Reageer