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

W5500/SPI Ethernet Support (T-ETH-Lite-S3) #129

Draft
wants to merge 279 commits into
base: mdev
Choose a base branch
from

Conversation

troyhacks
Copy link
Collaborator

@troyhacks troyhacks commented Apr 17, 2024

W5500/SPI Ethernet support, currently hardcoded for the T-Eth-Lite-S3 board - which is the only S3 board I know of with Ethernet:

https://www.lilygo.cc/en-ca/products/t-eth-lite

Needs lib_deps:

https://github.com/troyhacks/ETHClass2 (for W5500 support)
https://github.com/troyhacks/TroyHacksAsyncUDP (fixes a bug with AsyncUDP, backports some fixes from IDF v5.1)

Also likely needs IDF v4.4 to work correctly. Tested on v4.4.6.

Updated to use the new ETHClass2 - so there's a bunch of code ifdef'd out if it's an ESP32-S3 just to work around the fact that SPI Ethernet isn't really a thing we're accounting for at the moment in WLED - so I'd consider this a proof of concept, even if it works.

May be useful (not in this state) for adding SPI Ethernet to WLED for the original ESP32?

@troyhacks troyhacks added the enhancement New feature or request label Apr 17, 2024
@troyhacks troyhacks requested a review from softhack007 April 17, 2024 18:38
@troyhacks troyhacks marked this pull request as draft April 20, 2024 02:53
commit 1c835b0
Author: Troy <[email protected]>
Date:   Fri Apr 19 11:57:54 2024 -0400

    Don't use TroyHacksAsyncUDP on S3 unless WLED_USE_ETHERNET

commit 67f7b0c
Author: Troy <[email protected]>
Date:   Fri Apr 19 11:49:05 2024 -0400

    Don't use ETHClass2 on S3 unless WLED_USE_ETHERNET

commit df2d327
Author: Troy <[email protected]>
Date:   Fri Apr 19 11:40:55 2024 -0400

    Revert "Merge branch 'W5500+Art-Net_Improvements' into W5500_Support"

    This reverts commit b7acc6a, reversing
    changes made to f51290c.

commit b7acc6a
Merge: f51290c b000c6d
Author: Troy <[email protected]>
Date:   Fri Apr 19 11:36:39 2024 -0400

    Merge branch 'W5500+Art-Net_Improvements' into W5500_Support

commit b000c6d
Merge: d1da208 34f4905
Author: Troy <[email protected]>
Date:   Fri Apr 19 11:32:19 2024 -0400

    Merge branch 'MoonModules:mdev' into W5500+Art-Net_Improvements

commit f51290c
Merge: 16c782c 34f4905
Author: Troy <[email protected]>
Date:   Fri Apr 19 11:32:10 2024 -0400

    Merge branch 'MoonModules:mdev' into W5500_Support

commit 16c782c
Author: Troy <[email protected]>
Date:   Fri Apr 19 11:30:50 2024 -0400

    Testing build fixes

commit 8d54d6a
Author: Troy <[email protected]>
Date:   Fri Apr 19 11:25:57 2024 -0400

    Testing build fixes

commit 2d2d300
Author: Troy <[email protected]>
Date:   Fri Apr 19 11:21:20 2024 -0400

    Testing build fixes for IDF below 4.0.0

commit bbb82e2
Author: Troy <[email protected]>
Date:   Fri Apr 19 11:17:00 2024 -0400

    Testing a build fix

commit 494a0f6
Author: Troy <[email protected]>
Date:   Fri Apr 19 09:12:06 2024 -0400

    Confirm we have an event list included in build

commit 5d36aa8
Author: Troy <[email protected]>
Date:   Fri Apr 19 09:07:07 2024 -0400

    Check for ethernet support

commit 8d3af36
Author: Troy <[email protected]>
Date:   Fri Apr 19 08:58:54 2024 -0400

    Network Event fixes

commit d1da208
Author: Troy <[email protected]>
Date:   Fri Apr 19 08:58:54 2024 -0400

    Network Event fixes

commit c8cfa9d
Author: Troy <[email protected]>
Date:   Thu Apr 18 10:42:53 2024 -0400

    DDP port fix

commit fe2958a
Author: Troy <[email protected]>
Date:   Thu Apr 18 09:25:19 2024 -0400

    For my test setup

commit 09da8cb
Merge: e6d127d 3987960
Author: Troy <[email protected]>
Date:   Thu Apr 18 09:20:29 2024 -0400

    Merge pull request #1 from troyhacks/Art-Net_Improvements

    Art net improvements

commit 3987960
Author: Troy <[email protected]>
Date:   Thu Apr 18 09:10:53 2024 -0400

    Make sure "0" is never a sequence number

commit 42926f6
Author: Troy <[email protected]>
Date:   Thu Apr 18 09:09:30 2024 -0400

    Revert. Art-Net compliance app complained about missing packets due to sequence numbers.

commit e72a779
Author: Troy <[email protected]>
Date:   Thu Apr 18 08:59:30 2024 -0400

    Packet sequence numbering to Art-Net spec

commit e6d127d
Author: Troy <[email protected]>
Date:   Thu Apr 18 08:33:32 2024 -0400

    Updated to ETHClass2

commit 16ee90b
Author: Troy <[email protected]>
Date:   Wed Apr 17 14:17:38 2024 -0400

    Comments

commit 5dde1f9
Author: Troy <[email protected]>
Date:   Wed Apr 17 14:16:24 2024 -0400

    Bring in a fixed version of AsyncUDP

commit 483daa9
Author: Troy <[email protected]>
Date:   Wed Apr 17 10:43:24 2024 -0400

    Logic for new ethernet board

commit 6b60013
Merge: 1c17886 0f79e9b
Author: Troy <[email protected]>
Date:   Wed Apr 17 10:05:06 2024 -0400

    Merge branch 'MoonModules:mdev' into W5500_Support

commit 2641dd5
Merge: f5b97f2 0f79e9b
Author: Troy <[email protected]>
Date:   Wed Apr 17 10:03:46 2024 -0400

    Merge branch 'MoonModules:mdev' into Art-Net_Improvements

commit f5b97f2
Author: Troy <[email protected]>
Date:   Mon Apr 15 10:18:20 2024 -0400

    Force routing only on non-ESP8266

commit 3f574a9
Author: Troy <[email protected]>
Date:   Thu Apr 4 10:33:34 2024 -0400

    Force use of Ethernet if configured.

commit 549f014
Author: Troy <[email protected]>
Date:   Thu Apr 4 09:42:24 2024 -0400

    Start of custom mapping ability

commit 334884a
Author: Troy <[email protected]>
Date:   Sat Mar 30 08:45:00 2024 -0400

    Forgot BGR and default RGB order

commit b1a099c
Author: Troy <[email protected]>
Date:   Mon Mar 18 20:32:32 2024 -0400

    Minor tidy.

commit d398a4d
Author: Troy <[email protected]>
Date:   Mon Mar 18 20:16:17 2024 -0400

    Comments fixed, minor code tidy/revert.

commit 1a90b73
Author: Troy <[email protected]>
Date:   Mon Mar 18 19:57:56 2024 -0400

    hardware_outputs back to 1 to not break defaults

commit ddfa90a
Author: Troy <[email protected]>
Date:   Mon Mar 18 19:49:32 2024 -0400

    Overhaul Art-Net to be more "professionally" good

commit 1c17886
Merge: 9f3e491 01c187f
Author: Troy <[email protected]>
Date:   Tue Jan 2 10:19:12 2024 -0600

    Merge branch 'MoonModules:mdev' into W5500_Support

commit 9f3e491
Merge: cca0055 cdc8a48
Author: TroyHacks <[email protected]>
Date:   Mon Dec 11 09:29:47 2023 -0500

    Merge branch 'W5500_Support' of https://github.com/troyhacks/WLED into W5500_Support

commit cca0055
Author: TroyHacks <[email protected]>
Date:   Mon Dec 11 09:29:22 2023 -0500

    Added WLED_DISABLE_MDNS for no really great reason

commit cdc8a48
Merge: c0a115a 6cd9d80
Author: Troy <[email protected]>
Date:   Thu Dec 7 00:03:42 2023 -0500

    Merge branch 'MoonModules:mdev' into W5500_Support

commit c0a115a
Author: TroyHacks <[email protected]>
Date:   Wed Dec 6 23:51:43 2023 -0500

    Pin reservation and better include logic for S3
commit fd85794
Merge: 3987960 34f4905
Author: Troy <[email protected]>
Date:   Fri Apr 19 12:09:30 2024 -0400

    Merge branch 'MoonModules:mdev' into Art-Net_Improvements

commit 3987960
Author: Troy <[email protected]>
Date:   Thu Apr 18 09:10:53 2024 -0400

    Make sure "0" is never a sequence number

commit 42926f6
Author: Troy <[email protected]>
Date:   Thu Apr 18 09:09:30 2024 -0400

    Revert. Art-Net compliance app complained about missing packets due to sequence numbers.

commit e72a779
Author: Troy <[email protected]>
Date:   Thu Apr 18 08:59:30 2024 -0400

    Packet sequence numbering to Art-Net spec

commit 2641dd5
Merge: f5b97f2 0f79e9b
Author: Troy <[email protected]>
Date:   Wed Apr 17 10:03:46 2024 -0400

    Merge branch 'MoonModules:mdev' into Art-Net_Improvements

commit f5b97f2
Author: Troy <[email protected]>
Date:   Mon Apr 15 10:18:20 2024 -0400

    Force routing only on non-ESP8266

commit 3f574a9
Author: Troy <[email protected]>
Date:   Thu Apr 4 10:33:34 2024 -0400

    Force use of Ethernet if configured.

commit 549f014
Author: Troy <[email protected]>
Date:   Thu Apr 4 09:42:24 2024 -0400

    Start of custom mapping ability

commit 334884a
Author: Troy <[email protected]>
Date:   Sat Mar 30 08:45:00 2024 -0400

    Forgot BGR and default RGB order

commit b1a099c
Author: Troy <[email protected]>
Date:   Mon Mar 18 20:32:32 2024 -0400

    Minor tidy.

commit d398a4d
Author: Troy <[email protected]>
Date:   Mon Mar 18 20:16:17 2024 -0400

    Comments fixed, minor code tidy/revert.

commit 1a90b73
Author: Troy <[email protected]>
Date:   Mon Mar 18 19:57:56 2024 -0400

    hardware_outputs back to 1 to not break defaults

commit ddfa90a
Author: Troy <[email protected]>
Date:   Mon Mar 18 19:49:32 2024 -0400

    Overhaul Art-Net to be more "professionally" good
Optimized FFT from ESP-DSP
Optimized Low-Pass filter from ESP-DSP
Un-interleave ESP-DSP FFT results
@januszwoj
Copy link

Hi @troyhacks .
If you need someone to test, I will be happy to help.
I am hopefully the lucky owner of Lilygo T-ETH-Lite-S3. I also have XIAO ESP32S3. In my case, they are supposed to work via I2S with WM8782S and PCM1808 ADC and DIR9001 SPDIF to I2S.
My programming skills are rather poor and I can't wait for support for T-ETH-Lite-S3 via ethernet, unfortunately my XIAO ESP32S3 somehow does not manage to stream the audio signal to the rest of the ESP32 via wifi.
Regards Janusz

@troyhacks
Copy link
Collaborator Author

Hi @troyhacks .
If you need someone to test, I will be happy to help.
I am hopefully the lucky owner of Lilygo T-ETH-Lite-S3. I also have XIAO ESP32S3. In my case, they are supposed to work via I2S with WM8782S and PCM1808 ADC and DIR9001 SPDIF to I2S.
My programming skills are rather poor and I can't wait for support for T-ETH-Lite-S3 via ethernet, unfortunately my XIAO ESP32S3 somehow does not manage to stream the audio signal to the rest of the ESP32 via wifi.
Regards Janusz

This is great, thanks @januszwoj !

Just to assess the level you can help here, do you know how to build WLED from the source code and upload the resulting firmware to the ESP32-S3?

@januszwoj
Copy link

Hi @troyhacks
I'm not very good at it yet, but I manage to do it from time to time.
Sometimes I have trouble understanding where some things come from, but I'm trying to learn.
I use Visual Studio and Platformio to compile the firmware myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request magic
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants