I would like to use MicroPython to make an OTAA join request Node. My node is an ESP32 + SX1276 node. The LoRaWAN lib that I have seen so far is uLoRaWAN (GitHub - mallagant/uLoRaWAN: LoRaWAN implementation in MicroPython). Is there anyone success using this lib with MicroPython on ESP32.
As there does not seem to be any handling of MAC commands, whilst you may be able to get a join, youâll find all the settings that are sent by the Network Server canât be processed unless you write the code for that.
Thank you Nick. It seems that it is uncomplete lib. Hope someday, there will be an usable one.
If you look there are already plenty of threads here on how to correctly use the mostly working LoRaWAN library that is available for ESP32 hardware.
It just wonât be micropython.
This library work with CircuitPython and Pi Pico, hope someone can port it to run on ESP32 and MicroPython.
What is stopping YOU from doing it?
I tried for a few weeks without success. I have only basic skill of MicroPython.
So tell us where you got stuck and perhaps you can finish it off which will be so much better for you and will get the job done.
Or if anyone does want to do the port, they get a head start based on your experiences.
Whereas hoping someone will start from scratch may result in a very long wait.
I decided to try this lib GitHub - GereZoltan/LoRaWAN: Possibly complete LoRaWAN implementation in micropython with SX1262 with my Heltec LoRa V.3
Then I found that this library is only LoRaWAN 1.0 which TTS is not supported. Then, I try with Chirpstack .
Mac command processing part is not correct. So, it stops working after receiving Mac Command.
Blockquote>>> %run -c $EDITOR_CONTENT
This is the LoRa temperature and humidity measurement application.
Unique board ID:
f412fa81648c
Initializing SX1262 radio module
LoRa module has been initialized.
Sending Join request:Done
Message received in RX1:Join-AcceptMIC: Valid
OTAA activation successful!
Queue length: 1
[(2, 0, [1, 103, 0, 255])]
FCntUp: 0 FCntDown: -1
Highest priority is: 2 at index: 0
Sending unconfirmed data
Current FCntUp: 0
FrameCount: 0 NbTrans: 1
TxDone on 923.2 Hz, DR: 0
Message received in RX1 window: DR: 0 at 147997 Valid
Processing frame: Unconfirmed Data down
Processing MAC Commands
NEWCHANNEL DEVSTATUSSNR: 5.5
Traceback (most recent call last):
File ââ, line 31, in
File âLoRaWANHandler.pyâ, line 938, in send
File âLoRaWANHandler.pyâ, line 772, in ProcessFrame
File âLoRaWANHandler.pyâ, line 695, in ProcessMACCommands
TypeError: unsupported types for rshift: âfloatâ, âintâ
If I skip Mac Command part, it seems working find so far.
Using a v1.0.0 stack that was last updated 3 years ago to add fport from a repro that was last updated 7 years ago is like buying an old rusty car that does to run well with flat tyres and hoping it will keep you safe on the motorway.
This and you using Chirpstack (this forum is TTN/TTI only as itâs funded by TTI) and turning off MAC commands I think brings this attempt to find a MP LW offering to a close.
It would be far far simpler for you to port the CircuitPython offering to MicroPython OR you could use CircuitPython.
Yes, you are right. Unfortunately, it is an old Lib. Hope someone can improve it to work with TTN in the future. There are many works that need to be done, such as Mac Command Processing and change to new LoRaWAN version.
I put all modified files that I have done so far in GitHub - m2mlorawan/heltecV.3LoRaWAN
(Modify for Heltec V.3, AS923)
The LW spec is complex, why try and update software so old when you could just copy the CircuitPython over to MicroPython.
Or just use MicroPython.
Buy you never seem to comment on any of these observations so probably time to stop.
If you mean using CircuitPython lib from GitHub - BNNorman/CircuitPython-LoRaWAN: CircuitPython LoRaWAN code to work with the HopeRF RFM95,
I have two problems with it. The first one is that it works with SX1276 which is older than SX1262. The Second is the author said he found some problem with ESP32 doit board. I do not have a PI to test and I also not familiar with NVM both in MicroPython and CircuitPython but I will try ithis lib on Heltec LoRa V.2 soon.
Problem solved.
Pycom MicroPython works perfectly both OTAA and ABP on ESP32. Downlink also works fine.
This is a repro that hasnât had an update in 3 years from a company that has ceased trading with a copy of LoRaMac-node with a copyright notice from 2013 that supports LW v1.0.X.
Leaving aside 9 years of bug fixes, I wonder if you know what that X is and what material differences are between that X and the more recent versions and what impact that may have on the shared community network that you get for free.
So whilst you may now have what you want, you are driving an old rust bucket that is making a squealing noise and belching smoke from the exhaust on a communal highway.
First-hand experience here with 60 now-retired Pycom nodes: their LoRaWAN stack will and would never ever ever pass certification, to put it positively. Iâve had to apply some quite extreme hacks to get them to behave somewhat nicely.
I saw there is still some movement on their firmware release page.
This was released on Oct 28, 2021
I know that it is old LoRaWAN 1.0.2, but better than nothing working. I mean for MicroPython.
Maybe for you, but how about all the other users of the airwaves your are sharing with?
There are plenty of other poor / old implementations around, itâs just not progress if we start resurrecting them.