-->
Page 1 of 1

aurdino ESP8266 UDP server, Very difficult to get answers

PostPosted: Thu Jan 04, 2018 10:01 am
by stranden
aurdino ESP8266-EVB (olimex) with ESP8266EX , UDP server,
Very difficult to get answers from my udp clients on my PCs.
Accesspoint TPlink6400 (mobilt 4G)

I can find the ESP8266 module from TPlink and with command arp -a from my PC. With ping command, I alternatively receive 1-2 packages in response, sometimes nothing at all.

A mystery to: what mode?
// # Name Description
// 0 WIFI_OFF The wifi is... off!
// 1 WIFI_STA Station mode - the ESP is working as a wifi client
// 2 WIFI_AP Access point mode - other wifi clients will be able to connect to the ESP
// 3 WIFI_AP_STA AP + Station mode - The ESP8266 is acting both as a station and as an access point

I have WIFI_STA. Is it ok?

I have no delay (DELAY); in the program

void loop()
{
check_if_packet();
check_up_connection();
process_incoming_serial();
}///void loop()

void check_if_packet()
{
int packetSize = wifiUDP.parsePacket();
if(packetSize)
{...}
}///

void check_up_connection()
{
wl_status_t newStatus = WiFi.status();
if (newStatus != preStatus)
{...}
}///

void process_incoming_serial()
{
char chS;
if (Serial.available() > 0 )
{...}
}///

to make a call every 10 seconds, polling, I do not think it's any good.
any clue, UDP server?