Are there still plans to integrate some of the known DIY Ethernet solutions (e.g. OE5BPA) based on WT32-ETH1, LilyGO T-ETH series, W5500 or TTGO T-Internet PoE boards? I've seen this issue mentioned several times in the past, but I can't figure out the actual condition.
Are there still plans to integrate some of the known DIY Ethernet solutions (e.g. OE5BPA) based on WT32-ETH1, LilyGO T-ETH series, W5500 or TTGO T-Internet PoE boards? I've seen this issue mentioned several times in the past, but I can't figure out the actual condition.
<!-- github-sync-id:2822817358 -->
As for the OE5BPA board I got offered many times to receive one by different HAM OPs but never happened
Hi
Yes , I hope to add this eventually
I found a way to test w5500 and maybe make it run
Will test next week
As for the OE5BPA board I got offered many times to receive one by different HAM OPs but never happened
<!-- github-comment-id:2626719680 -->
OE5BPA used board is what I also struggle with, LoRa and LCD can be wired to external header. Ethernet with PoE onboard. The HAT board was mostly sold in EU, shipping to SA will be expensive. I would sponsor 50% of such base board if you can manage getting it yourself from fare east. https://de.aliexpress.com/item/4001134936204.html?
OE5BPA used board is what I also struggle with, LoRa and LCD can be wired to external header. Ethernet with PoE onboard. The HAT board was mostly sold in EU, shipping to SA will be expensive. I would sponsor 50% of such base board if you can manage getting it yourself from fare east. https://de.aliexpress.com/item/4001134936204.html?
<!-- github-comment-id:2631960490 -->
You could incorporate #192. Then you would already have a board + drivers
The AddOn board is in my repository and anyone can recreate it.
If you need the addon board to test, I can send it to you...
@MILUX-DE
Please take a look in my fork and related PCB. Maybe that will be a solution for you?
You could incorporate #192. Then you would already have a board + drivers
The AddOn board is in my repository and anyone can recreate it.
If you need the addon board to test, I can send it to you...
@MILUX-DE
Please take a look in my fork and related PCB. Maybe that will be a solution for you?
<!-- github-comment-id:2634889988 -->
I have there support for OctopusLab board with LAN Shield, which supports PoE. I have it deployed like that.
Check my fork https://github.com/petrkr/LoRa_APRS_iGate/tree/lansupport
I have there support for OctopusLab board with LAN Shield, which supports PoE. I have it deployed like that.

<!-- github-comment-id:2651363447 -->
@MILUX-DE, welcome to test DL1LMH code on off-the-shelf TTGO T-ETH-ELITE-PoE board with a good choice of LoRa shields!
[https://github.com/UT2UH/LoRa_APRS_iGate/tree/Ethernet](url)
<!-- github-comment-id:2993656104 -->
@petrkr, I probably missed something, sorry... DL1LMH PR dated by November 2024, not January 2025. And I see no PR for your code (which I found, BTW, only while reading this issue). What did I wrong?
@petrkr, I probably missed something, sorry... DL1LMH PR dated by November 2024, not January 2025. And I see no PR for your code (which I found, BTW, only while reading this issue). What did I wrong?
<!-- github-comment-id:2997522848 -->
Also I not doing PR of not done work, thats why it was in branch, I needed some changes from @richonguzman those days, dnk if all are merged, especially move to sdk 3.x
Also I not doing PR of not done work, thats why it was in branch, I needed some changes from @richonguzman those days, dnk if all are merged, especially move to sdk 3.x
<!-- github-comment-id:2997550149 -->
I sent PR only for the core and libs upgrade to support my board. Not for Ethernet support. What is my best move on your opinion now?
I sent PR only for the core and libs upgrade to support my board. Not for Ethernet support. What is my best move on your opinion now?
<!-- github-comment-id:2997583694 -->
I sent PR only for the core and libs upgrade to support my board. Not for Ethernet support. What is my best move on your opinion now?
To be universal across boards. Which i wanted achive, but if this PR will be merged my whole work will be messed up, because you use same names of files just for one board.
But do not worry. I will not continue, it make sence and I do not want waste my time anymore for this project if they do not want my work, why to waste it?
> I sent PR only for the core and libs upgrade to support my board. Not for Ethernet support. What is my best move on your opinion now?
To be universal across boards. Which i wanted achive, but if this PR will be merged my whole work will be messed up, because you use same names of files just for one board.
But do not worry. I will not continue, it make sence and I do not want waste my time anymore for this project if they do not want my work, why to waste it?
<!-- github-comment-id:2997592881 -->
And pls, do not talk about Ukrainians, we have already enough them at our pub, already more than 4 times ran away without payment and making lot of mess there, acting as pigs, always get some chips for ber/vodka and then thise chips are everywhere...
Also one bar here must be closed by city hall, because police came there almost everynight...
But that is not part of this PR/Issue
That is just reference as evidence...
Anyway this is NOT closed and I posted branch ar Feb too
https://github.com/richonguzman/LoRa_APRS_iGate/issues/245#issuecomment-2651363447
And pls, do not talk about Ukrainians, we have already enough them at our pub, already more than 4 times ran away without payment and making lot of mess there, acting as pigs, always get some chips for ber/vodka and then thise chips are everywhere...
Also one bar here must be closed by city hall, because police came there almost everynight...
But that is not part of this PR/Issue
<!-- github-comment-id:2997617807 -->
It is a shame I am not inolved ) I just retired at my 60 after voluntirely enlisting for three years to military service. Send them back! Russians will spit in tissues and pay for everyting!
It is a shame I am not inolved ) I just retired at my 60 after voluntirely enlisting for three years to military service. Send them back! Russians will spit in tissues and pay for everyting!
<!-- github-comment-id:2997663430 -->
Hi all! I tested many months ago to update libraries and all I could from @petrkr , but could not achieve to have a smooth update
So it was on hold , and it's good that we could update it all if you help me
Anyone taking about beer???
Hi all! I tested many months ago to update libraries and all I could from @petrkr , but could not achieve to have a smooth update
So it was on hold , and it's good that we could update it all if you help me
<!-- github-comment-id:2997786287 -->
@richonguzman, ready to help but if you upgrade the version without merging disrupted PRs they are not on hold but rather abandoned. If these PRs included new boards - the only cure from collaborators frustration will be the GPL license. There should be some policies for the painless collaboration - PRs for boards and new features are separated, PR to support new boards come first, if the new board requires library upgrades such upgrades come earlier and so on... dev branch?.. expected in the next release list?.. till GPL do us part... )
@richonguzman, ready to help but if you upgrade the version without merging disrupted PRs they are not on hold but rather abandoned. If these PRs included new boards - the only cure from collaborators frustration will be the GPL license. There should be some policies for the painless collaboration - PRs for boards and new features are separated, PR to support new boards come first, if the new board requires library upgrades such upgrades come earlier and so on... dev branch?.. expected in the next release list?.. till GPL do us part... )
<!-- github-comment-id:2998636708 -->
@richonguzman, ready to help but if you upgrade the version without merging disrupted PRs they are not on hold but rather abandoned. If these PRs included new boards - the only cure from collaborators frustration will be the GPL license. There should be some policies for the painless collaboration - PRs for boards and new features are separated, PR to support new boards come first, if the new board requires library upgrades such upgrades come earlier and so on... dev branch?.. expected in the next release list?.. till GPL do us part... )
sorry about this, but many GitHub rules i've been learning as I go with it, not very experienced in Github , just a few years.
i mean to have this updated... any way to contact you directly over telegram? find me over it with the same user as here in GitHub
> [@richonguzman](https://github.com/richonguzman), ready to help but if you upgrade the version without merging disrupted PRs they are not on hold but rather abandoned. If these PRs included new boards - the only cure from collaborators frustration will be the GPL license. There should be some policies for the painless collaboration - PRs for boards and new features are separated, PR to support new boards come first, if the new board requires library upgrades such upgrades come earlier and so on... dev branch?.. expected in the next release list?.. till GPL do us part... )
sorry about this, but many GitHub rules i've been learning as I go with it, not very experienced in Github , just a few years.
i mean to have this updated... any way to contact you directly over telegram? find me over it with the same user as here in GitHub
<!-- github-comment-id:2998643445 -->
I have a Lilygo T-ETH-ELite + 433 LoRa Shield on my desk and I am trying to make it work. I've got the basic pinout, GPS, LoRa radio and and currently spending time to get W5500 ethernet running - and then I found this thread.
I can see that both @petrkr and @UT2UH have done a lot of work in this area, and I would hate to duplicate my efforts to what was already done. Can we get some of their solutions accepted?
To start, adding T-ETH-ELite as a new variant is a quick task, we just need a board_pinout.h and platformio.ini (UT2UH has a better board_pinout.h than my experiments). This will make this platform work perfectly over Wifi.
Then, adding Ethernet support is a separate and bigger effort, simply because there is no ethernet in the project yet. This will need a few more new files (eth_utils.c and .h), some changes to existing source logic and to the index.html too. Maybe even library updates? This can be done in smaller consecutive steps. After ethernet is in and running for one board, it is again relatively easy to add other platforms with ethernet ports, like Olimex, OE5BPA, OctopusLAN and others.
Thoughts?
I have a Lilygo T-ETH-ELite + 433 LoRa Shield on my desk and I am trying to make it work. I've got the basic pinout, GPS, LoRa radio and and currently spending time to get W5500 ethernet running - and then I found this thread.
I can see that both @petrkr and @UT2UH have done a lot of work in this area, and I would hate to duplicate my efforts to what was already done. Can we get some of their solutions accepted?
To start, adding T-ETH-ELite as a new variant is a quick task, we just need a board_pinout.h and platformio.ini (UT2UH has a better board_pinout.h than my experiments). This will make this platform work perfectly over Wifi.
Then, adding Ethernet support is a separate and bigger effort, simply because there is no ethernet in the project yet. This will need a few more new files (eth_utils.c and .h), some changes to existing source logic and to the index.html too. Maybe even library updates? This can be done in smaller consecutive steps. After ethernet is in and running for one board, it is again relatively easy to add other platforms with ethernet ports, like Olimex, OE5BPA, OctopusLAN and others.
Thoughts?
<!-- github-comment-id:3707215491 -->
@S57PNX
first you need to be sure you are using Arduino SDK 3.x and not 2.x
Because Wiznet W5500 support was added in ESP-IDF 5.x which is in Arduino SDK 3.x
You really do not want use those stupid Ethernet library from Arduino, because you will have to do lot of duplicate code/work because it does not use FreeRTOS network stack.
Actually I did not work on this for long time as APRS on Lora here is not so much popular, so there is no demand for PoE based gateways too.
Unfortunately I think there is still no official Espressif SDK 3.x port for Platformio, but you can use community based project... Pioarduino
for example like this platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.32/platform-espressif32.zip
rest of mine branch OctopusLab with LAN is same.
But of course there would be nice to somehow integrate hard coded LAN.begin() into configurations, also support more LAN chips (I plan to do LAN Shield with SPI DM9051 because it seems to be much better than wizznet)
@S57PNX
first you need to be sure you are using Arduino SDK 3.x and not 2.x
Because Wiznet W5500 support was added in ESP-IDF 5.x which is in Arduino SDK 3.x
You really do not want use those stupid Ethernet library from Arduino, because you will have to do lot of duplicate code/work because it does not use FreeRTOS network stack.
Actually I did not work on this for long time as APRS on Lora here is not so much popular, so there is no demand for PoE based gateways too.
Unfortunately I think there is still no official Espressif SDK 3.x port for Platformio, but you can use community based project... Pioarduino
for example like this
`platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.32/platform-espressif32.zip`
rest of mine branch OctopusLab with LAN is same.
But of course there would be nice to somehow integrate hard coded LAN.begin() into configurations, also support more LAN chips (I plan to do LAN Shield with SPI DM9051 because it seems to be much better than wizznet)
<!-- github-comment-id:3707221948 -->
@petrkr thanks for the feedback. After some research, I see now that the SDK version and Platformio is a big and sensitive topic, and since I am not part of this project, the decision if/when switch to pioarduino remains with @richonguzman . Also, my availability to work on anything nontrivial will expire with the end of holidays, so staring next week $dayjob will take over again.
For now I'd be happy if at least the T-ETH-ELite variant goes in, so the board works at least with wifi. The whole issue of adding Ethernet is almost certainly beyond my skillset and experience.
@petrkr thanks for the feedback. After some research, I see now that the SDK version and Platformio is a big and sensitive topic, and since I am not part of this project, the decision if/when switch to pioarduino remains with @richonguzman . Also, my availability to work on anything nontrivial will expire with the end of holidays, so staring next week $dayjob will take over again.
For now I'd be happy if at least the T-ETH-ELite variant goes in, so the board works at least with wifi. The whole issue of adding Ethernet is almost certainly beyond my skillset and experience.
<!-- github-comment-id:3707320565 -->
I have ESP32-POE from Olimex https://www.olimex.com/Products/IoT/ESP32/ESP32-POE/open-source-hardware and I was trying implement Ethernet support but wihout success. Tried https://github.com/dl1lmh/LoRa_APRS_iGate_for_OLIMEX but with this solution radio is not working.
I have radio SX1276 (E32 900M20S) so 900MHz but I ordered radio SX1262 (E22 400M30S). My version of radio is working with variant ESP32_DIY_LoRa_915 together with WiFi from richonguzman github. I tried also implement eth code to original richonguzman project but also without success.
Do you have some experience to implement Ethernet for this project?
I am using the same board for other ESP home project and radio together with ethernet works without problem.
The idea is implement iGate solution on the roof close to antenna via only one ethernet cable to have power and Internet.
Hello,
I have ESP32-POE from Olimex [https://www.olimex.com/Products/IoT/ESP32/ESP32-POE/open-source-hardware ](https://www.olimex.com/Products/IoT/ESP32/ESP32-POE/open-source-hardware) and I was trying implement Ethernet support but wihout success. Tried https://github.com/dl1lmh/LoRa_APRS_iGate_for_OLIMEX but with this solution radio is not working.
I have radio SX1276 (E32 900M20S) so 900MHz but I ordered radio SX1262 (E22 400M30S). My version of radio is working with variant ESP32_DIY_LoRa_915 together with WiFi from richonguzman github. I tried also implement eth code to original richonguzman project but also without success.
Do you have some experience to implement Ethernet for this project?
I am using the same board for other ESP home project and radio together with ethernet works without problem.
GPIO are used:
```
ethernet:
type: LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO18
clk:
pin: GPIO17
mode: CLK_OUT
phy_addr: 0
power_pin: GPIO12
Radio:
spi:
clk_pin: GPIO14
mosi_pin: GPIO02
miso_pin: GPIO15
cs_pin: GPIO05
reset_pin: GPIO16
irq_pin: GPIO13
```
The idea is implement iGate solution on the roof close to antenna via only one ethernet cable to have power and Internet.
<!-- github-comment-id:3735863387 -->
As you using legacy PHY LAN7820 you should be able use stock old SDK with my hard-coded Ethernet support.
The idea is implement iGate solution on the roof close to antenna via only one ethernet cable to have power and Internet.
Yes that was I was about that too.. But I still need few pull requests to be merged,,, but meanwhile I say they are conflicting again and now I working on different projects (for example remote SSTV transmission for some contents - https://github.com/petrkr/rigremote or library for Tropic square's secure element, which could have use in HAM radio too), so I do not have time for this one :(
> Hello,
>
> I have ESP32-POE from Olimex [https://www.olimex.com/Products/IoT/ESP32/ESP32-POE/open-source-hardware ](https://www.olimex.com/Products/IoT/ESP32/ESP32-POE/open-source-hardware) and I was trying implement Ethernet support but wihout success. Tried https://github.com/dl1lmh/LoRa_APRS_iGate_for_OLIMEX but with this solution radio is not working. I have radio SX1276 (E32 900M20S) so 900MHz but I ordered radio SX1262 (E22 400M30S). My version of radio is working with variant ESP32_DIY_LoRa_915 together with WiFi from richonguzman github.
As you using legacy PHY LAN7820 you should be able use stock old SDK with my hard-coded Ethernet support.
> The idea is implement iGate solution on the roof close to antenna via only one ethernet cable to have power and Internet.
Yes that was I was about that too.. But I still need few pull requests to be merged,,, but meanwhile I say they are conflicting again and now I working on different projects (for example remote SSTV transmission for some contents - https://github.com/petrkr/rigremote or library for Tropic square's secure element, which could have use in HAM radio too), so I do not have time for this one :(
<!-- github-comment-id:3736431533 -->
updated lansupport Proof-of-concept to latest released version now. I added detection of 4.x and 5.x SDK in Ethernet class, so it should be able to build with old 4.x SDK and also with new 5.x SDK (but there are some new problems with MQTT Client, because it also use old WiFiClient from SDK4.x)
Lot of things to do in order to properly support Ethernet (or SPI one, RMII ethernet works already in SDK 4.x)
how to set up pinout of your board, take insipration here
@damso @S57PNX
updated lansupport Proof-of-concept to latest released version now. I added detection of 4.x and 5.x SDK in Ethernet class, so it should be able to build with old 4.x SDK and also with new 5.x SDK (but there are some new problems with MQTT Client, because it also use old WiFiClient from SDK4.x)
Lot of things to do in order to properly support Ethernet (or SPI one, RMII ethernet works already in SDK 4.x)
how to set up pinout of your board, take insipration here
https://github.com/petrkr/LoRa_APRS_iGate/blob/lansupport/variants/ESP32_OctopusLab_LAN_LoRa/board_pinout.h
<!-- github-comment-id:3738689733 -->
Thank you @petrkr
With my current radio I have only success with variant ESP32_DIY_LoRa_915 so with your branch I was trying also this to be sure that Lora radio started.
First of all I modified the GPIO pin for Ethernet:
because I had error: E (7244) lan87xx: lan87xx_init(499): wrong chip ID
E (7245) esp_eth: esp_eth_driver_install(215): init phy failed
[ 7279][E][ETH.cpp:324] begin(): esp_eth_driver_install failed
For first test I was using: Compiling ETH init: SDK 4.x (Arduino core 2.x)") and LAN is working for a while (2-3pings) and connection is lost…
Next I tested: ("Compiling ETH init: SDK 5.x (Arduino core 3.x)") and I did some test and it works without problem! Ethernet works, radio works.
but If I see correctly with your version, WiFi is disabled permanently so if I disconnect LAN cable WiFi will not work?
Thank you @petrkr
With my current radio I have only success with variant ESP32_DIY_LoRa_915 so with your branch I was trying also this to be sure that Lora radio started.
First of all I modified the GPIO pin for Ethernet:
```
ETH.begin(ETH_PHY_LAN8720, 0, 23, 18, 12, ETH_CLOCK_GPIO17_OUT);
ETH.begin(0, 12, ETH_PHY_MDC, ETH_PHY_MDIO, ETH_PHY_LAN8720, ETH_CLOCK_GPIO17_OUT);
```
because I had error:
_E (7244) lan87xx: lan87xx_init(499): wrong chip ID
E (7245) esp_eth: esp_eth_driver_install(215): init phy failed
[ 7279][E][ETH.cpp:324] begin(): esp_eth_driver_install failed_
For first test I was using: Compiling ETH init: **SDK 4.x (Arduino core 2.x)**") and LAN is working for a while (2-3pings) and connection is lost…
<img width="1116" height="465" alt="Image" src="https://github.com/user-attachments/assets/e4ca1181-699b-483f-b657-fa83d79f0857" />
Next I tested: ("Compiling ETH init: **SDK 5.x (Arduino core 3.x)**") and I did some test and it works without problem! Ethernet works, radio works.
<img width="1014" height="262" alt="Image" src="https://github.com/user-attachments/assets/2aa02866-e8d9-4906-a6cd-558ef904bd69" />
but If I see correctly with your version, WiFi is disabled permanently so if I disconnect LAN cable WiFi will not work?
<!-- github-comment-id:3740452147 -->
In this proof-of-concept branch is wifi by hard-code disabled.
That two ETH.begin are based on SDK which you are using, this macro will choose itself correct one.
Yes I should put those stuff to board_pinout.h and not hard-code it there.
Strange is SDK 2.x does not works for you and 3.x yes. Maybe wrong parameters? Because they changed it across SDK versions (like changed position of parameters and removed constants in SDK 3.x, so maybe you are using different MDIO/MCK than default one, that is why SDK 2.x does not worked, if you does not changed those constants for right pins),
And thank you for test. Now I started refactoring wifi connection and introduced network manager (now it is based on main repo, so it does not have LAN support yet). First I want to move all possible stuff from around the code into network manager, so later it can be independent if connection is by using wifi/lan/modem/wifiap.
I hope @richonguzman will check it, test it and merge it :)
I trying to do it step-by-step, so it can be merged as-go and do not need to make some "BIG" commit. So we can test it step-by-step... also there was few wrong code, which I little-bit refactored by its logic.
In this proof-of-concept branch is wifi by hard-code disabled.
That two ETH.begin are based on SDK which you are using, this macro will choose itself correct one.
Yes I should put those stuff to board_pinout.h and not hard-code it there.
Strange is SDK 2.x does not works for you and 3.x yes. Maybe wrong parameters? Because they changed it across SDK versions (like changed position of parameters and removed constants in SDK 3.x, so maybe you are using different MDIO/MCK than default one, that is why SDK 2.x does not worked, if you does not changed those constants for right pins),
And thank you for test. Now I started refactoring wifi connection and introduced network manager (now it is based on main repo, so it does not have LAN support yet). First I want to move all possible stuff from around the code into network manager, so later it can be independent if connection is by using wifi/lan/modem/wifiap.
https://github.com/petrkr/LoRa_APRS_iGate/tree/networkmanager
I hope @richonguzman will check it, test it and merge it :)
I trying to do it step-by-step, so it can be merged as-go and do not need to make some "BIG" commit. So we can test it step-by-step... also there was few wrong code, which I little-bit refactored by its logic.
<!-- github-comment-id:3740477934 -->
How to use your branch "lansupport" now? I cloned this branch and eth is not working anymore? WiFi is starting automatically.
Hello @petrkr
How to use your branch "lansupport" now? I cloned this branch and eth is not working anymore? WiFi is starting automatically.
<!-- github-comment-id:3823545938 -->
How to use your branch "lansupport" now? I cloned this branch and eth is not working anymore? WiFi is starting automatically.
Yes for now lansupport is not finished to use ethernet I rebased it just to support network manager branch, but not finished yet usage of ethernet. Was waiting if network manager in this point will be accepted or not, so I will not do useless work on top of something what may not be accepted.
But there are already prepared methods to start it, so by calling networkManager->ethernetConnect(params); it should connect LAN too. Just there is not logic about connecting wifi STA, creating AP and Ethernet together. basically all of those can work at same time.
It is just about config, where I did not want to write yet as do not know how it is with backward compatibility.
> Hello [@petrkr](https://github.com/petrkr)
>
> How to use your branch "lansupport" now? I cloned this branch and eth is not working anymore? WiFi is starting automatically.
Yes for now lansupport is not finished to use ethernet I rebased it just to support network manager branch, but not finished yet usage of ethernet. Was waiting if network manager in this point will be accepted or not, so I will not do useless work on top of something what may not be accepted.
But there are already prepared methods to start it, so by calling networkManager->ethernetConnect(params); it should connect LAN too. Just there is not logic about connecting wifi STA, creating AP and Ethernet together. basically all of those can work at same time.
It is just about config, where I did not want to write yet as do not know how it is with backward compatibility.
<!-- github-comment-id:3823580519 -->
How to use your branch "lansupport" now? I cloned this branch and eth is not working anymore? WiFi is starting automatically.
I did some lan support back, but now I have to discover problem with LoRa TX.
Before I used it with SDK3.x but now I testing with 2.x and during LoRaTX, ethernet gets disconnected and some other board also never connets back again...
I must test it more...
Possible problems:
power domain (PoE powered module works better than only USB dongle one)
wifi + eth together, but on other projects I have no problem
some blocking tasks during LoRa Radio transmission, so some timeout in loop() so SDK will disconnect ETH - there would be helpful to know what everything changed since it works it for me for like half month.
maybe pin collision ? I have to check
For now I have functions enable/disable Ethernet from Web GUI. Wifi you can "disable" by removing all known networks and wifi AP you can disable by new option "Auto AP enabled"
I will try to test it more whenever get more time. Or if you have some observations which may help, it will be fine to...
For first would be nice @richonguzman will merge SDK3 compatibility problems, so I can build it on top od SDK 3 too, now I have lot of diversed forks already again :)
> Hello [@petrkr](https://github.com/petrkr)
>
> How to use your branch "lansupport" now? I cloned this branch and eth is not working anymore? WiFi is starting automatically.
I did some lan support back, but now I have to discover problem with LoRa TX.
Before I used it with SDK3.x but now I testing with 2.x and during LoRaTX, ethernet gets disconnected and some other board also never connets back again...
I must test it more...
Possible problems:
- power domain (PoE powered module works better than only USB dongle one)
- wifi + eth together, but on other projects I have no problem
- some blocking tasks during LoRa Radio transmission, so some timeout in loop() so SDK will disconnect ETH - there would be helpful to know what everything changed since it works it for me for like half month.
- maybe pin collision ? I have to check
For now I have functions enable/disable Ethernet from Web GUI. Wifi you can "disable" by removing all known networks and wifi AP you can disable by new option "Auto AP enabled"
I will try to test it more whenever get more time. Or if you have some observations which may help, it will be fine to...
For first would be nice @richonguzman will merge SDK3 compatibility problems, so I can build it on top od SDK 3 too, now I have lot of diversed forks already again :)
<!-- github-comment-id:3842904632 -->
So I think you observed similar issue like me: "For first test I was using: Compiling ETH init: SDK 4.x (Arduino core 2.x)") and LAN is working for a while (2-3pings) and connection is lost…" but I didnt notice that it is related to LoRa TX.
I will check your code with my board. Thanks @petrkr
Hello!
So I think you observed similar issue like me: "For first test I was using: Compiling ETH init: SDK 4.x (Arduino core 2.x)") and LAN is working for a while (2-3pings) and connection is lost…" but I didnt notice that it is related to LoRa TX.
I will check your code with my board. Thanks @petrkr
<!-- github-comment-id:3843167111 -->
Now I playing with it here... If I will disable wifi, it works just fine even with lora tx.
if I have only wifi, it also works good (but there was not problem at all). problem is when I havea connected both. But it does not seems to be related to any code (maybe I will try update SDK to 3.x), but more likely it would be related to power domain, because wifi + lora + eth is maybe more than AMS1117 can handle on 3v3, so probably my CAT809 (power domain supervisor) on mine LAN8720 LAN Shield resets LAN8720 due low-power spike. But I do not have osciscope here now to check this. But it is only valuable reason on this board, because AMS1117 can provide something around 700mA but only WiFi is able to make spikes up ti 500mA, plus ESP32 itself, plus LoRa on 20dBm... Maybe good to try lower power consuption by lowering TX powers...
Then also it can be connected because of RF/EMI, (I actually solved this at one ESP32-S3 board like 2 months ago, when wifi inducted on ESP's reset pin and resets itself.. adding of 1uF capacitor to ESPs RST line solved this issue) I can try add capactior to LAN module too, but since there is not RC reset circtuit but pus-pull reset controller, capacitor probably will has no effect in this case...
Now I playing with it here... If I will disable wifi, it works just fine even with lora tx.
if I have only wifi, it also works good (but there was not problem at all). problem is when I havea connected both. But it does not seems to be related to any code (maybe I will try update SDK to 3.x), but more likely it would be related to power domain, because wifi + lora + eth is maybe more than AMS1117 can handle on 3v3, so probably my CAT809 (power domain supervisor) on mine LAN8720 LAN Shield resets LAN8720 due low-power spike. But I do not have osciscope here now to check this. But it is only valuable reason on this board, because AMS1117 can provide something around 700mA but only WiFi is able to make spikes up ti 500mA, plus ESP32 itself, plus LoRa on 20dBm... Maybe good to try lower power consuption by lowering TX powers...
Then also it can be connected because of RF/EMI, (I actually solved this at one ESP32-S3 board like 2 months ago, when wifi inducted on ESP's reset pin and resets itself.. adding of 1uF capacitor to ESPs RST line solved this issue) I can try add capactior to LAN module too, but since there is not RC reset circtuit but pus-pull reset controller, capacitor probably will has no effect in this case...
<!-- github-comment-id:3843203704 -->
btw @damso
latest lansupport moved PIN definitons to board_pinout.h and requires -DHAS_ETH to platformio.ini for that board to be enabled.
inspiration here
https://github.com/petrkr/LoRa_APRS_iGate/blob/lansupport/variants/ESP32_OctopusLab_LAN_LoRa/board_pinout.h
https://github.com/petrkr/LoRa_APRS_iGate/blob/lansupport/variants/ESP32_OctopusLab_LAN_LoRa/platformio.ini
<!-- github-comment-id:3843683191 -->
Test first configuration
Erase flash, upload firmware
Ethernet by default disabled - OK
Log in via AutoAP
Configured SSID
Connected to SSID
On Display strange numbers (not correct IP) 2745870528
Put the other configuration.
RX, TX works.
Test the ethernet
Enabled ethernet via WEB
Test without cable -> timout and connected again to SSID
Connected cable during working device -> ETH Got IP (no information about IP address on serial port)
On Display strange numbers (not correct IP) 2779293888
Checked IP from DHCP server (192.168.168.165)
I have access now to iGate via WiFI and LAN cable.
RX and TX works.
After reboot automtically connected to WiFi and LAN cable.
Remove the SSID
Now I see the correct LAN IP address on serial "Ethernet connected! IP: 192.168.168.165"
But on display is wrong still (2779293888)
Fallback to AutoAP so now LAN and AutoAP working together.
I can connect via AutoAP and via LAN cable
TX and RX works.
Disconnected cable. AutoAP works still.
RX and TX works.
Disable AutoAP
On display still information: "WiFi: AP"
LAN cable works.
on serial all the time information: Reconnecting to WiFi, WiFi SSID not set.
RX and TX works.
AutoAP not brodcasting any auto ssid.
Problem: checkbox "Enable Auto AP" again is enabled...(I disabled this and save before)
so if I save this again AUTOAP will be enabled..yes-> "Starting AP fallback..."
so Enable Auto AP is not keeping the value after save? - maybe this is OK becuase I can disable all WiFI and LAN and I will not have access to device? - Yes...device is crashing...reboot loop..: Initializing LoRa Module init : LoRa Module ... done! Ethernet is disabled WiFi SSID not set! assert failed: tcpip_api_call IDF/components/lwip/lwip/src/api/tcpip.c:497 (Invalid mbox) Backtrace: 0x40083e35:0x3ffce400
Test test static IP
Static IP works
on serial all the time information: Reconnecting to WiFi, WiFi SSID not set.
RX and TX works.
Looks OK for my Olimex ESP32-POE - no restart the LAN.
But on display is wrong value of the IP address:
Maybe you can use: "String(ETH.localIP()[0]) + "." + String(ETH.localIP()[1]) + "." + String(ETH.localIP()[2]) + "." + String(ETH.localIP()[3])); ?
Hello @petrkr
I did some tests :)
1. Test first configuration
Erase flash, upload firmware
Ethernet by default disabled - OK
Log in via AutoAP
Configured SSID
Connected to SSID
On Display strange numbers (not correct IP) 2745870528
Put the other configuration.
RX, TX works.
2. Test the ethernet
Enabled ethernet via WEB
Test without cable -> timout and connected again to SSID
Connected cable during working device -> ETH Got IP (no information about IP address on serial port)
On Display strange numbers (not correct IP) 2779293888
Checked IP from DHCP server (192.168.168.165)
I have access now to iGate via WiFI and LAN cable.
RX and TX works.
After reboot automtically connected to WiFi and LAN cable.
3. Remove the SSID
Now I see the correct LAN IP address on serial "Ethernet connected! IP: 192.168.168.165"
But on display is wrong still (2779293888)
Fallback to AutoAP so now LAN and AutoAP working together.
I can connect via AutoAP and via LAN cable
TX and RX works.
Disconnected cable. AutoAP works still.
RX and TX works.
4. Disable AutoAP
On display still information: "WiFi: AP"
LAN cable works.
on serial all the time information: Reconnecting to WiFi, WiFi SSID not set.
RX and TX works.
AutoAP not brodcasting any auto ssid.
Problem: checkbox "Enable Auto AP" again is enabled...(I disabled this and save before)
so if I save this again AUTOAP will be enabled..yes-> "Starting AP fallback..."
so Enable Auto AP is not keeping the value after save? - maybe this is OK becuase I can disable all WiFI and LAN and I will not have access to device? - Yes...device is crashing...reboot loop..:
`Initializing LoRa Module
init : LoRa Module ... done!
Ethernet is disabled
WiFi SSID not set!
assert failed: tcpip_api_call IDF/components/lwip/lwip/src/api/tcpip.c:497 (Invalid mbox)
Backtrace: 0x40083e35:0x3ffce400`
5. Test test static IP
Static IP works
on serial all the time information: Reconnecting to WiFi, WiFi SSID not set.
RX and TX works.
Looks OK for my Olimex ESP32-POE - no restart the LAN.
But on display is wrong value of the IP address:
192.168.170.163 = 2745870528
192.168.168.165 = 2779293888
192.168.168.166 = 2796071104
Maybe you can use: "`String(ETH.localIP()[0]) + "." + String(ETH.localIP()[1]) + "." + String(ETH.localIP()[2]) + "." + String(ETH.localIP()[3]));` ?
<!-- github-comment-id:3846325919 -->
But I think disable AutoAP option should works when LAN cable is connected :) but now Auto AP is not keeping the value after save.
But I think disable AutoAP option should works when LAN cable is connected :) but now Auto AP is not keeping the value after save.
<!-- github-comment-id:3846362026 -->
That strange number is integer representation of IP address, I know about it, but as I focus on disconnecting LAN i forgot to fix that and I think etherner IP is shown righr, only wifi is bad. I think I need use different getIp way and really do not want to use that really old access bt ip(1)+.+ip(2).... because it should support toString or something sice some SDK.
AutoAP i will check there probably will be missing some 'write' config again, it's on 4 places, so maybe I overlooked some. Thx for test
That strange number is integer representation of IP address, I know about it, but as I focus on disconnecting LAN i forgot to fix that and I think etherner IP is shown righr, only wifi is bad. I think I need use different getIp way and really do not want to use that really old access bt ip(1)+.+ip(2).... because it should support toString or something sice some SDK.
AutoAP i will check there probably will be missing some 'write' config again, it's on 4 places, so maybe I overlooked some. Thx for test
<!-- github-comment-id:3846891721 -->
I found also that Display Timout is not working any more..Something is prevent to disable display. I connected dummy load to antenna. I not received any packet and display is all the time working.
I found also that Display Timout is not working any more..Something is prevent to disable display. I connected dummy load to antenna. I not received any packet and display is all the time working.
<!-- github-comment-id:3846911986 -->
I haven't touch on this. So maybe it's some side effect of changes to network manager from hard coded wifi.status() or it's part of wrong configuration. I'll try to check, but as I not used this feature and my development is mostly remote (so I not see OLED) I does not noticed that.
I haven't touch on this. So maybe it's some side effect of changes to network manager from hard coded wifi.status() or it's part of wrong configuration. I'll try to check, but as I not used this feature and my development is mostly remote (so I not see OLED) I does not noticed that.
<!-- github-comment-id:3846968219 -->
In the configuration I have LAN Ethernet enabled.
Found if I power on the device without the LAN cable -> it was running with AutoAP.
I am connecting the cable and device is restarted.
Connecting to LAN...
[NM] Setting up Ethernet...
[NM] ETH Started
[NM] ETH Setting Hostname: iGATE-XXXXXX-12
...............................
Ethernet connection timeout
WiFi SSID not set!
Starting AP fallback...
[NM] Starting AP mode: XXXXXX-12-AP
[NM] AP setup successful
[NM] AP IP assigned: 192.168.4.1
-- Sending Beacon to RF --
---> LoRa Packet Tx :
<--- LoRa Packet Rx :
(RSSI:-59 / SNR:13.75 / FreqErr:-1893)
[NM] ETH Connected
[NM] ETH Got IP
Connecting to APRS-IS ... Connected!
(Server: rotate.aprs2.net / Port: 14580)
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
In the configuration I have LAN Ethernet enabled.
Found if I power on the device without the LAN cable -> it was running with AutoAP.
I am connecting the cable and device is restarted.
```
Connecting to LAN...
[NM] Setting up Ethernet...
[NM] ETH Started
[NM] ETH Setting Hostname: iGATE-XXXXXX-12
...............................
Ethernet connection timeout
WiFi SSID not set!
Starting AP fallback...
[NM] Starting AP mode: XXXXXX-12-AP
[NM] AP setup successful
[NM] AP IP assigned: 192.168.4.1
-- Sending Beacon to RF --
---> LoRa Packet Tx :
<--- LoRa Packet Rx :
(RSSI:-59 / SNR:13.75 / FreqErr:-1893)
[NM] ETH Connected
[NM] ETH Got IP
Connecting to APRS-IS ... Connected!
(Server: rotate.aprs2.net / Port: 14580)
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
```
<!-- github-comment-id:3847160021 -->
I haven't touch on this. So maybe it's some side effect of changes to network manager from hard coded wifi.status() or it's part of wrong configuration. I'll try to check, but as I not used this feature and my development is mostly remote (so I not see OLED) I does not noticed that.
On WiFi only, Display is OK. Timeout is works. So problem is related to eth.
> I haven't touch on this. So maybe it's some side effect of changes to network manager from hard coded wifi.status() or it's part of wrong configuration. I'll try to check, but as I not used this feature and my development is mostly remote (so I not see OLED) I does not noticed that.
On WiFi only, Display is OK. Timeout is works. So problem is related to eth.
<!-- github-comment-id:3847520649 -->
Ok. I meanwhile fixed Wifi Auto AP, it should works, just on web it is parsed wrongly. Fixed already in branch (force pushed).
panic should be fixed too, I will push it somehow now, but thinking where to put that commit. It is littlebit more generic and it would happen on wifi too in case if AP is not available and it become available later (after setup()) so this fix would be nice also for main branch, but because I already updated files to use network manager, I do not want to back-port it as it would be extra work and lot of rebase / collision headache.
Hint problem is in NTP Client, which is NOT intialized during setup() routine if network (or wifi in main) is NOT connected, but if it became connnected (eth cable inserted, wifi router available) it will try to do timeClient->update() on nullptr object, that cause that panic... I think nobody noticed that, because ESP will just reboot and on 2nd try it works fine as connection is available already at setup phase.
Also wifi IP should be fixed as I used toString()
Ok. I meanwhile fixed Wifi Auto AP, it should works, just on web it is parsed wrongly. Fixed already in branch (force pushed).
panic should be fixed too, I will push it somehow now, but thinking where to put that commit. It is littlebit more generic and it would happen on wifi too in case if AP is not available and it become available later (after setup()) so this fix would be nice also for main branch, but because I already updated files to use network manager, I do not want to back-port it as it would be extra work and lot of rebase / collision headache.
Hint problem is in NTP Client, which is NOT intialized during setup() routine if network (or wifi in main) is NOT connected, but if it became connnected (eth cable inserted, wifi router available) it will try to do timeClient->update() on nullptr object, that cause that panic... I think nobody noticed that, because ESP will just reboot and on 2nd try it works fine as connection is available already at setup phase.
Also wifi IP should be fixed as I used toString()
<!-- github-comment-id:3847613116 -->
everything in lansupport now, force pushed, put also fixes to networkmanager branch, but not to main as those fixes already count with networkmanager.
known "problem" is if you do not have any ssid it tries to reconnect to wifi, but without success as there are no stored SSIDs.
I have to change this behaviour somehow. maybe something like if there are no SSIDs, consifer STA as disabled, so checkWifi will not try to reconnect, because without rebooting there is no way how to add new SSID to STA "became" available and connected.
everything in lansupport now, force pushed, put also fixes to networkmanager branch, but not to main as those fixes already count with networkmanager.
known "problem" is if you do not have any ssid it tries to reconnect to wifi, but without success as there are no stored SSIDs.
I have to change this behaviour somehow. maybe something like if there are no SSIDs, consifer STA as disabled, so checkWifi will not try to reconnect, because without rebooting there is no way how to add new SSID to STA "became" available and connected.
<!-- github-comment-id:3847882745 -->
Yes. Now looks ok. I uploaded to production iGate and I am testing this. I was trying the display issue but it is less important.
Yes. Now looks ok. I uploaded to production iGate and I am testing this. I was trying the display issue but it is less important.
<!-- github-comment-id:3849211239 -->
everything in lansupport now, force pushed, put also fixes to networkmanager branch, but not to main as those fixes already count with networkmanager.
known "problem" is if you do not have any ssid it tries to reconnect to wifi, but without success as there are no stored SSIDs.
I have to change this behaviour somehow. maybe something like if there are no SSIDs, consifer STA as disabled, so checkWifi will not try to reconnect, because without rebooting there is no way how to add new SSID to STA "became" available and connected.
What about put check: if (networkManager->isEthernetConnected()) { if (backUpDigiMode) { Serial.println("*** Ethernet active – stopping Backup Digi Mode ***"); backUpDigiMode = false; } wifiCounter = 0; return; }
on the beginning of void checkWiFi()
> everything in lansupport now, force pushed, put also fixes to networkmanager branch, but not to main as those fixes already count with networkmanager.
>
> known "problem" is if you do not have any ssid it tries to reconnect to wifi, but without success as there are no stored SSIDs.
>
> I have to change this behaviour somehow. maybe something like if there are no SSIDs, consifer STA as disabled, so checkWifi will not try to reconnect, because without rebooting there is no way how to add new SSID to STA "became" available and connected.
What about put check:
` if (networkManager->isEthernetConnected()) {
if (backUpDigiMode) {
Serial.println("*** Ethernet active – stopping Backup Digi Mode ***");
backUpDigiMode = false;
}
wifiCounter = 0;
return;
}`
on the beginning of **void checkWiFi()**
<!-- github-comment-id:3849401926 -->
I do basically do not want cross-class checks. So wifi utils should not take care about ethernet and vice versa, because after adding LTE modem therw will be what? Another if? Then we are ar beginning before network manager.
So i think more about create something like hasNetworks at wifi setup to be replaced by some 'network manager' has networks or wificount and inside wifi check i'll check if numver of wifis is zeroc just return. Actually even if someone will add wifi without reboot it will start work out-of-box as wifi check already will not be zero and will try to connect to it.
Also next is make call public call backs from networ manager, so you do not need to ask 'is connected' or etc in order to switch eco modec backup mode etc...
Just component, which needs it will just register something like onConnected/onDisconnected and check what to do insteaf of active check loop.
Also esp32 freertos handle reconnects very well itself, but in case of wifi only for latest ssid, so reconnect logic make sence in order to try different ssids if available
Also that OLED always on is problem in aprs helper where totaly unlogical is wificonnected check, and if not connected it will keep display always on.
But for first i need to merge atleast that network manager, that is why I always force pushes there, because it's still without ethernet with original logic. But would be nice if @richonguzman will make new things on top of it. Because more and more logic changes from my side in lansupport branch will lead to more hard merging those 'old' main based branches with network manager and lan support together
I do basically do not want cross-class checks. So wifi utils should not take care about ethernet and vice versa, because after adding LTE modem therw will be what? Another if? Then we are ar beginning before network manager.
So i think more about create something like hasNetworks at wifi setup to be replaced by some 'network manager' has networks or wificount and inside wifi check i'll check if numver of wifis is zeroc just return. Actually even if someone will add wifi without reboot it will start work out-of-box as wifi check already will not be zero and will try to connect to it.
Also next is make call public call backs from networ manager, so you do not need to ask 'is connected' or etc in order to switch eco modec backup mode etc...
Just component, which needs it will just register something like onConnected/onDisconnected and check what to do insteaf of active check loop.
Also esp32 freertos handle reconnects very well itself, but in case of wifi only for latest ssid, so reconnect logic make sence in order to try different ssids if available
Also that OLED always on is problem in aprs helper where totaly unlogical is wificonnected check, and if not connected it will keep display always on.
But for first i need to merge atleast that network manager, that is why I always force pushes there, because it's still without ethernet with original logic. But would be nice if @richonguzman will make new things on top of it. Because more and more logic changes from my side in lansupport branch will lead to more hard merging those 'old' main based branches with network manager and lan support together
<!-- github-comment-id:3850241431 -->
I found that with RA-02 module (100mW) works fine but with 1W (E22 radio) ethernet is disconnecting.WiFi is disabled on GUI.
I didnt find what the issue is. I was thinking tak eth is disconneting durig Lora TX but not. I uploaded firmware, via GUI enabled eth and save, lora tx was disabled...Maybe related to some pins used?
@petrkr I was trying with low power but the same. Interesting thing is that with "Compiling ETH init: SDK 5.x (Arduino core 3.x)" ethernet works OK with low power and high power. Tested on TinySA and 1W is working without problem with eth.
I'm not an expert, but I managed to compile it somehow, but there are some other problems with i2c...
[ 3194][E][Wire.cpp:420] beginTransmission(): could not acquire lock
[ 3200][E][Wire.cpp:449] endTransmission(): NULL TX buffer pointer
[120380][E][esp32-hal-i2c.c:307] i2cSetClock(): bus is not initialized
[120387][E][esp32-hal-i2c.c:307] i2cSetClock(): bus is not initialized
@petrkr I was trying with low power but the same. Interesting thing is that with "Compiling ETH init: SDK 5.x (Arduino core **3.x**)"
**ethernet works OK** with low power and high power. Tested on TinySA and 1W is working without problem with eth.
I'm not an expert, but I managed to compile it somehow, but there are some other problems with i2c...
```
[ 3194][E][Wire.cpp:420] beginTransmission(): could not acquire lock
[ 3200][E][Wire.cpp:449] endTransmission(): NULL TX buffer pointer
[120380][E][esp32-hal-i2c.c:307] i2cSetClock(): bus is not initialized
[120387][E][esp32-hal-i2c.c:307] i2cSetClock(): bus is not initialized
```
<!-- github-comment-id:3891411842 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Are there still plans to integrate some of the known DIY Ethernet solutions (e.g. OE5BPA) based on WT32-ETH1, LilyGO T-ETH series, W5500 or TTGO T-Internet PoE boards? I've seen this issue mentioned several times in the past, but I can't figure out the actual condition.
Hi
Yes , I hope to add this eventually
I found a way to test w5500 and maybe make it run
Will test next week
As for the OE5BPA board I got offered many times to receive one by different HAM OPs but never happened
OE5BPA used board is what I also struggle with, LoRa and LCD can be wired to external header. Ethernet with PoE onboard. The HAT board was mostly sold in EU, shipping to SA will be expensive. I would sponsor 50% of such base board if you can manage getting it yourself from fare east. https://de.aliexpress.com/item/4001134936204.html?
You could incorporate #192. Then you would already have a board + drivers
The AddOn board is in my repository and anyone can recreate it.
If you need the addon board to test, I can send it to you...
@MILUX-DE
Please take a look in my fork and related PCB. Maybe that will be a solution for you?
Check my fork https://github.com/petrkr/LoRa_APRS_iGate/tree/lansupport
I have there support for OctopusLab board with LAN Shield, which supports PoE. I have it deployed like that.
@MILUX-DE, welcome to test DL1LMH code on off-the-shelf TTGO T-ETH-ELITE-PoE board with a good choice of LoRa shields!
https://github.com/UT2UH/LoRa_APRS_iGate/tree/Ethernet
I see you used same names like me, so it will conflict, why you not rebased it and not used my half year work?
@petrkr, I probably missed something, sorry... DL1LMH PR dated by November 2024, not January 2025. And I see no PR for your code (which I found, BTW, only while reading this issue). What did I wrong?
I actially rebased it many times, so it move timestamps too.
Also I not doing PR of not done work, thats why it was in branch, I needed some changes from @richonguzman those days, dnk if all are merged, especially move to sdk 3.x
https://github.com/richonguzman/LoRa_APRS_iGate/pull/142
Here is first mention about it, July
I sent PR only for the core and libs upgrade to support my board. Not for Ethernet support. What is my best move on your opinion now?
To be universal across boards. Which i wanted achive, but if this PR will be merged my whole work will be messed up, because you use same names of files just for one board.
But do not worry. I will not continue, it make sence and I do not want waste my time anymore for this project if they do not want my work, why to waste it?
Neither do I, life is too short to read closed issues.
Especially in Ukraine, now.
That is just reference as evidence...
Anyway this is NOT closed and I posted branch ar Feb too
https://github.com/richonguzman/LoRa_APRS_iGate/issues/245#issuecomment-2651363447
And pls, do not talk about Ukrainians, we have already enough them at our pub, already more than 4 times ran away without payment and making lot of mess there, acting as pigs, always get some chips for ber/vodka and then thise chips are everywhere...
Also one bar here must be closed by city hall, because police came there almost everynight...
But that is not part of this PR/Issue
It is a shame I am not inolved ) I just retired at my 60 after voluntirely enlisting for three years to military service. Send them back! Russians will spit in tissues and pay for everyting!
Anyone taking about beer???
Hi all! I tested many months ago to update libraries and all I could from @petrkr , but could not achieve to have a smooth update
So it was on hold , and it's good that we could update it all if you help me
@richonguzman, ready to help but if you upgrade the version without merging disrupted PRs they are not on hold but rather abandoned. If these PRs included new boards - the only cure from collaborators frustration will be the GPL license. There should be some policies for the painless collaboration - PRs for boards and new features are separated, PR to support new boards come first, if the new board requires library upgrades such upgrades come earlier and so on... dev branch?.. expected in the next release list?.. till GPL do us part... )
sorry about this, but many GitHub rules i've been learning as I go with it, not very experienced in Github , just a few years.
i mean to have this updated... any way to contact you directly over telegram? find me over it with the same user as here in GitHub
I have a Lilygo T-ETH-ELite + 433 LoRa Shield on my desk and I am trying to make it work. I've got the basic pinout, GPS, LoRa radio and and currently spending time to get W5500 ethernet running - and then I found this thread.
I can see that both @petrkr and @UT2UH have done a lot of work in this area, and I would hate to duplicate my efforts to what was already done. Can we get some of their solutions accepted?
To start, adding T-ETH-ELite as a new variant is a quick task, we just need a board_pinout.h and platformio.ini (UT2UH has a better board_pinout.h than my experiments). This will make this platform work perfectly over Wifi.
Then, adding Ethernet support is a separate and bigger effort, simply because there is no ethernet in the project yet. This will need a few more new files (eth_utils.c and .h), some changes to existing source logic and to the index.html too. Maybe even library updates? This can be done in smaller consecutive steps. After ethernet is in and running for one board, it is again relatively easy to add other platforms with ethernet ports, like Olimex, OE5BPA, OctopusLAN and others.
Thoughts?
@S57PNX
first you need to be sure you are using Arduino SDK 3.x and not 2.x
Because Wiznet W5500 support was added in ESP-IDF 5.x which is in Arduino SDK 3.x
You really do not want use those stupid Ethernet library from Arduino, because you will have to do lot of duplicate code/work because it does not use FreeRTOS network stack.
Actually I did not work on this for long time as APRS on Lora here is not so much popular, so there is no demand for PoE based gateways too.
Unfortunately I think there is still no official Espressif SDK 3.x port for Platformio, but you can use community based project... Pioarduino
for example like this
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.32/platform-espressif32.ziprest of mine branch OctopusLab with LAN is same.
But of course there would be nice to somehow integrate hard coded LAN.begin() into configurations, also support more LAN chips (I plan to do LAN Shield with SPI DM9051 because it seems to be much better than wizznet)
@petrkr thanks for the feedback. After some research, I see now that the SDK version and Platformio is a big and sensitive topic, and since I am not part of this project, the decision if/when switch to pioarduino remains with @richonguzman . Also, my availability to work on anything nontrivial will expire with the end of holidays, so staring next week $dayjob will take over again.
For now I'd be happy if at least the T-ETH-ELite variant goes in, so the board works at least with wifi. The whole issue of adding Ethernet is almost certainly beyond my skillset and experience.
Hello,
I have ESP32-POE from Olimex https://www.olimex.com/Products/IoT/ESP32/ESP32-POE/open-source-hardware and I was trying implement Ethernet support but wihout success. Tried https://github.com/dl1lmh/LoRa_APRS_iGate_for_OLIMEX but with this solution radio is not working.
I have radio SX1276 (E32 900M20S) so 900MHz but I ordered radio SX1262 (E22 400M30S). My version of radio is working with variant ESP32_DIY_LoRa_915 together with WiFi from richonguzman github. I tried also implement eth code to original richonguzman project but also without success.
Do you have some experience to implement Ethernet for this project?
I am using the same board for other ESP home project and radio together with ethernet works without problem.
GPIO are used:
The idea is implement iGate solution on the roof close to antenna via only one ethernet cable to have power and Internet.
As you using legacy PHY LAN7820 you should be able use stock old SDK with my hard-coded Ethernet support.
Yes that was I was about that too.. But I still need few pull requests to be merged,,, but meanwhile I say they are conflicting again and now I working on different projects (for example remote SSTV transmission for some contents - https://github.com/petrkr/rigremote or library for Tropic square's secure element, which could have use in HAM radio too), so I do not have time for this one :(
@damso @S57PNX
updated lansupport Proof-of-concept to latest released version now. I added detection of 4.x and 5.x SDK in Ethernet class, so it should be able to build with old 4.x SDK and also with new 5.x SDK (but there are some new problems with MQTT Client, because it also use old WiFiClient from SDK4.x)
Lot of things to do in order to properly support Ethernet (or SPI one, RMII ethernet works already in SDK 4.x)
how to set up pinout of your board, take insipration here
https://github.com/petrkr/LoRa_APRS_iGate/blob/lansupport/variants/ESP32_OctopusLab_LAN_LoRa/board_pinout.h
Thank you @petrkr
With my current radio I have only success with variant ESP32_DIY_LoRa_915 so with your branch I was trying also this to be sure that Lora radio started.
First of all I modified the GPIO pin for Ethernet:
because I had error:
E (7244) lan87xx: lan87xx_init(499): wrong chip ID
E (7245) esp_eth: esp_eth_driver_install(215): init phy failed
[ 7279][E][ETH.cpp:324] begin(): esp_eth_driver_install failed
For first test I was using: Compiling ETH init: SDK 4.x (Arduino core 2.x)") and LAN is working for a while (2-3pings) and connection is lost…
Next I tested: ("Compiling ETH init: SDK 5.x (Arduino core 3.x)") and I did some test and it works without problem! Ethernet works, radio works.
but If I see correctly with your version, WiFi is disabled permanently so if I disconnect LAN cable WiFi will not work?
In this proof-of-concept branch is wifi by hard-code disabled.
That two ETH.begin are based on SDK which you are using, this macro will choose itself correct one.
Yes I should put those stuff to board_pinout.h and not hard-code it there.
Strange is SDK 2.x does not works for you and 3.x yes. Maybe wrong parameters? Because they changed it across SDK versions (like changed position of parameters and removed constants in SDK 3.x, so maybe you are using different MDIO/MCK than default one, that is why SDK 2.x does not worked, if you does not changed those constants for right pins),
And thank you for test. Now I started refactoring wifi connection and introduced network manager (now it is based on main repo, so it does not have LAN support yet). First I want to move all possible stuff from around the code into network manager, so later it can be independent if connection is by using wifi/lan/modem/wifiap.
https://github.com/petrkr/LoRa_APRS_iGate/tree/networkmanager
I hope @richonguzman will check it, test it and merge it :)
I trying to do it step-by-step, so it can be merged as-go and do not need to make some "BIG" commit. So we can test it step-by-step... also there was few wrong code, which I little-bit refactored by its logic.
Hello @petrkr
How to use your branch "lansupport" now? I cloned this branch and eth is not working anymore? WiFi is starting automatically.
Yes for now lansupport is not finished to use ethernet I rebased it just to support network manager branch, but not finished yet usage of ethernet. Was waiting if network manager in this point will be accepted or not, so I will not do useless work on top of something what may not be accepted.
But there are already prepared methods to start it, so by calling networkManager->ethernetConnect(params); it should connect LAN too. Just there is not logic about connecting wifi STA, creating AP and Ethernet together. basically all of those can work at same time.
It is just about config, where I did not want to write yet as do not know how it is with backward compatibility.
I did some lan support back, but now I have to discover problem with LoRa TX.
Before I used it with SDK3.x but now I testing with 2.x and during LoRaTX, ethernet gets disconnected and some other board also never connets back again...
I must test it more...
Possible problems:
For now I have functions enable/disable Ethernet from Web GUI. Wifi you can "disable" by removing all known networks and wifi AP you can disable by new option "Auto AP enabled"
I will try to test it more whenever get more time. Or if you have some observations which may help, it will be fine to...
For first would be nice @richonguzman will merge SDK3 compatibility problems, so I can build it on top od SDK 3 too, now I have lot of diversed forks already again :)
Hello!
So I think you observed similar issue like me: "For first test I was using: Compiling ETH init: SDK 4.x (Arduino core 2.x)") and LAN is working for a while (2-3pings) and connection is lost…" but I didnt notice that it is related to LoRa TX.
I will check your code with my board. Thanks @petrkr
Now I playing with it here... If I will disable wifi, it works just fine even with lora tx.
if I have only wifi, it also works good (but there was not problem at all). problem is when I havea connected both. But it does not seems to be related to any code (maybe I will try update SDK to 3.x), but more likely it would be related to power domain, because wifi + lora + eth is maybe more than AMS1117 can handle on 3v3, so probably my CAT809 (power domain supervisor) on mine LAN8720 LAN Shield resets LAN8720 due low-power spike. But I do not have osciscope here now to check this. But it is only valuable reason on this board, because AMS1117 can provide something around 700mA but only WiFi is able to make spikes up ti 500mA, plus ESP32 itself, plus LoRa on 20dBm... Maybe good to try lower power consuption by lowering TX powers...
Then also it can be connected because of RF/EMI, (I actually solved this at one ESP32-S3 board like 2 months ago, when wifi inducted on ESP's reset pin and resets itself.. adding of 1uF capacitor to ESPs RST line solved this issue) I can try add capactior to LAN module too, but since there is not RC reset circtuit but pus-pull reset controller, capacitor probably will has no effect in this case...
btw @damso
latest lansupport moved PIN definitons to board_pinout.h and requires -DHAS_ETH to platformio.ini for that board to be enabled.
inspiration here
https://github.com/petrkr/LoRa_APRS_iGate/blob/lansupport/variants/ESP32_OctopusLab_LAN_LoRa/board_pinout.h
https://github.com/petrkr/LoRa_APRS_iGate/blob/lansupport/variants/ESP32_OctopusLab_LAN_LoRa/platformio.ini
Hello @petrkr
I did some tests :)
Test first configuration
Erase flash, upload firmware
Ethernet by default disabled - OK
Log in via AutoAP
Configured SSID
Connected to SSID
On Display strange numbers (not correct IP) 2745870528
Put the other configuration.
RX, TX works.
Test the ethernet
Enabled ethernet via WEB
Test without cable -> timout and connected again to SSID
Connected cable during working device -> ETH Got IP (no information about IP address on serial port)
On Display strange numbers (not correct IP) 2779293888
Checked IP from DHCP server (192.168.168.165)
I have access now to iGate via WiFI and LAN cable.
RX and TX works.
After reboot automtically connected to WiFi and LAN cable.
Remove the SSID
Now I see the correct LAN IP address on serial "Ethernet connected! IP: 192.168.168.165"
But on display is wrong still (2779293888)
Fallback to AutoAP so now LAN and AutoAP working together.
I can connect via AutoAP and via LAN cable
TX and RX works.
Disconnected cable. AutoAP works still.
RX and TX works.
Disable AutoAP
On display still information: "WiFi: AP"
LAN cable works.
on serial all the time information: Reconnecting to WiFi, WiFi SSID not set.
RX and TX works.
AutoAP not brodcasting any auto ssid.
Problem: checkbox "Enable Auto AP" again is enabled...(I disabled this and save before)
so if I save this again AUTOAP will be enabled..yes-> "Starting AP fallback..."
so Enable Auto AP is not keeping the value after save? - maybe this is OK becuase I can disable all WiFI and LAN and I will not have access to device? - Yes...device is crashing...reboot loop..:
Initializing LoRa Module init : LoRa Module ... done! Ethernet is disabled WiFi SSID not set! assert failed: tcpip_api_call IDF/components/lwip/lwip/src/api/tcpip.c:497 (Invalid mbox) Backtrace: 0x40083e35:0x3ffce400Test test static IP
Static IP works
on serial all the time information: Reconnecting to WiFi, WiFi SSID not set.
RX and TX works.
Looks OK for my Olimex ESP32-POE - no restart the LAN.
But on display is wrong value of the IP address:
192.168.170.163 = 2745870528
192.168.168.165 = 2779293888
192.168.168.166 = 2796071104
Maybe you can use: "
String(ETH.localIP()[0]) + "." + String(ETH.localIP()[1]) + "." + String(ETH.localIP()[2]) + "." + String(ETH.localIP()[3]));?But I think disable AutoAP option should works when LAN cable is connected :) but now Auto AP is not keeping the value after save.
That strange number is integer representation of IP address, I know about it, but as I focus on disconnecting LAN i forgot to fix that and I think etherner IP is shown righr, only wifi is bad. I think I need use different getIp way and really do not want to use that really old access bt ip(1)+.+ip(2).... because it should support toString or something sice some SDK.
AutoAP i will check there probably will be missing some 'write' config again, it's on 4 places, so maybe I overlooked some. Thx for test
I found also that Display Timout is not working any more..Something is prevent to disable display. I connected dummy load to antenna. I not received any packet and display is all the time working.
I haven't touch on this. So maybe it's some side effect of changes to network manager from hard coded wifi.status() or it's part of wrong configuration. I'll try to check, but as I not used this feature and my development is mostly remote (so I not see OLED) I does not noticed that.
In the configuration I have LAN Ethernet enabled.
Found if I power on the device without the LAN cable -> it was running with AutoAP.
I am connecting the cable and device is restarted.
On WiFi only, Display is OK. Timeout is works. So problem is related to eth.
Ok. I meanwhile fixed Wifi Auto AP, it should works, just on web it is parsed wrongly. Fixed already in branch (force pushed).
panic should be fixed too, I will push it somehow now, but thinking where to put that commit. It is littlebit more generic and it would happen on wifi too in case if AP is not available and it become available later (after setup()) so this fix would be nice also for main branch, but because I already updated files to use network manager, I do not want to back-port it as it would be extra work and lot of rebase / collision headache.
Hint problem is in NTP Client, which is NOT intialized during setup() routine if network (or wifi in main) is NOT connected, but if it became connnected (eth cable inserted, wifi router available) it will try to do timeClient->update() on nullptr object, that cause that panic... I think nobody noticed that, because ESP will just reboot and on 2nd try it works fine as connection is available already at setup phase.
Also wifi IP should be fixed as I used toString()
everything in lansupport now, force pushed, put also fixes to networkmanager branch, but not to main as those fixes already count with networkmanager.
known "problem" is if you do not have any ssid it tries to reconnect to wifi, but without success as there are no stored SSIDs.
I have to change this behaviour somehow. maybe something like if there are no SSIDs, consifer STA as disabled, so checkWifi will not try to reconnect, because without rebooting there is no way how to add new SSID to STA "became" available and connected.
Yes. Now looks ok. I uploaded to production iGate and I am testing this. I was trying the display issue but it is less important.
What about put check:
if (networkManager->isEthernetConnected()) { if (backUpDigiMode) { Serial.println("*** Ethernet active – stopping Backup Digi Mode ***"); backUpDigiMode = false; } wifiCounter = 0; return; }on the beginning of void checkWiFi()
I do basically do not want cross-class checks. So wifi utils should not take care about ethernet and vice versa, because after adding LTE modem therw will be what? Another if? Then we are ar beginning before network manager.
So i think more about create something like hasNetworks at wifi setup to be replaced by some 'network manager' has networks or wificount and inside wifi check i'll check if numver of wifis is zeroc just return. Actually even if someone will add wifi without reboot it will start work out-of-box as wifi check already will not be zero and will try to connect to it.
Also next is make call public call backs from networ manager, so you do not need to ask 'is connected' or etc in order to switch eco modec backup mode etc...
Just component, which needs it will just register something like onConnected/onDisconnected and check what to do insteaf of active check loop.
Also esp32 freertos handle reconnects very well itself, but in case of wifi only for latest ssid, so reconnect logic make sence in order to try different ssids if available
Also that OLED always on is problem in aprs helper where totaly unlogical is wificonnected check, and if not connected it will keep display always on.
But for first i need to merge atleast that network manager, that is why I always force pushes there, because it's still without ethernet with original logic. But would be nice if @richonguzman will make new things on top of it. Because more and more logic changes from my side in lansupport branch will lead to more hard merging those 'old' main based branches with network manager and lan support together
Hello,
I found that with RA-02 module (100mW) works fine but with 1W (E22 radio) ethernet is disconnecting.WiFi is disabled on GUI.
I didnt find what the issue is. I was thinking tak eth is disconneting durig Lora TX but not. I uploaded firmware, via GUI enabled eth and save, lora tx was disabled...Maybe related to some pins used?
@petrkr I was trying with low power but the same. Interesting thing is that with "Compiling ETH init: SDK 5.x (Arduino core 3.x)"
ethernet works OK with low power and high power. Tested on TinySA and 1W is working without problem with eth.
I'm not an expert, but I managed to compile it somehow, but there are some other problems with i2c...
Problem with i2c was my fault of GPIO assignment. With SDK 5.x (Arduino core 3.x) I didnt notice any problems.