-
Notifications
You must be signed in to change notification settings - Fork 727
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
TCP socket not delivery data #562
Comments
This looks like a baud rate problem. Confusing extra bytes "�n�?(" after "##", |
Thanks for trying to help. I don't think there are any problems with data transfer speed: with the same settings, MQTT works correctly. And all my data in the debugger is shown correctly, only the tail is added. My data is from the first # to two ## in a row, and everything is correct. Baud rate set to 115200. Does transmission via ESP-link using TCP-socket work correctly for anyone? |
I looked a little El-Clietnt's source. "Extra" bytes are like CRC. So the version of the wrong speed is not accepted. From the source: |
@alex0732 please show your test code |
My test code very big... Exaple from el-client-master does not work exactly the same. |
I will try to make a small test code, later. |
My small test code: #include <ELClient.h> char * const tcpServer PROGMEM = "narodmon.ru"; ELClient esp(&Serial); //########################################################### // Initialize a TCP socket client on the connection to esp-link uint32_t wait; // Timer value to send out data // Parse error codes and returns error message as char * // #define ESPCONN_ABRT -8 /< Connection aborted. */ // #define ESPCONN_ARG -12 /< Illegal argument. */ char* const errTxt[] PROGMEM = {"No error, everything OK.","Out of memory.","Unknown code.","Timeout.","Routing problem.","Operation in progress.", // Callback for TCP socket, called if data was sent or received
} // Callback made from esp-link to notify of wifi status changes
} void setup() {
} void loop() {
} /* =============================================================== */ narodmon.ru:8283 is served over connection number # = 1 Debug: |
Script powershell, succefull send data:$server = 'narodmon.ru' |
@alex0732 err -11 means |
@JDP-Maker |
This is CRC - #562 (comment). |
This CRC shouldn't be printed at all |
Thanks for the advice. I agree about CRC. |
Hi!
There is a bunch of arduino MEGA256 - esp8266. It works fine, correctly sends data to the server via MQTT. It is required to remake on TCP-socket. I do as in the example, in debug I see the following output:
185270> SOCKET #0: send dataLen=135 socketData=#A0:20:A6:02:20:9C
185270> #t2#10.7
185270> #h2#63.5
185270> #p2#763.9
185270> #v2#3.04
185270> #t1#-12.5
185270> #h1#84.8
185271> #v1#2.95
185271> #h0#45.6
185271> #t0#21.5
185271> #l0#29
185271> #tr#20.0
185271> #D1#94
185271> #D2#107
185271> ##�n�?(
185271> SOCKET #0: Create connection to ip 185.245.187.136:8283
185271> SOCKET #0: Connect to ip 185.245.187.136:8283
187969> HTTP GET /console/text: 200, 107ms, h=17424
188577> HTTP GET /console/text: 200, 47ms, h=17424
189268> SLIP: start or end len=0 inpkt=0
189268> SLIP: start or end len=10 inpkt=1
189268> cmdParsePacket: cmd=4 argc=0 value=0
189269> cmdExec: Dispatching cmd=WIFI_STATUS
189269> cmdResponse: cmd=2 val=2 argc=0
191558> SOCKET #0: conn reset, err=-11
No data is sent to the server. Confusing extra bytes "�n�?(" after "##", they are not in the original packet. "##" - is the end of packet.
The python test script delivers data to the server normally. Tried with firmware esp-link v3.0.14-g963ffbb and v3.2.47-g9c6530d.
El-client - last release. What is my problem? err=-11 - is normally closed session?
The text was updated successfully, but these errors were encountered: