Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    How to send/receive LORAWAN MAC Commands?

    Scheduled Pinned Locked Moved LoPy
    lorawanlopymactimertc
    3 Posts 2 Posters 744 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O Offline
      olivieroswald
      last edited by

      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?

      1 Reply Last reply Reply Quote 1
      • P Offline
        Paul Thornton
        last edited by Paul Thornton

        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.

        1 Reply Last reply Reply Quote 0
        • O Offline
          olivieroswald
          last edited by

          @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)
          
          1 Reply Last reply Reply Quote 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
          • 1 / 1
          • First post
            Last post

          Pycom on Twitter

          Pycom