Closed Puding07 closed 5 years ago
Hi,
config.h
``
``
if (Ethernet.begin(mac) == 0) {
CONSOLE.println(F("Can't open ethernet device"));
while (true) ;
}
to this:
// X is up to you, set these as you like.
Ethernet.begin(mac, IPAddress(192, 168, X, X));
Hi! Thanks for the fast reply I already replied to you or I thought so... but I replied to denden4444 😄 So I figured that the problem was that I bought the w5500 ethernet board but the company sent me the w5100. After this I edited config.h and the board managed to get an IP address but on the serial monitor I keep getting 'got client' and also I cannot connect to the server via the webapp.
I tried to give static ip address with this code:
IPAddress ip( 192, 168, 0, 177);
IPAddress gateway( 192, 168, 0, 1);
IPAddress subnet( 255, 255, 255, 0);
.
.
.
Ethernet.begin(mac, ip, gateway, gateway, subnet);
and ofc I commented out the if statement for "Can't open ethernet device". So with this the issue still remains. If you could help me understand how the websockets works on the arduino I would really appreciate that cause I'm eagered to get this project done. I was wondering if I could use my webapp with arduino. The webapp uses socket.io and it is emitting the messages. Do you know how to get those emits with the arduino ? I can send you the code for the webapp. Thank you again for your reply, Aaron. 👋
Hi,
Try to use this client code: https://github.com/skaarj1989/ArduinoWebSockets/blob/master/node.js/chat-client.htm
Send me your webapp client code if you can.
I already tried it with the app you sent and ofc I edited in the code the server ip address. Here is the webapp I am talking about: https://github.com/iamshaunjp/websockets-playlist/tree/lesson-5 Is there a way to handle those events in /public/chat.js ?
I don't support socket.io for now.
I get these errors when compiling:
I'm using arduino uno & W5500 ethernet shield. I also followed the Requirements and the Installation. When I open the serial monitor it displays Initializing... but nothing happens after that no matter how much I wait. Can you please help me ? Thank you, Aaron