ESP32 Long Range Mode 1 km

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
User avatar
iotman
Posts: 52
Joined: Sat Feb 02, 2019 4:06 pm
Location: Nanoose Bay, Canada
Contact:

ESP32 Long Range Mode 1 km

Post by iotman » Sat Oct 05, 2019 11:17 pm

Hi, just wondering if anyone has used Micropython with the new Long Range (LR) mode for the ESP32? It apparently can do over 1 km without a special antenna (line-of-sight); here's an article:

https://www.hackster.io/news/long-range ... 29ab89f450

Tks, AB

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: ESP32 Long Range Mode 1 km

Post by jimmo » Sun Oct 06, 2019 2:41 am

That looks really interesting! Looks like it should be really easy to implement too. Looks like someone already added the various mode constants (e.g. network.MODE_11B, but missing MODE_LR). No corresponding way to use these constants though (yet). Should be possible to add another config option (i.e. if.config('protocol', network.MODE_LR) ) which would be a few lines in modnetwork.c / esp_config to call esp_wifi_set_protocol.

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: ESP32 Long Range Mode 1 km

Post by jimmo » Sun Oct 06, 2019 9:15 am

This just showed up in my YouTube subscriptions: https://youtu.be/2rujjTOPIRU

User avatar
iotman
Posts: 52
Joined: Sat Feb 02, 2019 4:06 pm
Location: Nanoose Bay, Canada
Contact:

Re: ESP32 Long Range Mode 1 km

Post by iotman » Sun Oct 06, 2019 3:03 pm

Hi @jimmo, yep, I think this could be a bit of a game changer. We support Andreas through the Patreon system so I have already seen that video, but I'm glad he has released it to Youtube because it should help stimulate further interest.

We have been discussing the BLE applications for the ESP32 on a separate forum topic, but I see this as being directly related. As I mentioned in the other discussion, we love the fact that BLE sensors typically run for a year on small button batteries, but the big limitation is the range. We are using the ESP32 as a "range enhancer/converter" to aggregate sensors and convert the data to MQTT for cloud applications and Node-RED.

So this new Long Range LR mode is coming at a perfect time!

Cheers, AB

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: ESP32 Long Range Mode 1 km

Post by pythoncoder » Sun Oct 06, 2019 3:34 pm

jimmo wrote:
Sun Oct 06, 2019 9:15 am
This just showed up in my YouTube subscriptions: https://youtu.be/2rujjTOPIRU
Interesting video. At about 10:22 he says "I did not see a bandwidth reduction for the long range mode." Given his explanation of the patent, which made perfect sense to me, this calls into question the long range mode. We will doubtless find out next week.
Peter Hinch
Index to my micropython libraries.

User avatar
iotman
Posts: 52
Joined: Sat Feb 02, 2019 4:06 pm
Location: Nanoose Bay, Canada
Contact:

Re: ESP32 Long Range Mode 1 km

Post by iotman » Sun Oct 06, 2019 3:44 pm

Hi Peter, I noticed that too, right after he discusses how other long range systems reduce bandwidth and data rates to enable a range boost. So I guess we'll find out in the next video, which should be out today ...

Cheers, Adrian

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: ESP32 Long Range Mode 1 km

Post by pythoncoder » Sun Oct 06, 2019 3:49 pm

iotman wrote:
Sun Oct 06, 2019 3:44 pm
.... So I guess we'll find out in the next video, which should be out today ...
Er, next Sunday I think.
Peter Hinch
Index to my micropython libraries.

User avatar
iotman
Posts: 52
Joined: Sat Feb 02, 2019 4:06 pm
Location: Nanoose Bay, Canada
Contact:

Re: ESP32 Long Range Mode 1 km

Post by iotman » Sun Oct 06, 2019 3:53 pm

hmm, not sure, I received that first video last week, so when he says 'next Sunday' I'm thinking it could be today, but we'll see ...

AB

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

A long range network bridge?

Post by pythoncoder » Sun Oct 06, 2019 5:08 pm

Another thought. The obvious application for this mode is to create a bridge to provide long range (low bandwidth) access to an existing WiFi LAN. A long range client can only connect to a long range AP so the AP must be another ESP32. This would connect to the existing LAN in station mode. While MicroPython supports simultaneous AP and SM, I believe the necessary software glue to create a bridge is absent.

Without this, potential applications seem rather limited. For example an application for long range wireless is using MQTT to link distant sensors to a broker. But decent brokers need PC type hardware. Aside from this many users want to use internet brokers.

I'm no networking guru. Would it be feasible to implement a bridge in Python or would it need firmware support?
Peter Hinch
Index to my micropython libraries.

kevinkk525
Posts: 969
Joined: Sat Feb 03, 2018 7:02 pm

Re: ESP32 Long Range Mode 1 km

Post by kevinkk525 » Sun Oct 06, 2019 5:33 pm

Since you can bond sockets to an interface you could read the AP socket and forward the messages to the socket bound to the STA. Might be quite inefficient compared to a real bridge implementation in C but should work.
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode

Post Reply