Page 263 - Hacking Roomba
P. 263

244       Part III — More Complex Interfacing




                             and the WiMicro will be on that network. This makes finding it a bit easier. The IP address
                             range used on this network is the default one used when there’s no DHCP server or static
                             IP address configured: the 169.254/16 network. /16 means the broadcast ping address is
                             169.254.255.255 and either device’s IP address must start with 169.254.
                             When you’re on the LTRX_IBSS net, the steps to find the WiMicro address are:

                               1. Determine your own IP address.
                               2. Broadcast ping 169.254.255.255.
                               3. Look at responses and pick the one that isn’t yours.
                             Listing 12-1 shows an example of doing this on a Unix-like OS. The ifconfig command
                             gives the IP address of the computer called demo: 169.254.86.198. The ping command
                             then shows two devices responding, the demo computer and something else at 169.265.78.119.
                             That’s the WiMicro. From this point you can use the web interface or telnet interface to con-
                             figure it.

                             If you don’t have a Wi-Fi access point but do have a computer with wireless access, you can
                             keep the WiMicro in ad-hoc mode and connect directly to its LTRX_IBSS wireless network. This
                             enables you to experiment with a Wi-Fi Roomba without needing the Wi-Fi router normally
                             required.


                               Listing 12-1: Finding the WiMicro with ping

                               demo% ifconfig en1
                               en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST>
                               mtu 1500
                                        inet6 fe80::20d:93ff:fe86:fb49%en1 prefixlen 64 scopeid
                               0x5
                                        inet 169.254.86.198 netmask 0xffff0000 broadcast
                               169.254.255.255
                                        ether 00:0d:93:86:fb:49
                                        media: autoselect status: active
                                        supported media: autoselect
                               demo% ping 169.254.255.255
                               PING 169.254.255.255 (169.254.255.255): 56 data bytes
                               64 bytes from 169.254.86.198: icmp_seq=0 ttl=255 time=0.240 ms
                               64 bytes from 169.254.78.119: icmp_seq=0 ttl=64 time=2.208 ms
                               (DUP!)
                               64 bytes from 169.254.86.198: icmp_seq=1 ttl=255 time=0.247 ms
                               64 bytes from 169.254.78.119: icmp_seq=1 ttl=64 time=2.304 ms
                               (DUP!)
                               ^C
                                -- - 169.254.255.255 ping statistics  -- -
                               2 packets transmitted, 2 packets received, +2 duplicates, 0%
                               packet loss
                               round-trip min/avg/max/stddev = 0.240/1.250/2.304/1.007 ms
   258   259   260   261   262   263   264   265   266   267   268