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

    False value returned by lora.stats()

    Scheduled Pinned Locked Moved Issues & Bugs
    lora
    11 Posts 5 Posters 2.4k Views 5 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.
    • bmarkusB Offline
      bmarkus
      last edited by bmarkus

      lora.stats() returns false snr value:

      0_1501603969036_upload-605c8de0-3f00-461e-a4c2-652a544aefbd

      -50 dB is not possible, it looks a typical bug found in various LoRa implementations, division by 4 is forgotten. Real value is -12.5 dB.

      Close to the gateway I get 28 dB, where real value is 7 dB.

      S 1 Reply Last reply Reply Quote 1
      • J Offline
        jmarcelino
        last edited by

        @bmarkus
        Many modules do report this as it comes from the Semtech's Lora-Node implementation, but that is a raw value and so correct behaviour as long as the documentation reflects what it really is, it's not a bug.

        However LoPy's documentation does call it dB so it's incorrect.

        1 Reply Last reply Reply Quote 0
        • bmarkusB Offline
          bmarkus
          last edited by

          Regarding LoPy it is a bug. Not only because docs says it is dB but for applications no need to know the LoRa HAL. It is the reason why we have abstraction.

          1 Reply Last reply Reply Quote 0
          • D Offline
            daniel
            last edited by

            @bmarkus thanks. We'll fix this ASAP.

            bmarkusB 1 Reply Last reply Reply Quote 0
            • bmarkusB Offline
              bmarkus @daniel
              last edited by

              @daniel said in False value returned by lora.stats():

              @bmarkus thanks. We'll fix this ASAP.

              Thanks Daniel. One notice. Would be good to get a single precision float instead of integer not to loose precision.

              1 Reply Last reply Reply Quote 0
              • D Offline
                daniel
                last edited by

                @bmarkus yes of course, that's exactly how it's going to be :-)

                1 Reply Last reply Reply Quote 0
                • S Offline
                  stefan85e @bmarkus
                  last edited by

                  @bmarkus How do you get that stats from lora ? Just lora.stats()? Or something else before!?

                  sebS 1 Reply Last reply Reply Quote 0
                  • sebS Offline
                    seb @stefan85e
                    last edited by

                    @stefan85e

                    lora.stats() will return the stats shown previously, but it shows the stats of the last received packet, so you may be instantly valid when the module turns on, you may have to wait till the module receives some LoRa packets.

                    S 1 Reply Last reply Reply Quote 0
                    • S Offline
                      stefan85e @seb
                      last edited by

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • sebS Offline
                        seb
                        last edited by

                        Nope, lora.stats() will return a named tuple containing the stats, please see the docs: https://docs.pycom.io/chapter/firmwareapi/pycom/network/lora.html#lorastats

                        S 1 Reply Last reply Reply Quote 0
                        • S Offline
                          stefan85e @seb
                          last edited by

                          @seb Does that mean:
                          tx_power=14
                          lora.stats()
                          print(lora.stats())

                          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