10.09.2016 Views

Hacking_and_Penetration_Testing_with_Low_Power_Devices

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Remote control the easy way<br />

167<br />

FIGURE 7.9<br />

Configuring a Series 2 modem as an end device.<br />

can be remotely controlled. In order for this to work, the XBee radios must be set to<br />

operate in transparent mode. We will first consider the easiest case of a single remote<br />

drone. The XBee radio on the comm<strong>and</strong> console should have its DL address set to<br />

match the MY address of the drone.<br />

To set up TTY on your drone on UART2 (the one used by the XBee cape <strong>and</strong><br />

mini-cape described in the previous chapter), create a file named ttyO2.conf (i.e.,<br />

an O not a zero!) in /etc/init <strong>with</strong> the following contents:<br />

# ttyO2 - getty<br />

# This service maintains a getty on ttyO2 from the point the\<br />

system is<br />

# started until it is shut down again.<br />

start on stopped rc RUNLEVEL¼[2345]<br />

stop on runlevel [!2345]<br />

respawn<br />

exec /sbin/getty -8 57600 ttyO2<br />

The TTY process will automatically start each time the system is rebooted. To<br />

start the TTY services immediately, execute the comm<strong>and</strong> sudo start ttyO2.<br />

Any terminal program can be used on the comm<strong>and</strong> console to log in to the drone.<br />

Set the terminal program to connect to the correct serial port on the comm<strong>and</strong> console

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!