-
Notifications
You must be signed in to change notification settings - Fork 20
Serial Console
UsbArmory has a serial port at 115200 8N1 - no flow control - to interact with uBoot and the console. Compatible interface such devices as the Bus Pirate, Arduino-style "FTDI" cables, and custom cables. I'm currently using a CP2102 breakout (which provides enough current to power the UsbArmory) and a set of test hooks to avoid installing a set of header pins.
The minimal set of pins to be connected are:
1 GND (square pad)
5 UART1_TX (output from i.MX)
6 UART1_RX (input to i.MX)
The kernel bootargs must contain this parameter: console=ttymxc0,115200
Add this to /etc/inittab to start a listener on the serial console T0:23:respawn:/sbin/getty -L console 115200 vt100
Additionally, the USB Armory can emulate a USB CDC-ACM serial device. To use this
modprobe g_serial use_acm=1
echo 'GS0::respawn:/sbin/getty -L ttyGS0 115200 vt100' >> /etc/inittab
-or-
echo 'GS0::respawn:-/bin/sh' >> /etc/inittab # unauthenticated root shell, for testing
echo 'ttyGS0' >> /etc/securetty
kill -HUP 1
Then you can connect to the exported serial port:
minicom -b 115200 -8 -D /dev/ttyACM0
-or-
screen /dev/ttyACM0 115200 8N1
-or-
picocom -b 115200 -p n -d 8 /dev/ttyACM0
The Bus Pirate is an open source hacker multi-tool that talks to electronic stuff. It's got a bunch of features an intrepid hacker might need to prototype their next project. (http://dangerousprototypes.com/docs/Bus_Pirate)
The SparkFun version has a non-standard pin-out. Connect to the Bus Pirate with
minicom -b 115200 -8 -D /dev/buspirate
-or-
screen /dev/buspirate 115200 8N1
-or-
picocom -b 115200 -p n -d 8 /dev/buspirate
(https://wiki.archlinux.org/index.php/Bus_pirate)
UsbArmory Beta | BusPirate | Wire | Notes
---------------+-----------+--------+------
GND | GND | Black | square pad
USB5V | N/C | | BP doesn't supply enough current to boot the Armory, don't even try
N/C | N/C | |
UART1_TX | MISO_RX | Brown |
UART1_RX | MOSI_TX | Orange |
N/C | N/C | |
N/C | N/C | |
UsbArmory MK1 | BusPirate | Wire | Notes
--------------+-----------+--------+------
GND | GND | Black | square pad
USB5V | N/C | | BP doesn't supply enough current to boot the Armory, don't even try
N/C | N/C | |
N/C | N/C | |
UART1_TX | MISO_RX | Brown |
UART1_RX | MOSI_TX | Orange |
N/C | N/C | |
Configure with
- m (mode)
- 3 (uart)
- 9 (115200)
- 1 (8N)
- 1 (8N1)
- 1 (Idle 1)
- 2 (Normal)
- (1)