Page 238 - Hacking Roomba
P. 238
Chapter 11 — Connecting Roomba to the Internet 219
Debugging Network Devices Continued
The arp command in the code is from a computer on the same network as the previous
nmap command. Notice how the computer doesn’t know the MAC addresses of every
device on the network because it hasn’t talked to all of them. When displaying ARP entries,
the arp command does a DNS lookup of the IP address and displays the name if there is
one. If there is no name, it displays ?.
Other Tools
There are many other useful tools in addition to the above. The ifconfig (ipconfig.exe
on Windows) command shows you what IP address your computer has. The telnet
program is a great way to connect to arbitrary ports of any IP address. By telnetting to port
80, you can see what web servers and browsers are really saying to each other. The
traceroute (tracert.exe) command will show the path through the Net that your packets
take. The netstat -r command will show you what routers your computer knows about.
Testing SitePlayer Telnet
When your SitePlayer Telnet–based gadget is on the Net and configured correctly, you should
test it before sticking on your Roomba. Fortunately, in the case of the SitePlayer Telnet System
box, you can do a full end-to-end test using the equipment from previous chapters. The plan is
to use your computer to go from Ethernet to SitePlayer Telnet System to USB-to-serial adapter
and back to the computer.
Start with the Keyspan USB-to-serial adapter (or other serial port adapter) and plug it into
your computer. Connect a DB-9 female to DB-9 female cable to the computer, and connect the
other end of the cable to the SitePlayer Telnet System box. Plug an Ethernet cable into the
SitePlayer Telnet System box and into an Ethernet hub. Finally, plug your computer into the
Ethernet hub, too. Figure 11-11 shows the completed loop.
When everything is connected and turned on, open up both a serial port terminal program like
ZTerm or RealTerm and a terminal window like Terminal or CMD.EXE. In the serial termi-
nal, open the serial port like before. In the terminal window, telnet to the SitePlayer Telnet IP
address. When it connects, anything you type in one terminal window shows up in the other.
Congratulations, you’ve just created the world’s smallest multi-protocol network (and perhaps
the most pointless network for not testing serial-to-Ethernet devices).
Hooking the SitePlayer Telnet to Roomba
Now that you’ve fully verified the SitePlayer and know that it works from both ends, it’s time
to hook it up to your Roomba. The easiest way to do that is with the SitePlayer Telnet System
box and the serial tether created in Chapter 3. Connect the serial tether as normal, plug the
tether into the SitePlayer Telnet System box, and then plug the SitePlayer Telnet into an
Ethernet hub. Figure 11-12 shows this setup.