Figure 4.
The badge allows you
to display four of 11
possible glyphs at a
time on the LCD to
indicate your hobbies
or interests.
share their hobbies or interests. Conference attendees can
then walk around and look at other people’s badges to
see if their interests match. If so, they may decide to strike
up a conversation. To enter the Glyph Selection mode,
you press SW2 from the DEFCON logo screen. SW1 and
SW2 are then used to cycle through the glyphs. Pressing
SW1 and SW2 at the same time will select the glyph. This
process is repeated for each of the four available glyph
locations on the LCD.
Figure 4 shows the glyphs, starting from the upper-left
corner: drinking, gambling, videogames,
electronics/soldering, lockpicking, looking for love, music,
networking, software, telephony, and wireless. Figure 5
shows a close-up of my personal badge’s screen with my
four selected glyphs.
LCD Control API
In the hopes of attracting more software hackers or
those with limited electronics knowledge to poke around
with the badge, I created an LCD Control API (Application
Programming Interface) in which the LCD can be written
to or erased using simple serial commands sent at 9600
bps through the badge’s USB virtual serial port (provided
by U2, the FTDI FT232RL USB-to-serial UART converter).
Using scripts or a terminal program such as Hyper Terminal
or Cool Term, the user can display custom graphics or text
on the LCD.
To enter the LCD Control API mode, the badge must
be connected to a computer via USB and a single ‘#’
character should be sent. The badge will return a welcome
string in ASCII.
The API supports four commands:
• ‘C’ = Clear frame buffer (which is stored in
MC56F8006 RAM on the badge)
Note that while the command bytes are printable
ASCII characters, the data and location values within
command L are raw bytes in hexadecimal. The badge will
return ACK (‘.’) after a valid command has been received
and processed.
A few conference attendees quickly created tools to
send a bitmap image to the badge, such as Brad Isbell’s
DEFCON 18 badge Image Writer ( www.musatcha.com/
software/DC18BadgeImage Writer/). The API was widely
used throughout the weekend and I chuckled as I saw all
of the funny messages and graphics displayed on people’s
badges.
Bootloader
In order to provide a mechanism for attendees to
easily load new firmware into the MC56F8006’s Flash
memory to aid in badge hacking and customization, I
implemented a static bootloader based heavily on
Freescale’s AN3814 application note. The bootloader
communicates via U1‘s RXD and TXD pins at 9600 bps
through U2 and is enabled when both SW1 and SW2 are
held down at power-on. LEDs D3 and D4 will illuminate,
indicating that the badge is in bootloader mode awaiting
data, and the virtual COM port will appear on the host
computer.
The beauty of the bootloader is that no specialized
hardware or development tools are needed, so it lowers
the barrier to entry for new hackers and people looking to
experiment with the badge. During this mode, one can
load firmware onto the badge by simply uploading the
ASCII text-based S-Record file of the compiled program
(generated by Code Warrior) using a simple terminal
application. Load time for a full 16 KB program is around
90 seconds.
Here is an example of the text output during
bootloader usage:
Serial bootloader started.
Waiting for application S-Record.
PROGRAM&DATA*************************************
Download complete.
Starting user application.
Welcome to the DEFCON 18 Badge.
If the firmware gets corrupted through a faulty
programming or runtime operation, an unpopulated 2x7
header is available for the MC56F8006’s JTAG interface
(TDI, TMS, TDO, TCK, and RST). The JTAG interface can
be used for complete firmware reprogramming (including
the bootloader) and full debugging using Code Warrior
and the USB TAP hardware ( www.freescale.com/webapp/
sps/site/prod_summary.jsp?code=USBTAP).
Laser Engraving
The badge is the face of DEFCON worn by every
attendee. Almost as important as the electronic
functionality of the badge is what it looks like.
In my quest to incorporate a never-been-done-before
artistic element, I decided to use 0.040” thick aluminum
substrate printed circuit boards and laser engrave