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

    ImportError: cannot import name LoRa

    Scheduled Pinned Locked Moved Expansion Board
    pygatewipy3.0gatewayimporterrorloramac
    4 Posts 2 Posters 72 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.
    • D Offline
      Dominique popek
      last edited by

      Hi,

      I'm stuck with this error on VSCode :
      Using Pygate + Wipy3
      Had already :

      • updated firmware (Wipy3) using pycom firmware updater using different options (pybytes / pygate / local file)
      • actually running a downgrade firmware for pygate release :
      Pycom MicroPython 1.20.2.rc11 [v1.11-d574024] on 2020-08-25; WiPy with ESP32
      Pybytes Version: 1.5.2
      

      instead of latest wipy version : (which also did the import Error)

      Pycom MicroPython 1.20.2.r3 [v1.11-044dfea] on 2020-12-23; WiPy with ESP32
      Pybytes Version: 1.6.1
      

      And if I try :

      from network import WLAN
      

      it works well meaning network module is available....

      From the documentation I read :

      LoRa
      This class provides a LoRaWAN 1.0.2 compliant driver for the LoRa network processor in the LoPy, LoPy4 and FiPy.
      

      I can't believe this class is not available for WiPy ?!

      Any Idea ?

      As Without LoraMAC it's impossible to register in TTN.

      J D 2 Replies Last reply Reply Quote 0
      • J Offline
        jcaron @Dominique popek
        last edited by

        @Dominique-popek what exactly are you trying to do? The WiPy does not have LoRa support, and the LoRa class is used solely for the LoRa chip in the LoPy and FiPy (which are end-devices, not a gateway like the Pygate). It’s not relevant for the Pygate.

        Just follow the instructions in the Pygate docs: https://docs.pycom.io/tutorials/expansionboards/pygate/

        D 1 Reply Last reply Reply Quote 2
        • D Offline
          Dominique popek @jcaron
          last edited by

          @jcaron Thanks.

          My aim is to register the pygate as new LORAWAN gateway at TTN.
          First thing to register is the EUI of the gateway (which I supposed was on the Pygate board).
          And so following the pygate tutorial and the pycom documentation, I found this code to get the EUI of a LORA module :

          from network import LoRa
          import ubinascii
          
          lora = LoRa()
          print("DevEUI: %s" % (ubinascii.hexlify(lora.mac()).decode('ascii')))```
          
          So now I understand that with my WiPy chip that's not the good way to get my devEUI of the pygate.
          1 Reply Last reply Reply Quote 0
          • D Offline
            Dominique popek @Dominique popek
            last edited by

            Finally, my problem is Solved :

            With pygate, no need to register the device EUI, just create one from scratch ! (and edit config.json accordingly) as the doc says

            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