-
Notifications
You must be signed in to change notification settings - Fork 555
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
Ethernet2 #320
base: ATmega
Are you sure you want to change the base?
Ethernet2 #320
Conversation
Hi Nitrof I know we have spoken before, but as your the only person who ever replies and as I cannot get an answer from Markus, I wondering if you can help, I have followed you commit for Ethernet2. I know that Ethernet now supports W5500 and my webserver connection works fine with my ESP8266 via ethernet, I still cannot get the websocket server to work. |
HI @Jono72 . I did not use the library for a long time. On my side, then, I was nerver able to make the client work, only the server. But it was on version 1.x.x. It is now 2.x.x... So, you could try first to make an example using the ESP32 WIFI. That will create a working path. I did not look all the code of the library, only get an eyes on websoket.h, the was at least 2 place that have define condition of ESP32, but it can be others in other file that do thing supported by the WIFI.h but not Ethernet.h... look for them. Regards. |
I recently post on issue for support for ethernet shield2. It have been at the end a little more harder then expected.
First, because there is no #define core variable, you can predict if when it will be define, so you can't do it from the sketch. I add it into websocket.h at the top:
//Unmute to select Ethernet2 sheild library#define W5500_H
if muted, default is W5100
Not needed anymore. Ethernet2.0 libraries now handle all W5*00 chip.
Second: I remove all printf debugger to replace it with Serial.print macro because arduino does not support printf by default. So, if it add more line of code, it will be more compatible without dependency.
Finally, Hexdump() function in the server example is also not a part of arduino neither websocket lib... I just muted it.
Then it compiled, but did not worked.
Debugger showed that the handler wasn't doing thing in order.
I rearrange and rewrote most of it.
Doing so, I notice that most of the library functions works with pointers. I honestly beleive that I will be better to do it by reference. I started to do some of it.. but the rest will require more time and work...
But for now I share a first working version for review.
Thanks