DEFCON 22 Badge: Propeller P8X32A 32-bit Multicore Microcontroller Programming Fun
DEFCON 22 was a blast! Aside from the parties and the challenges, my mates and I spent some time reprogramming the badge. The badge itself is great: "The circuit consists of a Propeller (microcontroller, EEPROM, clock), an infrared LED and receiver for badge-to-badge communication, a bank of eight LEDs for visual feedback, four button touch pads and a USB circuit for data access and programming. Most importantly, this badge is useful well beyond DEFCON because it's a complete Propeller development board. All I/Os, Vss, Gnd connections are clearly ported to the side of the badge so you can solder directly to the I/O pins or jump them off to a breadboard." The Propeller has 8 cores, 32kb of RAM and 32kb of ROM. The Propeller can be overclocked, the badge has built in IR transmitters and receivers, and it can run a number of languages including C, FORTH, Pascal, and Spin. It should also be noted that Spin Code is interpreted, so it will run slower than native Propeller Assembly. Before I get any further, I should clarify that this article is about coding on the badge, exploring some of it's functionality, just generally having fun, and not necessarily about solving the badge puzzles.
To start playing with the code, you will need the IDE, which should come w/ drivers. You may also want to grab the manual. From there you can grab some of the default code, and quickly see the spin is easy to work with and fairly well commented. The pub functions, light routines, and data sections are all fairly self explanatory. Up top we also have variable and object declaration as well as io pin configuration. In the main function of the code you will notice four bits of binary above code that calls the light patterns, these represent the touch contacts on the front of the badge; you will use these contacts to change which functions run on the badge. When flashing your code to the badge you will want to make sure to only flash the RAM until you are certain you want your changes to be final. Using the serial terminal at 57600 baud can also show some pretty interesting text as a result of the two cipher functions (otp and caesar) on the stored strings.
Overall, there have been some great hacks, a ton of custom lights and fading LEDS using the PWM modules. Friends have even made drum samplers! By far the coolest hack was turning the badge into a UAV. We all started out with the human eeprom, but quickly many people flashed the goon eeprom. There was even a laser tag eeprom design floating around. I've found the easiest way to flash the eeprom is using the tool propeller-load, like so: propeller-load -e goon.eeprom32.bin. And if you find you want to dump the eeprom from a given page, check out the tool unload_prop. Now, I've uploaded two custom badge spin files. My first file, dc_badge_22_ninja.spin uses a new cog to constantly read as a background process, which was used to get the IR code from a flashed goon badge ROM we had. Then I added a function to send this IR value out, which was as simple as outputting the hex value "DC22". I mapped this to a button function and I also turned off all the LEDs when this is sending signals out, because I wanted a more stealth approach to lighting up peoples badges in a crowded room. My next file, dc22_badge_human_vision_persistance.spin, has four custom animations that use persistence of vision, saying such things as "HI", "FUCK", "1337", and "2600". All you have to do it shake the badge side to side at the right speed (similar to, but not this one).
I hope you enjoy this bit of code!! I'll be updating this post soon w/ more sweet DC22 Propeller Badge hacks!
To start playing with the code, you will need the IDE, which should come w/ drivers. You may also want to grab the manual. From there you can grab some of the default code, and quickly see the spin is easy to work with and fairly well commented. The pub functions, light routines, and data sections are all fairly self explanatory. Up top we also have variable and object declaration as well as io pin configuration. In the main function of the code you will notice four bits of binary above code that calls the light patterns, these represent the touch contacts on the front of the badge; you will use these contacts to change which functions run on the badge. When flashing your code to the badge you will want to make sure to only flash the RAM until you are certain you want your changes to be final. Using the serial terminal at 57600 baud can also show some pretty interesting text as a result of the two cipher functions (otp and caesar) on the stored strings.
Overall, there have been some great hacks, a ton of custom lights and fading LEDS using the PWM modules. Friends have even made drum samplers! By far the coolest hack was turning the badge into a UAV. We all started out with the human eeprom, but quickly many people flashed the goon eeprom. There was even a laser tag eeprom design floating around. I've found the easiest way to flash the eeprom is using the tool propeller-load, like so: propeller-load -e goon.eeprom32.bin. And if you find you want to dump the eeprom from a given page, check out the tool unload_prop. Now, I've uploaded two custom badge spin files. My first file, dc_badge_22_ninja.spin uses a new cog to constantly read as a background process, which was used to get the IR code from a flashed goon badge ROM we had. Then I added a function to send this IR value out, which was as simple as outputting the hex value "DC22". I mapped this to a button function and I also turned off all the LEDs when this is sending signals out, because I wanted a more stealth approach to lighting up peoples badges in a crowded room. My next file, dc22_badge_human_vision_persistance.spin, has four custom animations that use persistence of vision, saying such things as "HI", "FUCK", "1337", and "2600". All you have to do it shake the badge side to side at the right speed (similar to, but not this one).
I hope you enjoy this bit of code!! I'll be updating this post soon w/ more sweet DC22 Propeller Badge hacks!