Hardware advice for Ethernet socket

DrMickeyLauer
Posts: 132
Joined: Sun May 22, 2022 2:42 pm

Hardware advice for Ethernet socket

Postby DrMickeyLauer » Thu Mar 28, 2024 4:11 pm

We have designed an OBD2 adapter based on the ESP32S3 and the W5500. Ethernet is directly connected to the OBD2 port, since some of the cars speak a TCP protocol for diagnostics.

For a "pro" revision, we'd like to add a RJ45 ethernet socket to the device. I wonder whether we have any option besides adding another W5500 to the design. In principle, we don't need the RJ45 to be another logical ethernet ­– we would do bridging anyways.

Are there self-contained Ethernet hubs that we could integrate?

Or, if that doesn't work... is there a dual-port Ethernet controller IC with the same level of support in ESP-IDF which we have with the W5500?

ESP_ondrej
Posts: 173
Joined: Fri May 07, 2021 10:35 am

Re: Hardware advice for Ethernet socket

Postby ESP_ondrej » Tue Apr 02, 2024 7:32 am

Speaking of supported multiple Ethernet port ICs, we support KSZ8863. However, you've already figured it out by yourself as I've seen on Github ;)

DrMickeyLauer
Posts: 132
Joined: Sun May 22, 2022 2:42 pm

Re: Hardware advice for Ethernet socket

Postby DrMickeyLauer » Tue Apr 02, 2024 9:55 am

Indeed, thanks, although I overlooked that its main interface is RMII, so that is a showstopper for our design, which relies on an ESP32-S3. Is there similar hardware that only uses SPI?

djixon
Posts: 100
Joined: Sun Oct 01, 2023 7:48 pm

Re: Hardware advice for Ethernet socket

Postby djixon » Wed Apr 03, 2024 11:50 am

Sorry for a thread interupption, but I am also curious, what's stops you making a bridge using wifi module of ESP32S3 chip? For example OBD2 port->Eth port->processing in ESP32S3 (or just transvering raw messages) ->wifi module of esp32S3 -> wirelessly -> PC or Mobile phone or what ever external device (wifi cappable). And opposite route for commands initiated on that external device (phone, tablet, PC ...) all the back to OBD2 port in reverse direction.
Is there some constraint in expected transfer rate or bandwith not achievable over wifi? Security shouldn't be the issue since the S3 is pretty much cappable of doing any kind encryption you can imagine.

DrMickeyLauer
Posts: 132
Joined: Sun May 22, 2022 2:42 pm

Re: Hardware advice for Ethernet socket

Postby DrMickeyLauer » Wed Apr 03, 2024 12:04 pm

Twofold issue.

1. It‘s just a matter of reliability. We‘re doing potentially dangerous ECU flash upgrades over a wireless connection, which can be scary. Some customers would prefer a wired connection.
2. We also have BLE active and even though the coexistence works, we‘re not getting impressive data rates with WiFi.

djixon
Posts: 100
Joined: Sun Oct 01, 2023 7:48 pm

Re: Hardware advice for Ethernet socket

Postby djixon » Wed Apr 03, 2024 12:48 pm

Oh, I see.
1. Maybe, "flashing" can be possibly cached on ESP32 (depending on the size of flash block) so no data is actually sent to OBD2 port until whole flashing block is received by ESP32. Once it is received and verified (some checksum mark at the end of block) real flashing can be initiated. That way issues about possible wifi reliability (by the way, the same issue is possible over ethernet cable, it can be somewhere broken but not completelly .... or it can be accidentally damaged during flashing process...) but also issues regardless of transfer medium (wireless or wire) can be avoided using local caching to ESP and some checksum control before real flashing is initiated.
2. If I undertood well, you are saying that data arrived (from the CAN gateway module in the car) to that OBD2 port is at higher rate than wifi of ESP32 can deliver? Do you detect some missed (leaked messages)? Do you experience higher rate over the cable?

ESP_ondrej
Posts: 173
Joined: Fri May 07, 2021 10:35 am

Re: Hardware advice for Ethernet socket

Postby ESP_ondrej » Fri Apr 05, 2024 7:08 am

@DrMickeyLauer, here's the example of SPI Ethernet switch I found: https://www.microchip.com/en-us/product/LAN9352

DrMickeyLauer
Posts: 132
Joined: Sun May 22, 2022 2:42 pm

Re: Hardware advice for Ethernet socket

Postby DrMickeyLauer » Fri Apr 05, 2024 7:12 am

@ESP_ondrej: Thanks, that looks good ­– not supported yet by ESP-IDF though. That would be a requirement ;-)

Who is online

Users browsing this forum: No registered users and 131 guests