Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Heltec HRI-485-2 #3340

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

serpent213
Copy link

@serpent213 serpent213 commented Mar 6, 2024

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?

@CLAassistant
Copy link

CLAassistant commented Mar 6, 2024

CLA assistant check
All committers have signed the CLA.

@caveman99 caveman99 marked this pull request as draft March 11, 2024 09:59
@caveman99 caveman99 changed the title [DRAFT] Add support for Heltec HRI-485-2 Add support for Heltec HRI-485-2 Mar 11, 2024
Comment on lines +26 to +29
#define LORA_SCK 9
#define LORA_MISO 11
#define LORA_MOSI 10
#define LORA_CS 8
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if LoRa module can be connected to those GPIO pins, as those pins are reserved for SPI Flash.

If you check wires, they are connected to ESP32 Pins around 28-33 which is used for SPI Flash.
Atleast I am not aware that you can share Quad Serial Flash interface with something else.

My guess from that 4 layer board is, that lora module will be connected around JTAG pins GPIO 12-14

Ethernet also has exact pins, which Can not be used to anything else around 20-26

@fifieldt fifieldt added the hardware-support Add hardware support for new devices or modules label Sep 17, 2024
@fifieldt
Copy link
Contributor

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

@RicInNewMexico
Copy link
Member

@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.

@petrkr
Copy link

petrkr commented Sep 18, 2024

@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
Copy link

petrkr commented Sep 18, 2024

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

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

#2107 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hardware-support Add hardware support for new devices or modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants