ESP32 and LoRa

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Barni
Posts: 2
Joined: Mon Dec 10, 2018 8:14 pm

Re: ESP32 and LoRa

Post by Barni » Mon Dec 10, 2018 8:43 pm

Hello Robert,
You write that with a revision> 0 SPRAM is used.
In which file will this query take place.
I want to connect the SX1276 different, in which file I set the GPIO ports.
I would like to compile my own version.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: ESP32 and LoRa

Post by Roberthh » Mon Dec 10, 2018 9:21 pm

This is not a single place. There is a call to esp_get_revision() and esp_chip_info() in various places. You must change all places where esp_get_revision() and esp_chip_info() is called and hard code the '0' branch. Grep will tell you the places. The relevant files are main.c and mpthreadport.c and mptask.c. Maybe making a wrapper is more elegant.
But I abandoned that approach to use Pycom firmware on generic ESP32 devices. It was a nice exercise, but not of reasonable value. After all, WiPy's are not that expensive and of sound quality.

uCTRL
Posts: 47
Joined: Fri Oct 12, 2018 11:50 pm

Re: ESP32 and LoRa

Post by uCTRL » Tue Dec 11, 2018 3:23 am

After all, WiPy's are not that expensive and of sound quality.
https://pycom.io/webshop/

You must have shares in Pycom or get paid a commission.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: ESP32 and LoRa

Post by Roberthh » Tue Dec 11, 2018 6:18 am

Not at all. But I had quite a few troubles with cheap crap. Of the 6 or so generic ESP32 boards only the Sparkfun device works without problems. At that one is in the price range of a WiPy. The other five (Wemos) work more or less. Two of them required physical rework (bad soldering), another one is crashing always after a few minutes. I did not have problems like these with devices from Adafruit, Pycom, Sparkfun. So that's my personal experience & opinion.
Edit: Similar experience with genuine Pyboards (reliable) and Pyboard clones (not reliable).
Edit2: Additionally it is ongoing work to keep your "special" build in sync with the mainline. You might get tired to do this after a while. But, as said, doing that port once is a good learning exercise.

Bernd67
Posts: 2
Joined: Sun Jan 14, 2018 6:22 pm

Re: ESP32 and LoRa

Post by Bernd67 » Tue Dec 18, 2018 8:43 pm

Hello,
was somebody able to make Loboris Lora example work? It can be found in https://github.com/loboris/MicroPython_ ... mples/lora. Unfortunately I wasn‘t able to make it run.

Currently the only way for me to use lora with micropython on ESP32 is this solution https://github.com/MZachmann/LightLora_MicroPython - but that doesn‘t support TTN. Maybe we could use this and add the TTN-Part?

User avatar
mattyt
Posts: 410
Joined: Mon Jan 23, 2017 6:39 am

Re: ESP32 and LoRa

Post by mattyt » Wed Dec 19, 2018 2:51 am

Might be worth mentioning that Adafruit recently published an updated article about Using LoraWAN and The Things Network with CircuitPython, along with a CircuitPython library, TinyLoRa, that can control RFM9x devices. It only supports ABP, not OTAA, but I expect this will come in time.

It looks trivial to convert to MicroPython.

Hopefully this is useful to someone?

I know that there is a MicroPython meetup group in Perth, Australia that is looking to extend this library too...

fantasticdonkey
Posts: 1
Joined: Sat Apr 20, 2019 7:26 pm
Location: UK
Contact:

Re: ESP32 and LoRa

Post by fantasticdonkey » Sat Apr 20, 2019 8:01 pm

[quote=mattyt post_id=32724 time=1545187882 user_id=2488]
Might be worth mentioning that Adafruit recently published an updated article about [url=https://learn.adafruit.com/using-lorawa ... n/overview]Using LoraWAN and The Things Network with CircuitPython[/url], along with a CircuitPython library, [url=https://github.com/adafruit/Adafruit_Ci ... n_TinyLoRa]TinyLoRa[/url], that can control RFM9x devices. It only supports ABP, not OTAA, but I expect this will come in time.

It looks trivial to convert to MicroPython.

Hopefully this is useful to someone?

I know that there is a MicroPython meetup group in Perth, Australia that is looking to extend this library too...
[/quote]

Thanks for the suggestion. This is exactly what I did in the end to allow MicroPython running on ESP32 to perform unconfirmed data up to a TTN LoRa gateway. As is the case with the [url=https://github.com/adafruit/Adafruit_Ci ... n_TinyLoRa]Adafruit CircuitPython TinyLora library[/url] this has been forked from, it only works with node in ABP Activation Method.

https://github.com/fantasticdonkey/uLoRa

I've tested this in the south of the UK, against a number of publicly available TTN gateways, using a HelTec Automation ESP32 LoRa development board V2 (equipped with a Semtech SX1276).

apois
Posts: 8
Joined: Thu Nov 15, 2018 8:49 pm

Re: ESP32 and LoRa

Post by apois » Sat Sep 28, 2019 11:57 am

Hi - are there any updated recommendations for pure Micropython Lora libraries - are any of the ones described above "stable" (loboris/MZachmann/Wei1234c)?

I tried a Lopy a year or two ago and had a few issues with timings in the Lora firmware and hardware (deep sleep) (although I think Pycom have resolved these on newer devices). I've now got hold of a Heltec ESP32 with lora and would like to try again.

I think I only need ABP auth support. It would be nice to be able to use a pure Micropython driver so that I can keep up with latest ESP32 Micropython builds and just drop the driver in to projects when needed, as it's just an SPI device.

Glagnar
Posts: 2
Joined: Sat Oct 24, 2020 9:31 pm

Re: ESP32 and LoRa

Post by Glagnar » Sat Oct 24, 2020 10:30 pm

I am using this library - works pretty well.

https://github.com/lemariva/uPyLoRaWAN

lposada
Posts: 1
Joined: Thu Jun 10, 2021 9:00 pm

Re: ESP32 and LoRa

Post by lposada » Thu Jun 10, 2021 9:02 pm

Glagnar wrote:
Sat Oct 24, 2020 10:30 pm
I am using this library - works pretty well.

https://github.com/lemariva/uPyLoRaWAN
I'm using that library, but the downlink doesn't works. did it work for you?

Post Reply