Page 252 - Hacking Roomba
P. 252

Chapter 12 — Going Wireless with Wi-Fi               233




                                                 To Internet                         To Internet






                                          Router                             Router







                                           Hub                             Access point








                              Laptop     Laptop    Laptop        Laptop     Laptop    Laptop
                                       Ethernet network                   Wi-Fi network
                             FIGURE 12-1: Wired versus wireless networks, the topology is the same


                             Wi-Fi modifies the algorithm a bit and is instead CSMA/CA; the CA stands for collision
                             avoidance. Unlike on a physical cable, with radio it’s hard to tell if someone else is transmitting
                             while you’re transmitting. So in CA, when a device wants to talk, it will first send a jam signal.
                             This is sort of like blowing a whistle or clearing your throat: it gets through when normal con-
                             versation tones wouldn’t. The jam signal puts all other devices in a listen state for a while as
                             they wait for the transmitting device.
                             One problem results with both CD and CA algorithm: Data transmission in both degrades
                             sharply once a critical mass of devices get on the shared medium (wire or radio channel). With
                             many devices on the same Ethernet with CD, collisions happen so frequently hardly any data is
                             sent. In Wi-Fi with CA, jam signals are frequent as devices start to talk; stopping all transmis-
                             sions and again hardly any data is sent. In both cases the solution is to reduce the number of
                             devices. In Ethernet that means moving devices to a different hub; in Wi-Fi that means mov-
                             ing them to a different access point. Hubs or access points are then connected together and talk
                             among themselves as if they’re each a single entity.

                             Roaming and Disconnects
                             In Ethernet, when you disconnect the cable and move a device to a different location and hub,
                             the hub can tell when the cable is unplugged and plugged in.These events are used to update the
                             internal ARP tables used by all devices to route Ethernet traffic. The result is that you’re back
   247   248   249   250   251   252   253   254   255   256   257