ESP8266-RTOS SDK , Directed Broadcast Fails

plusorc
Posts: 36
Joined: Sat Nov 09, 2019 6:27 am

ESP8266-RTOS SDK , Directed Broadcast Fails

Postby plusorc » Fri Jul 23, 2021 3:21 am

Hello

I'm having hard time trying to get 8266-Rtos to do a directed UDP Broadcast (192.168.1.255)
The example Server in the IDF does work but loses so many packets , This doesn't happen with
2 Android Phones using the same Subnet .

Sending a Unicast packet to the chip works with almost 99% success .

Now , in the example The Server Responds to the IP which sent The Broadcast Msg .
testing this with packet sender -> It works sometimes but again there is a big loss in packets .

But The total failure comes from trying to make an Android Phone receives the broadcast from 8266, this didn't
work at all .

Is there any example that can show who this should work ?

I understand that Broadcasting is not recommended , and it's advised to to multicast
But The situation we have can't use muticast , Cause there will be different Chips on different Subnets , So we need
Broadcast to work .

Also , 2 Android phones Do Broadcast and almost no data loss too , So I don't think it's the router
blocking the packets .

The sample I'm using to test this is the udp_server in the examples , and I only change the Address of sending
when I try to make a Directed Broadcast .

But Unicast , or Broadcast doesn't Reach to Android Phones , while sending through NC from linux or packet sender
does reach the mobile with no or very minimum loss of packets .

Wireshark Doesn't show packets sent from ESP8266

I understand this is confusing , so to make this more clear :
---------------------------------------------------------------------------
1-Sending From packet sender to ESP8266 Unicast -> works 99%
2-Sending From packet sender to ESP8266 Multicast -> works maybe only 10% of cases .
3-Sending from Android Phone to ESP8266 Multicast -> The chip gets the packet 10% of cases , but it never responds to it .
4-Testing Broadcast from ESP8266 -> 10% of cases reach packet sender but never Android phones .
5-sending Broadcast from packet sender -> 99% of time reaches the Android mobiles .



Thanks for any help or direction

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 69 guests