firmware icon indicating copy to clipboard operation
firmware copied to clipboard

Add support for Heltec HRI-485-2

Open serpent213 opened this issue 1 year ago • 5 comments

The Heltec HRI-485-2 is a LoRa to Ethernet gateway with wide-range DC power input, packaged in a DIN rail case. Includes slots for SIM card and LTE modem.

IMG_3270

MCU: ESP32 D0WDQ6 LoRa radio: SX1262 Ethernet PHYceiver: Realtek RTL8201F Extra flash: GigaDevice GD25Q64C (64 Mbit) RS-485 transceiver (not populated)

IMG_3273

IMG_3275

IMG_3272

IMG_3278

(4 layer board)

I'm not sure how to activate the RTL8201. It seems, Ethernet is tied more or less to a specific platform:

src/DebugConfiguration.h:113:10: fatal error: RAK13800_W5100S.h: No such file or directory

After removing the includes:

src/mqtt/MQTT.h:17:10: fatal error: EthernetClient.h: No such file or directory

If I'm not mistaken it should be enough to include ETH.h as part of the ESP32 Arduino library.

Related to #2107. I did not reverse engineer the board fully yet, but apparently Eth and LoRa are connected in parallel.

Thoughts?

serpent213 avatar Mar 06 '24 18:03 serpent213

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Mar 06 '24 18:03 CLAassistant

@RicInNewMexico is working on some changes to separate generic ethernet support from the particular RAK module, which should help here.

fifieldt avatar Sep 17 '24 07:09 fifieldt

@RicInNewMexico is working on some changes to separate generic ethernet support from the particular RAK module, which should help here.

Well, what I'm currently working on is enabling more ethernet connectivity for ESP32 based devices, but it will still be relying upon the W5100/5200/5500 arduino ethernet library.

We haven't previously used the built in ethernet support because that would require implementing the entire TCP stack in firmware whereas the WizNet ethernet modules have an embedded stack.

Supporting ETH PHY's using the ESP32 built in ethernet support would take a much more in-depth rewrite of the existing DHCP/NTP/MQTT/API/WEB areas of the codebase.

I'm not saying that it isn't possible or that it won't happen at some point in the future. I'm just saying that I'm not the right guy for that kind of job because it's beyond my (limited) skill level.

RicInNewMexico avatar Sep 18 '24 05:09 RicInNewMexico

@RicInNewMexico is working on some changes to separate generic ethernet support from the particular RAK module, which should help here.

Well, what I'm currently working on is enabling more ethernet connectivity for ESP32 based devices, but it will still be relying upon the W5100/5200/5500 arduino ethernet library.

We haven't previously used the built in ethernet support because that would require implementing the entire TCP stack in firmware whereas the WizNet ethernet modules have an embedded stack.

Supporting ETH PHY's using the ESP32 built in ethernet support would take a much more in-depth rewrite of the existing DHCP/NTP/MQTT/API/WEB areas of the codebase.

I'm not saying that it isn't possible or that it won't happen at some point in the future. I'm just saying that I'm not the right guy for that kind of job because it's beyond my (limited) skill level.

Actually using esp-idf tcp stack is just about initilize eth module. I have it up and running... but nobody wanted help me with gui stuff, so i just made it 'ugly way' in my fork.

Use Arduino wiznet library is worst thing, what you can do. For first wiznet's tcp stack sucks and second you will lost support for other Ethernet chips, supported by esp-idf

Check my forkx which is using now PHY Ethernet, because meshtastic uses obsolete 2.x SDK without SPI Ethernet support.

petrkr avatar Sep 18 '24 08:09 petrkr

Check this https://github.com/petrkr/meshtastic-firmware/commits/olabboard/

That was all needed to make proof of concept of working Ethernet on esp32.

https://github.com/meshtastic/firmware/issues/2107#issuecomment-2110792491

petrkr avatar Sep 18 '24 08:09 petrkr