Go Down

Topic: Socket.io v1.x Library for W5100 & ENC28J60 + ESP8266 (Read 4725 times) previous topic - next topic

washo4evr

Hey,
thank you for your kind message.
a wiki has been started and should be available on github soon as well as the new version which will include HTTP REST functions

stay tuned

BhanuTejaJ

#16
Mar 26, 2016, 09:37 pm Last Edit: Mar 26, 2016, 09:43 pm by BhanuTejaJ
Thanks for your ...quick response :)

Mean while can you help me with some source where can I start learning ? ....at least to get some overview, please.

Thanks,
Teja

Aledav

Hi!
I'm starting to use this great library!
But I can not receive from the Node long strings,
these are truncated !!
I Uncomment line 145 SocketIOClient.cpp to show (databuffer), which
instead it contains the whole string.
How can I do to valorize (Rcontent) with long strings (600 characters)?
Thank you

washo4evr

Hi,
this is a know issue with a fix on github
the fix will be added to the next version

chip69

Hello,

First of all thank you for the library. It works perfect with W5100.

I am now the owner of a new Ethernet Shield 2 - W5500 chip. I work with arduino ide 1.7.9 and Ethernet2 library.

I tried to combine the ethernet2 with socket.IO and i had partly success. My setup is a Mega and Ethernet shield 2. I connected to a Socket.IO server, but it disconnects from it and never sends any message.

I don't know if it is a chip error or the libraries are not completely compatible.

Do you have any suggestions i might try?

washo4evr

#20
Apr 15, 2016, 01:13 am Last Edit: Apr 15, 2016, 01:20 am by washo4evr
Hi,

I have not tried the w5500 yet
I might order one at some point
most of the code should work though without any modification.
probably some changes in the ethernet library
I will investigate
meanwhile, you can try editing the lib
according to http://labs.arduino.org/Arduino%20Ethernet%20Shield%202
NB. You can reuse your code written for Arduino Ethernet Shield, simply replacing
#include <Ethernet.h>  -->  #include <Ethernet2.h>
#include <EthernetUdp.h>  -->  #include <EthernetUdp2.h>

palsbo

I got the library working with communication between server and web-client and between server and ESP8266.

I have one problem: data are received on the ESP8266 (log-msg) but not delivered to the application.
Code: [Select]
  if (client.monitor()) {
    lastreply = millis();
    Serial.println(RID);
    Serial.println(Rname);
    Serial.println(Rcontent);
    }
  }


I get no print of RID, Rname and Rcontent in my client.monitor

I also tried to implement a callback routing like this:
Code: [Select]
void ondata(SocketIOClient client, char *data) {
  Serial.print(data);
}


registering the callback in setup() like this:

Code: [Select]
client.setDataArrivedDelegate(ondata);

But this also not works.

I cannot understand from the SocketIOClient.cpp how the callback is called???

Any help is highly appreciated.


palsbo

After looking into the library code, I see that the monitor function does not return true.

I added this and it works fine now.

For reference I attach my revised library.

Changes in SocketIOClient.cpp and example

palsbo

Sorry - I  try again.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy