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

    Disable lora on boot?

    Scheduled Pinned Locked Moved LoPy
    8 Posts 4 Posters 126 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.
    • K Offline
      kjm
      last edited by

      Is there a way to stop the lora radio on the lopy4 powering up automatically? Something like 'pycom.lora_on_boot(0)' or 'pycom.lora_modem_en_on_boot(0)' ?

      robert-hhR 1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @kjm
        last edited by

        @kjm No. Lora is always initialized when the Micropython task starts or restarts.

        K 1 Reply Last reply Reply Quote 0
        • K Offline
          kjm @robert-hh
          last edited by

          @robert-hh Well that's a pain Rob because my adc readings are always better with the radios off.

          rcolisteteR J 2 Replies Last reply Reply Quote 0
          • rcolisteteR Offline
            rcolistete @kjm
            last edited by

            @kjm LoPy4/ESP32 ADC ? If so, it is better to use an external ADC as ESP32 ADC has many issues :
            https://github.com/bboser/IoT49/blob/master/doc/analog_io.md

            My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

            1 Reply Last reply Reply Quote 0
            • J Offline
              jcaron @kjm
              last edited by

              @kjm Even if the chip is powered, I doubt the radios will be doing anything unless you attempt a join, send a packet, or switch to class C.

              K 1 Reply Last reply Reply Quote 0
              • K Offline
                kjm @jcaron
                last edited by

                @jcaron Possibly, but even with the wifi/lte radios at idle there is jitter in the adc readings that isn't there when they're off & I'm guessing it will be likewise for lora. The problem with the lora radio is that I don't trust it. I've already found an example of it trying to join a gateway every 37s indefinitely after the program that initially ran the lora.join command had terminated due to a failure to get a join accept from the gateway.

                J 1 Reply Last reply Reply Quote 0
                • J Offline
                  jcaron @kjm
                  last edited by

                  @kjm No, it's quite different IMHO. Wi-Fi and LTE actively maintain connections, so even if you don't send anything, the underlying stack will send keepalives and similar things in the background. Depending on settings, the radio may also be actively listening, which means trying to decode whatever they receive, even if it's just noise. Some power-saving modes will reduce, change or disable this behaviour.

                  LoRaWAN does not maintain connections. Once you've joined, it assumes you're still on the network, and does not try to check if a gateway is reachable or anything.

                  It will transmit:

                  • When you join (as you noted, once you've started the join procedure, it continues trying to join);
                  • When you send a packet

                  It will be listening (in class A):

                  • At the right time after each join request
                  • At the right time after each uplink

                  Other than that, the radio is completely idle. That's a design goal of LoRaWAN to save as much energy as possible.

                  LoRa.join does not terminate when it doesn't receive a join accept, it always returns immediately, and just initiates the join process (with retries) in the background.

                  1 Reply Last reply Reply Quote 2
                  • rcolisteteR Offline
                    rcolistete
                    last edited by

                    The 2 above comments are about OTAA, but ABP has a 'join' that has no transmit/listening AFAIK.

                    My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

                    1 Reply Last reply Reply Quote 1

                    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