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

    Trying to import LoRa but the package is not installed and where do I get it?

    Scheduled Pinned Locked Moved Getting Started
    4 Posts 2 Posters 43 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.
    • G Offline
      Gary Kuipers
      last edited by

      Hi All:

      I am not a newbie to python but I am to MicroPython and LoRa. So please be gentle :-)

      The first and simplest exaple I picked starts with:
      from network import LoRa

      from network import LoRa
      Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      ImportError: can't import name LoRa

      I know about upip and I know the micropython-lib exists on github. What I do not know is how to translate:
      import LoRa
      into a package name so I tried what I believed to be logical ideas, all of which returned with errors:

      upip.install('LoRa')
      upip.install('lora')
      upip.install('pylora')
      upip.install('pyLoRa')
      upip.install('ESP32-micropython-lora')

      and some other sillier attempts that devolved into burning insence and praying to strange gods that I would get lucky ... nope!

      In any event, If I could get some orientation I would appreciate it. Happy New Year! Let's hope it is 2022 and not 2020 TOO

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

        @Gary-Kuipers LoRa is part of the firmware for devices with LoRa hardware. So if you cannot import it, you may either have the wrong firmware or the wrong hardware.

        1 Reply Last reply Reply Quote 1
        • G Offline
          Gary Kuipers
          last edited by

          Robert! Thanks for answering. I amy have been jumping the gun. I was trying to run this piece of code from pycom:

          https://docs.pycom.io/tutorials/networks/lora/lora-mac/

          The first line of which is the statement that is giving me problems.

          If you have any ideas as to why this would be in example code please let me know. Meanwhile I will try the "read EVERYTHING" approach.

          Thanks for helping.

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

            @Gary-Kuipers Which Pycom board do you use? LoRa works with LoPy and FiPy.

            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