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

Ethernet2 #320

Open
wants to merge 12 commits into
base: ATmega
Choose a base branch
from
Open

Ethernet2 #320

wants to merge 12 commits into from

Conversation

NitrofMtl
Copy link

@NitrofMtl NitrofMtl commented May 6, 2018

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_Hif 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

@Jono72
Copy link

Jono72 commented Apr 6, 2023

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.
I modified websockets.h by defining #define WEBSOCKETS_NETWORK_TYPE NETWORK_W5100 which should allow ethernet connection, it does not work, I tried to follow the changes you had made to see if I could try the Ethernet2 lib but some lines in your changes seem different even though I have the latest version of the websockets lib, would you be able to send the required changed files that you altered in order for me to get this working please as you don't seem to be able to get them from github? my email is john.bms!gmail.com I would be so grateful for the help Kind Regards Jono

@NitrofMtl
Copy link
Author

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.

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

Successfully merging this pull request may close these issues.

2 participants