Skip to content

Ethernet on Esp32 #161

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

Open
jnstrem opened this issue May 1, 2025 · 6 comments
Open

Ethernet on Esp32 #161

jnstrem opened this issue May 1, 2025 · 6 comments

Comments

@jnstrem
Copy link

jnstrem commented May 1, 2025

Let me preface this by saying the firmware supplied by this project is unbelievable in how good it is.

I've been using this on an esp32 controller for a few years with the generic board layout. I added more equipment to my shop and it seems like I'm starting to get issues on my controller related to electrical noise. My gcode sender is openbuilds control.

Every once in a while the controller will just stop and I have to hit the resume button and sometimes it will just disconnect from my machine as well. I confirmed my grounding is done properly, dual shielded cables everywhere, opto isolated I/O etc. The longest wires connected to the controller are about 15" to reduce noise as well.

I've tried connecting over wifi in station mode and over USB with a 2m cable. There seems to be negligible difference between the two.

My question is can I reassign the spi pins in the generic esp32 boards map from SD card use to use them for Ethernet to spi connection with a w5500 module like the pico controllers? Is there a reason why this can't be done or to my knowledge hasn't been done before? Or would it be better just to get a better, more stable teensy controller or something like that?

@terjeio terjeio transferred this issue from grblHAL/core May 1, 2025
@terjeio
Copy link
Contributor

terjeio commented May 1, 2025

Lightly tested, and not updated for latest changes, code is here - so it is possible. No board map exists for it - pins are defined here. IIRC the test I did was with a temporary map, a dev board and a W5500 breakout connected with dupont wires - not ideal for high speed SPI.

@jnstrem
Copy link
Author

jnstrem commented May 1, 2025

So pretty much all I have to do is enable the Ethernet in the my_machine file, connect the W5500 to the dev board according to pin out and theoretically it should work?

@terjeio
Copy link
Contributor

terjeio commented May 1, 2025

So pretty much all I have to do is enable the Ethernet in the my_machine file, connect the W5500 to the dev board according to pin out and theoretically it should work?

I just enabled the Ethernet option i CMakeLists.txt and my_machine.h - it does not compile, some errors from changed grblHAL code and some from the ESP IDF framework, IIRC Ethernet has to be enabled in the sdkconfig.

@jnstrem
Copy link
Author

jnstrem commented May 1, 2025

In the CMakeLists.txt file I would assume to enable ethernet I would change line 9 to this?
OPTION(Ethernet "Compile with Ethernet support" ON)

I just enabled ethernet in the CMakeLists.txt file and not the my_machine.h file and it was able to compile. No idea if it works or not will have to test when the hardware shows up.

I opened up the sdkconfig.H and there didn't seem to be anything related to enabling ethernet. The file also told me it was autogenerated and to not edit it.

@terjeio
Copy link
Contributor

terjeio commented May 2, 2025

In the CMakeLists.txt file I would assume to enable ethernet I would change line 9 to this?

Correct, and you have to enable ethernet in my_machine.h too. I never bothered to make the setup streamlined since I did not hear back from the user that provided the initial PR for ethernet support.

No idea if it works or not will have to test when the hardware shows up.

I have just commited changes to make it compile. Don't know if it works though.

I opened up the sdkconfig.H and there didn't seem to be anything related to enabling ethernet. The file also told me it was autogenerated and to not edit it.

Use menuconfig to edit sdkconfig. Ethernet options are in Component config -> Ethernet ->

I use the tool provided in the Espressif-IDE:

Image

Anyway, here is the one I used to compile:

sdkconfig.zip

@jnstrem
Copy link
Author

jnstrem commented May 7, 2025

I haven't been able to get the firmware to compile on my end.
I have been using visual studio with the platform io extension to compile. There are several places where the sdkconfig files exist. I have tried to use the sdkconfig that you gave me to, to overwrite these to no avail.
Am I going to have to switch to the Espressif-IDE: to get this to work? Or am I just not seeing where I am supposed to make this change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants