I am using wifi module esp8266 , what is easiest way to communicate arduino with desktop application and make a wireless communication between them. Please refer any useful resources
-
Are you using the ESP with an Arduino or stand-alone?Majenko– Majenko2017年08月25日 10:37:22 +00:00Commented Aug 25, 2017 at 10:37
-
I am using esp with ArduinoAns Bilal– Ans Bilal2017年08月25日 11:28:01 +00:00Commented Aug 25, 2017 at 11:28
-
There are many options. What exactly do you want to do?001– 0012017年08月25日 13:22:48 +00:00Commented Aug 25, 2017 at 13:22
1 Answer 1
Either use TCP or UDP to communicate. With TCP one end will be the server and will open a socket (your choice) and the other end will connect to it (much like communicating with a web server). With UDP both ends will open a socket and send discrete packets backwards and forwards.
How you would do either of those in C# is outside the scope of this website.
The ESP8266 has AT commands that perform the task for you - chiefly AT+CIPSTART
.
The simplest to understand is probably TCP communication where you can just follow any of the myriad of website based examples. However instead of communicating with a website using HTTP you will be communicating with your own server software written in C# using your own custom designed protocol.
A simpler option may be to use a real web server as a "man in the middle" to which both the ESP8266 and your C# program communicate. That website could become a database back-end for your program.
Of course, what you decide to do depends entirely on how complex your program is and what data it is you want to transfer.
-
I just want to send a simple string from esp8266 to my C# application. I do not want to go for a web server. Can we do this like we do with serial port and arduino. Can you send me some useful linksAns Bilal– Ans Bilal2017年08月25日 12:46:34 +00:00Commented Aug 25, 2017 at 12:46
-
Learn what TCP sockets are.Majenko– Majenko2017年08月25日 12:47:48 +00:00Commented Aug 25, 2017 at 12:47
-
you can use a serial port, but a web server would be much simpler to deploy as it would not require client drivers.dandavis– dandavis2017年08月27日 22:48:43 +00:00Commented Aug 27, 2017 at 22:48