bportaluri / WiFiEsp

Arduino WiFi library for ESP8266 modules
GNU General Public License v3.0
551 stars 210 forks source link

UDP link is not valid #210

Open aahondema opened 3 years ago

aahondema commented 3 years ago

Hi, I'm having troubles sending data to a syslog server. I use the syslog.h library for it. Data is send via UDP. Whenever I send data to this server I get the following messages:

21:21:04.818 -> > sendDataUdp: 3 15 21:21:04.818 -> > sendDataUdp: 192.168.68.104 514 21:21:04.865 -> [WiFiEsp] AT+CIPSEND=3,15,"192.168.68.104",514 21:21:04.958 -> link is not valid

As you can see I altered the debugging option from WIFIESP to 4 to get more info. The syslog server is on the mentioned IP number and on port 514. The WiFi connection is up and running, I also send message to a MQTT server and those are send without any problems. I have been trying for hours to get this working but with no result. I also have a nodemcu on which I use another WiFi library (WiFi8266) and there I can send syslog messages without a problem. I have no idea what causes the 'link is not valid' message.

Any ideas please??

Adrian

JAndrassy commented 3 years ago

you didn't call begin. some WiFi libraries including this one require to call begin on UDP even if you don't want to listen for UDP messages, but only send a message.

if you can update AT firmware to AT 1.7.4 (SDK 3), then you can use my WiFiEspAT library which is better

aahondema commented 3 years ago

YES, that's it! Thank you very, very much Jan!

JAndrassy commented 3 years ago

YES, that's it! Thank you very, very much Jan!

it is Juraj Andrassy

aahondema commented 3 years ago

Ah, I mis-interpreted your name, thought it was Jan Drassy :). Sorry fot that! Nevertheless, thanks again Juraj! Adrian