Search code examples
network-programmingudpwirelessadhoc

Wireless Oneway Broadcast Feasibility


I am planning on a small project and need help regarding its feasibility.

I have a few wireless mobile devices (could be phones and laptops) which periodically broadcast packets and also each device listens for other broadcasts. Any device in range should receive the broadcasted data (no need to reply or ackwnoledge).

  1. To perform this can I just send UDP packets with address 255.255.255.255, I heard this was deprecated. If so how do I achieve this? There is no underlying network topology so I cannot rely on multicast or is there a way?
  2. If there are 100 such devices, all in wireless range, each 1 performing a periodic broadcast and receive, will it work? will there be too many collisions ? and become infeasible. Each device receiving 70% of the packets is a good performance according to me.

Thank You


Solution

  • Unfortunately, it doesn't work this way.

    You won't be able to send IP-layer broadcast packets until you have associated with an access point. Once association has been made, only devices associated with the same AP (and other devices bridged to the IP over its wired interface) will see your broadcasts. The same goes for layer 2 broadcasts as well.

    What you need is to get at a lower layer. Unfortunately, each WiFi adapter has different methods for doing this, and for many, it isn't even possible. I'm afraid what you are attempting will not work.