PyGate-assert Failed Error
-
Hello
I just received my Pygate and Lopy4. As per the documentation on the site, I went ahead and uploaded the firmware using the Firmware update utility. I made sure that I selected the pygate option under it. I also choose to register on Pybtes and copied the activation code to the utility and successfully downloaded the firmware.
When the controller rebooted, it did not connect to pybytes and I am getting the below error before the stack details are thrown on the console
and the controller keeps rebooting
I cannot find much help on google/pycom forums about this.
Regards
Sachin Dayma
-
To your first question. It is correct you have to generate your own EUI to register your Pygate on the TTN network.
To your second question, the example mentioned here: https://docs.pycom.io/tutorials/networks/lora/lorawan-otaa/ definitely works for me (I am not sure of the exact differences between the examples) you should be able to send messages to your Pygate when configured with the correct connection details. This indeed has to do with setting the correct
dev_eui
(next to theapp_eui
andapp_key
).If you are also receiving other LoRa packets in the TTN console through your Pygate gateway (send by nodes in your area), the Pygate is configured correctly.
-
@Gijs
I am not sure if the question I am trying to ask is related here. When I was registering the gateway on TTN, under the gateway ID i generated my own id (I suspect this should have been the EUI of pygate). The gateway was still able to connect to TTN.I registered my lorawan node on TTN (Its a pysense +lopy4). I got the EUI by running the code below
The lopy4 on Pysense is running the sample code as provided in the git hub (lora-nano-gateway- oota node.py). When I run both the pygate and Pysense, the lora.has_joined() never returns a True. I can see my activaation request reaching TTN.Could this be due to wrong EUI on TTN for pygate? I tried to follow the same piece of code as on pysense to get the EUI but that enabled the lora on Lopy4 and got me into the same error of assert failure.
-
@Gijs
I got it to work without the pybytes and cleaning the device. I just copied all the example files. I initially had some confusion with the router address on TTN (ttn-router-asia-se) and used it in the server address of config. It kept on failing.I eventually got it working with the server address of "router.eu.thethings.network".
-
The LoRa.OTAA timeout is still a Pybytes thing. Can you use the firmware updater, and clear the whole device (check all the marks in this screen). Also deselect the Pybytes checkmarks in the screen before that, lets make it work without Pybytes first.
And then upload the example. Make sure you keep therouter
in theserver address
like so"server_address": "router.eu.thethings.network"
(you can change theteu
to your region of course)Let me know how that goes!
-
@Gijs
I think I am out of the situation where lora on the LoPy is enabled. I cannot be 100% sure though. But my pygate is not connecting to TTN.When I boot my pygate now, it first tries to join Lora. I get the message Trying to join LoRa.OTAA for 120 seconds but it eventually times out. Onlly after the timeout I get the messages for Initialized watchdog for WiFi and LTE connection with timeout 1260000 ms
WiFi connection establishedMy project setup is pretty simple (image below) and I have copied the text from the pygate documentation under tutorials but yet the connection fails. I have no devices right now to connect to pygate but I would still like to have the connection to things network.
I have generated an ID on the TTN and I have put it under the config along with the server address. My suspicion is that the pygate is trying to connect to TTN even before the WiFi is enabled and causing the timeout
-
@sachindayma said in PyGate-assert Failed Error:
went to pybytes and disabled lora . I pressed deploy configuration button but that didn't seem to help as the chip had never connected to pybytes
Hi,
We are evaluating how to give a better error message, it is not a common use-case to use the Lopy4's LoRa radio in combination with the Pygate, as they are right on top of each other (quite literally).
You should disable LoRa connection to PybytesDoes the Pygate work for you now as expected?
If the LoRa keeps activating itself, you can click
download from device
in the pymakr plugin in Atom or VSCode.
This will download a file calledpybytes_config.json
. In there, it has an entry for network preferences, remove thelora
entry in the list so only wifi is left:"network_preferences": ["wifi"]
Best
-
I am completely new to Lora/PyCom and have been relying heavly on the pycocm documentation.
- I went to pybytes and disabled lora . I pressed deploy configuration button but that didn't seem to help as the chip had never connected to pybytes
- The error would not stop at all and I tried firmware update a couple of times which didn't help either. I hit Ctrl+C on the VS Code terminal and did os.fsformat('/flash') looking in to the safe boot configuration. That bought me to REPL without any errors but no message displayed
- I went to firmware update tool disabled the Pybytes config option and downloaded the firmware. Then again I downloaded the firmware with the pybytes option selected. This time though i got a different set of message on the terminal as below.
WMAC: FCF5C40E0A80
Firmware: 1.20.2.rc10
Pybytes: 1.5.1
Trying to join LoRa.OTAA for 120 seconds...
LoRa connection timeout: 120 seconds
Initialized watchdog for WiFi and LTE connection with timeout 1260000 ms
WiFi connection established
Connected to MQTT mqtt.pybytes.pycom.io
Pybytes connected successfully (using the built-in pybytes library)
Pybytes configuration read from /flash/pybytes_config.json
Pycom MicroPython 1.20.2.rc10 [v1.11-a159dee] on 2020-06-26; LoPy4 with ESP32
Pybytes Version: 1.5.1
Type "help()" for more information.I am connected to pybytes now.
-
Hi,
It seems as if you are trying to use the Lopy4 LoRa radio. Since both the Pygate and Lopy4 LoRa radios are connected through the same communication bus, this will cause theassert failed!
error.Either disable the LoRa connection in pybytes, and/or remove the code where you try to use the LoRa radio of the Lopy4. Also, make sure you attach the LoRa antenna to the Pygate, and not to the Lopy4 module :)
The tutorial here: https://docs.pycom.io/tutorials/pygate/ gives a clear example on what to do.Let me know whether that solves your problem!
Best
-
Firmware: 1.20.2.rc10
Pybytes: 1.5.0
/home/peter/docs/pycom-esp-idf/components/freertos/event_groups.c:498 (xEventGroupClearBits)- assert failed!
abort() was called at PC 0x40099304 on core 1ELF file SHA256: 0000000000000000000000000000000000000000000000000000000000000000
Backtrace: 0x40090197:0x3ffe26e0 0x40090319:0x3ffe2700 0x40099304:0x3ffe2720 0x4011842b:0x3ffe2740 0x40118939:0x3ffe2760 0x401189ac:0x3ffe2890 0x4010c7de:0x3ffe2900 0x401043f1:0x3ffe2920 0x40111a21:0x3ffe2940 0x401080e0:0x3ffe29e0 0x401043f1:0x3ffe2a10 0x40104481:0x3ffe2a30 0x40111aaf:0x3ffe2a50 0x401080e0:0x3ffe2af0 0x401043f1:0x3ffe2b60 0x40104481:0x3ffe2b80 0x40111aaf:0x3ffe2ba0 0x401080e0:0x3ffe2c40 0x401043f1:0x3ffe2c70 0x40104481:0x3ffe2c90 0x40111aaf:0x3ffe2cb0 0x401080e0:0x3ffe2d50 0x401043f1:0x3ffe2dd0 0x40104481:0x3ffe2df0 0x40111aaf:0x3ffe2e10 0x401080e0:0x3ffe2eb0 0x401043f1:0x3ffe2f30 0x40104481:0x3ffe2f50 0x4010ca8b:0x3ffe2f70 0x4010c7de:0x3ffe2fc0 0x401043f1:0x3ffe2fe0 0x40111a21:0x3ffe3000 0x401080e0:0x3ffe30a0 0x401043f1:0x3ffe3120 0x4010441e:0x3ffe3140 0x400e1eb9:0x3ffe3160 0x400e2181:0x3ffe3200 0x400e09ee:0x3ffe3230
-
Hi @sachindayma please copy and paste the
Backtrace: ....
line.