Does a MAC-layer broadcast on Wi-Fi get sent to each client directly, or through the router?












2















I'm trying to find a way to get my Android device to send frequent Wi-Fi packets into the air so I can detect them from multiple base stations for interior positioning. The canonical way to do this is to use Android's Wifi.scan(). Unfortunately that's limited to once every 30 seconds, which isn't frequent enough for my use case.



If I send a UDP broadcast message to 255.255.255.255, that should translate to an MAC-layer destination of ff:ff:ff:ff:ff:ff. My question is whether that packet is sent "directly" to each client on the affiliated network, in which case the clients will have RSSI information that can be used for positioning.



Or, does that broadcast message go only to the router who then distributes it on the next DTIM interval, and in which case the clients wouldn't have any useful information about the broadcaster in terms of their relative position/RSSI.










share|improve this question





























    2















    I'm trying to find a way to get my Android device to send frequent Wi-Fi packets into the air so I can detect them from multiple base stations for interior positioning. The canonical way to do this is to use Android's Wifi.scan(). Unfortunately that's limited to once every 30 seconds, which isn't frequent enough for my use case.



    If I send a UDP broadcast message to 255.255.255.255, that should translate to an MAC-layer destination of ff:ff:ff:ff:ff:ff. My question is whether that packet is sent "directly" to each client on the affiliated network, in which case the clients will have RSSI information that can be used for positioning.



    Or, does that broadcast message go only to the router who then distributes it on the next DTIM interval, and in which case the clients wouldn't have any useful information about the broadcaster in terms of their relative position/RSSI.










    share|improve this question



























      2












      2








      2








      I'm trying to find a way to get my Android device to send frequent Wi-Fi packets into the air so I can detect them from multiple base stations for interior positioning. The canonical way to do this is to use Android's Wifi.scan(). Unfortunately that's limited to once every 30 seconds, which isn't frequent enough for my use case.



      If I send a UDP broadcast message to 255.255.255.255, that should translate to an MAC-layer destination of ff:ff:ff:ff:ff:ff. My question is whether that packet is sent "directly" to each client on the affiliated network, in which case the clients will have RSSI information that can be used for positioning.



      Or, does that broadcast message go only to the router who then distributes it on the next DTIM interval, and in which case the clients wouldn't have any useful information about the broadcaster in terms of their relative position/RSSI.










      share|improve this question
















      I'm trying to find a way to get my Android device to send frequent Wi-Fi packets into the air so I can detect them from multiple base stations for interior positioning. The canonical way to do this is to use Android's Wifi.scan(). Unfortunately that's limited to once every 30 seconds, which isn't frequent enough for my use case.



      If I send a UDP broadcast message to 255.255.255.255, that should translate to an MAC-layer destination of ff:ff:ff:ff:ff:ff. My question is whether that packet is sent "directly" to each client on the affiliated network, in which case the clients will have RSSI information that can be used for positioning.



      Or, does that broadcast message go only to the router who then distributes it on the next DTIM interval, and in which case the clients wouldn't have any useful information about the broadcaster in terms of their relative position/RSSI.







      wireless-networking broadcast






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 28 at 19:14









      Spiff

      77.7k10118163




      77.7k10118163










      asked Jan 28 at 0:57









      RyanRyan

      111




      111






















          1 Answer
          1






          active

          oldest

          votes


















          2














          All* wireless-to-wireless packets on Wi-Fi are relayed by the AP, always. Even unicasts. Yes, as you suspected, multicasts and broadcasts are buffered by the AP until right after the next DTIM beacon goes out, and then the AP transmits each buffered multicast or broadcast exactly once.



          When the AP transmits a buffered multicast or broadcast, it does so at a low-ish data rate that should be able to be reliably received by all clients, because these packets are not Ack'd. Often this low-ish data rate is the lowest rate the AP can use, which makes multicasts and broadcasts very expensive because they always go out at low rates that eat up a lot of airtime. So you really don't want to be sending frequent multicasts or broadcasts on wireless.



          So no matter what, when a client of an AP receives a packet, the signal strength it sees is always a reflection of the AP's Tx power and distance, never the original sender's power and distance.



          (*All: There's a technology called TDLS (Tunneled Direct Link Setup) that could allow clients to send packets directly to each other without being relayed through the AP, but support for TDLS appears to be very rare, if it exists at all.)






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1399076%2fdoes-a-mac-layer-broadcast-on-wi-fi-get-sent-to-each-client-directly-or-through%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            All* wireless-to-wireless packets on Wi-Fi are relayed by the AP, always. Even unicasts. Yes, as you suspected, multicasts and broadcasts are buffered by the AP until right after the next DTIM beacon goes out, and then the AP transmits each buffered multicast or broadcast exactly once.



            When the AP transmits a buffered multicast or broadcast, it does so at a low-ish data rate that should be able to be reliably received by all clients, because these packets are not Ack'd. Often this low-ish data rate is the lowest rate the AP can use, which makes multicasts and broadcasts very expensive because they always go out at low rates that eat up a lot of airtime. So you really don't want to be sending frequent multicasts or broadcasts on wireless.



            So no matter what, when a client of an AP receives a packet, the signal strength it sees is always a reflection of the AP's Tx power and distance, never the original sender's power and distance.



            (*All: There's a technology called TDLS (Tunneled Direct Link Setup) that could allow clients to send packets directly to each other without being relayed through the AP, but support for TDLS appears to be very rare, if it exists at all.)






            share|improve this answer




























              2














              All* wireless-to-wireless packets on Wi-Fi are relayed by the AP, always. Even unicasts. Yes, as you suspected, multicasts and broadcasts are buffered by the AP until right after the next DTIM beacon goes out, and then the AP transmits each buffered multicast or broadcast exactly once.



              When the AP transmits a buffered multicast or broadcast, it does so at a low-ish data rate that should be able to be reliably received by all clients, because these packets are not Ack'd. Often this low-ish data rate is the lowest rate the AP can use, which makes multicasts and broadcasts very expensive because they always go out at low rates that eat up a lot of airtime. So you really don't want to be sending frequent multicasts or broadcasts on wireless.



              So no matter what, when a client of an AP receives a packet, the signal strength it sees is always a reflection of the AP's Tx power and distance, never the original sender's power and distance.



              (*All: There's a technology called TDLS (Tunneled Direct Link Setup) that could allow clients to send packets directly to each other without being relayed through the AP, but support for TDLS appears to be very rare, if it exists at all.)






              share|improve this answer


























                2












                2








                2







                All* wireless-to-wireless packets on Wi-Fi are relayed by the AP, always. Even unicasts. Yes, as you suspected, multicasts and broadcasts are buffered by the AP until right after the next DTIM beacon goes out, and then the AP transmits each buffered multicast or broadcast exactly once.



                When the AP transmits a buffered multicast or broadcast, it does so at a low-ish data rate that should be able to be reliably received by all clients, because these packets are not Ack'd. Often this low-ish data rate is the lowest rate the AP can use, which makes multicasts and broadcasts very expensive because they always go out at low rates that eat up a lot of airtime. So you really don't want to be sending frequent multicasts or broadcasts on wireless.



                So no matter what, when a client of an AP receives a packet, the signal strength it sees is always a reflection of the AP's Tx power and distance, never the original sender's power and distance.



                (*All: There's a technology called TDLS (Tunneled Direct Link Setup) that could allow clients to send packets directly to each other without being relayed through the AP, but support for TDLS appears to be very rare, if it exists at all.)






                share|improve this answer













                All* wireless-to-wireless packets on Wi-Fi are relayed by the AP, always. Even unicasts. Yes, as you suspected, multicasts and broadcasts are buffered by the AP until right after the next DTIM beacon goes out, and then the AP transmits each buffered multicast or broadcast exactly once.



                When the AP transmits a buffered multicast or broadcast, it does so at a low-ish data rate that should be able to be reliably received by all clients, because these packets are not Ack'd. Often this low-ish data rate is the lowest rate the AP can use, which makes multicasts and broadcasts very expensive because they always go out at low rates that eat up a lot of airtime. So you really don't want to be sending frequent multicasts or broadcasts on wireless.



                So no matter what, when a client of an AP receives a packet, the signal strength it sees is always a reflection of the AP's Tx power and distance, never the original sender's power and distance.



                (*All: There's a technology called TDLS (Tunneled Direct Link Setup) that could allow clients to send packets directly to each other without being relayed through the AP, but support for TDLS appears to be very rare, if it exists at all.)







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 28 at 19:10









                SpiffSpiff

                77.7k10118163




                77.7k10118163






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1399076%2fdoes-a-mac-layer-broadcast-on-wi-fi-get-sent-to-each-client-directly-or-through%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                    Mangá

                     ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕