ImportError: cannot import name LoRa
-
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.2instead 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.1And if I try :
from network import WLANit 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.
-
@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/
-
@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. -
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
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