-
-
Notifications
You must be signed in to change notification settings - Fork 7k
[Ethernet] bunch of bugfix and improvements #2325
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
Conversation
@ArduinoBot build this please |
/cc @BAG28 I see, on another thread, that you're searching for an Ethernet library with support for W5200, may you try this one? It should support W5100/5200/5500 with auto detection. I've tested it with a W5100 and W5500 but not with a W5200. |
I will check/test "ide-1.5.x-ethernet-W5500-2" and feedback you until this week. |
ab0dfb0
to
c23c597
Compare
Hello, I dowloaded the whole SW today and checked the following with Example "Webserver" Uno + W5100 = OK Tries with Uno + W5200 board 2 and ethernet V2.0 found on internet is workin, so I think W5200 boards is working All tests done in same(~) conditions : ethernet cable, USB port and dvt environment : arduino-PR-2325-BUILD-56 |
Hi, |
@BAG28 We didn't tried with a W5200 yet, after your test report we consider it not-working for now, unless someone else come up with a successful test. |
Hi, I will pursue testing, maybe with DHCP given IP adress. |
Hi again, |
I believe the problem with the W5200 is because CH_BASE is 0x0400 for W5100 and 0x4000 for W5200 but both currently have a fixed 0x0400. I'll leave the implementation up to you @Fede85 |
I agree with deonp, I believe the problem with the W5200 not working is because CH_BASE is 0x0400 for W5100 and 0x4000 for W5200. |
Some time ago I created a modified Ethernet library that supports both W5100 & W5200 and automatically detects either. The code is here, if anyone's interested. https://github.com/PaulStoffregen/Ethernet One small gotcha I ran into with the W5200 chip is the reset signal really is required. I put it on pin 9. I found the W5200 can get out of sync if it hears other SPI communication and never recovers, never properly realigns by only the CS signal. If you don't use the reset signal, you can get lucky most of the time when other SPI chips aren't present. But unlike the W5100, reset before initializing the W5200 seems to be the only 100% reliable way to make the W5200 work. |
From memory there is also some issues with MAX_SOCK_NUM which is defined in Ethernet.h |
69d0eb4
to
c60d939
Compare
This issue was moved to arduino-libraries/Ethernet#36 |
Sorry closed by mistake |
c60d939
to
54e1e7c
Compare
- Chipset is autodetected during init(). - Still missing support for W5200. - Some more optimization may be made on read*/write* functions by splitting into specific read{W5100|W5200|W5500} function and moving the chipset selection to the caller.
Instance name is left to W5100 to allow compatibility for libraries that builds on top of Ethernet library.
54e1e7c
to
4f1b379
Compare
4f1b379
to
a7cbf0b
Compare
I believe nearly all of this is now implemented in version 2.0.0, except getMaxSockets(). Going to close this old pull request. |
Version 1.1 of the Ethernet library brings the following improvements: