ESP8266 debug via UDP

253 views
Skip to first unread message

Gabriele Ribichini

unread,
May 24, 2016, 6:40:39 PM5/24/16
to souliss
Dear friends,
I experienced some issue in debugging an ESP8266 with serial port.. it seems that the serial sometime does not work (an now way for me to get it working).

Thanks to Dario I tried a workaround by sending data via UDP.
That is fairly easy, define the following as global:

WiFiUDP Udp;
IPAddress remote_ip(192, 168, 1, 209); // you PC network address
#define UDP_PORT 1111

any time you want to send a message just call the following:

Udp.beginPacket(remote_ip, UDP_PORT);
Udp.write("hello\r\n");
Udp.endPacket();

then on a linux console just type:

netcat -ul 1111

to see any sent message.

hope this may help someone else.

Flavio P.

unread,
May 25, 2016, 2:17:30 AM5/25/16
to sou...@googlegroups.com
This is great! Debug without cable!
Thanks a lot Gab!!!

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/6242ca61-6a42-4129-9c99-6e5dfeddb918%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
P ********* Consideriamo l'ambiente prima di stampare questa e-mail *** Think about environment before printing *********
Il contenuto di questo messaggio e-mail è privato e riservato al solo destinatario. L'utilizzo non autorizzato può costituire reato. Se ricevuto erroneamente siete pregati di cancellarlo e comunicarci via e-mail l'errata ricezione.

Di Maio, Dario

unread,
May 25, 2016, 2:26:10 AM5/25/16
to sou...@googlegroups.com

If you add in your sketch #define LOG UDP.write you will get all Souliss debug messages (if enabled) as well.

It may be that the latest ESp cores have problems with the Serial object.

Dario.

From Mobile.

--

Flavio P.

unread,
May 25, 2016, 2:32:02 AM5/25/16
to sou...@googlegroups.com
This is very intresting! Thanks Dario!


For more options, visit https://groups.google.com/d/optout.

Gabriele Ribichini

unread,
May 25, 2016, 4:08:07 AM5/25/16
to souliss
I am sorry.. it was a bit late and I forgot to say that you also need to call :

Udp.begin(UDP_PORT)

in setup function.

Juan Pinto

unread,
May 25, 2016, 1:25:55 PM5/25/16
to souliss
Good work, tnx for sharing :)
 
Regards

Fulvio Spelta

unread,
May 26, 2016, 2:21:24 PM5/26/16
to souliss
+1

Dario Cdj

unread,
Nov 10, 2017, 2:40:30 PM11/10/17
to souliss
+1 +1 +1 +1 never read this post ! 

Fulvio Spelta

unread,
Nov 11, 2017, 5:47:38 AM11/11/17
to souliss
maybe a good idea to pin this post for a while ?
Reply all
Reply to author
Forward
0 new messages