ESP8266 debug via UDP

255 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Gabriele Ribichini

ungelesen,
24.05.2016, 18:40:3924.05.16
an 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.

ungelesen,
25.05.2016, 02:17:3025.05.16
an 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

ungelesen,
25.05.2016, 02:26:1025.05.16
an 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.

ungelesen,
25.05.2016, 02:32:0225.05.16
an sou...@googlegroups.com
This is very intresting! Thanks Dario!


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

Gabriele Ribichini

ungelesen,
25.05.2016, 04:08:0725.05.16
an 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

ungelesen,
25.05.2016, 13:25:5525.05.16
an souliss
Good work, tnx for sharing :)
 
Regards

Fulvio Spelta

ungelesen,
26.05.2016, 14:21:2426.05.16
an souliss
+1

Dario Cdj

ungelesen,
10.11.2017, 14:40:3010.11.17
an souliss
+1 +1 +1 +1 never read this post ! 

Fulvio Spelta

ungelesen,
11.11.2017, 05:47:3811.11.17
an souliss
maybe a good idea to pin this post for a while ?
Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten