-->
Page 1 of 1

ESP8266 tcp client - C# tcp server interrupt problem

PostPosted: Tue Apr 05, 2016 11:30 am
by acansoy
Hi all, i am working on esp8266 - 01 for remote control application.
my hardware connection:
esp8266 arduino uno
rx ---------> 2
tx ---------> 3
vcc ---------> 3,3v
gnd ---------> gnd
chpd ---------> 3,3v and softwareserial (3,2)
i can either supply arduino with usb to labtop or external 9v battery.

Until now, i managed to establish connection between tcpserver (.net c#) and able to send and receive data very well. But the problem is after a while my connection interrupt and continue spontaneously and after more it goes completely. I dont know why ? Then i called setup() in the void loop function so if connection fail message occured i can reestablish. But its not enough for me because i want to stable connection.

İ changed delay time which at the end of arduino code, also tried to ping esp8266 from computer while communication not live and it can pinged. So i think the problem is not because of software. Maybe sync problem at C# side but im not sure.

The blue led not blinking when no communication. Moreover i reliaze that most of time i changed status of any analog-digital pin (the data packet has value of the pins ) communication stops for a while . İ think arduino cannot handle this instantaneous current changes.

As a code i implemented this sample code in arduino side : https://github.com/itead/ITEADLIB_Ardui ... Single.ino

Anybody has any comment at this issue ? I need to fix this issue for use my application in real project.

Re: ESP8266 tcp client - C# tcp server interrupt problem

PostPosted: Wed Apr 06, 2016 1:41 am
by acansoy
I changed the data packet and sent just a stable string value and problem solved. So the problem is arduino's analog pin values change continuously.
I also tried external 3.3v for esp8266 but this time i couldnt join my router. I dont know whether its about external suply or not. After that i damaged the module because of overvoltage and now have to order new one.

Re: ESP8266 tcp client - C# tcp server interrupt problem

PostPosted: Thu Apr 14, 2016 7:15 am
by acansoy
i solved it. Esp8266 working properly. The problem was at C# side. Sync read function sometimes hanging even if they are already data in buffer. So i am trying to use async socket function.

Re: ESP8266 tcp client - C# tcp server interrupt problem

PostPosted: Wed Apr 20, 2016 8:58 am
by Gabriel Almeida
Hello Friend, can you post the code at C# side ? I have a project and i need this side in my project. Thanks !