Page 372 - Hacking Roomba
P. 372

Chapter 15 — RoombaCam: Adding Eyes to Roomba                     353




                               Listing 15-6 Continued

                               usbserial
                               pl2303
                               videodev
                               spca5xx_lite
                               scsi_mod
                               sd_mod
                               sg
                               usb-storage
                               fat
                               vfat



                             Make sure you save any programs you want saved to /usr/bin and not in /tmp. Otherwise,
                             they’ll disappear on reboot, since /tmp is a RAM disk. This includes roombacmd, camstart,
                             stty, and any other scripts or commands you want.
                             The web and CGI files you create live in /www, which is already flash, so you won’t have to
                             worry about them disappearing.


                                    Building a USB Serial Tether from a Phone Sync Cable

                          Using the RS-232 serial tether from Chapter 3 with a generic USB-to-serial adapter works
                          but is very ungainly. The tether’s long cable is hard to manage when the controlling com-
                          puter is right on top of the Roomba. Building a tether with a shorter cable is definitely pos-
                          sible, but a really small solution is to use a USB data cable originally meant to sync mobile
                          phones. Some mobile phones have logic-level serial ports on them instead of USB inter-
                          faces, and the sync cables contain small USB-to-serial adapters. These cables are available
                          for about $20 from various places, including Radio Shack. Since this is a Roomba USB
                          dongle, it’s called the Roombongle.
                          Things you’ll need to build the Roombongle:

                          ■ USB data cable for Nokia phones (AKA FutureDial Cable 22), Radio Shack part number
                            17-762
                          ■ Mini-DIN 8-pin cable, Jameco part number 10604

                          The construction is really straightforward:
                          1. Acquire the right USB sync cable. Figure 15-11 shows the packaging for the sync cable
                            used here, and Figure 15-12 shows what the cable looks like. It’s very important to get
                            Cable 22, which has the bulge in the middle, and not one of the other cables. Other
                            cables can be used, but you’ll have to figure out the pinouts.
                                                                                            Continued
   367   368   369   370   371   372   373   374   375   376   377