How to send/receive LORAWAN MAC Commands?
-
I need to ask the network for the current time using the DeviceTimeReq/DeviceTimeAns MAC Commands introduced in LORAWAN 1.0.3. How can I achieve this?
-
Hello Olivieroswald.
I asked the firmware team and currently, we have no support for doing this in the firmware. Unfortunately, I don't currently have a time frame for when/if it will be enabled.
However. If you simply need a timestamp. Perhaps lora.stats() could be of help, It has a rx_timestamp property that may be of use. more details here: https://docs.pycom.io/firmwareapi/pycom/network/lora.html#lorastats
Edit: Further conversation has revealed that the lora stats would only be accurate at the gateway side and not the node. this may not do what you require unless you also control the gateway and could send it down to the client from the gateway. but even then it will still be as inaccurate as the air time taken to transfer it.
-
@paul-thornton said in How to send/receive LORAWAN MAC Commands?:
https://docs.pycom.io/firmwareapi/pycom/network/lora.html#lorastats
I'm not sure whether lora.stats() rx_timestamp is of use, it does not seem to represent a time value, but if it does, how do I convert it?
[LORA ] 2019/02/21 04:51:55 (rx_timestamp=0, rssi=0, snr=0.0, sfrx=0, sftx=0, tx_trials=0, tx_power=14, tx_time_on_air=0, tx_counter=0, tx_frequency=0) [LORA ] 2019/02/21 04:52:04 (rx_timestamp=30539834, rssi=-45, snr=7.0, sfrx=3, sftx=5, tx_trials=1, tx_power=0, tx_time_on_air=57, tx_counter=0, tx_frequency=0) [LORA ] 2019/02/21 04:52:11 (rx_timestamp=38155453, rssi=-38, snr=8.0, sfrx=3, sftx=5, tx_trials=1, tx_power=0, tx_time_on_air=47, tx_counter=1, tx_frequency=0) [LORA ] 2019/02/21 09:04:47 (rx_timestamp=45778581, rssi=-43, snr=8.0, sfrx=3, sftx=5, tx_trials=1, tx_power=0, tx_time_on_air=47, tx_counter=2, tx_frequency=0) [LORA ] 2019/02/21 09:15:32 (rx_timestamp=690412324, rssi=-47, snr=6.0, sfrx=5, sftx=5, tx_trials=2, tx_power=0, tx_time_on_air=57, tx_counter=4, tx_frequency=0) [LORA ] 2019/02/21 09:15:38 (rx_timestamp=696682500, rssi=-48, snr=6.0, sfrx=5, sftx=5, tx_trials=1, tx_power=0, tx_time_on_air=57, tx_counter=5, tx_frequency=0) [LORA ] 2019/02/21 09:15:44 (rx_timestamp=702935506, rssi=-47, snr=6.0, sfrx=5, sftx=5, tx_trials=1, tx_power=0, tx_time_on_air=57, tx_counter=6, tx_frequency=0)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register Login