Shop OBEX P1 Docs P2 Docs Learn Events
__red__'s Defcon 22 "Hack the Badge" write-up. — Parallax Forums

__red__'s Defcon 22 "Hack the Badge" write-up.

__red____red__ Posts: 470
edited 2014-08-24 03:06 in General Discussion
I'm sitting on a plane on my way back from Defcon 22. Please forgive
the awful spelling and grammar but I wanted to make sure I got it
posted before I returned to my normal life and didn't have time to work
on anything.

Defcon for the uninitiated in the world's largest Hacker Conference. I like to think of it
as me, and 20,000 of my closest friends.

A few days before the con 1o57 (one of the badge designers) posted a
somewhat "cryptic" tweet: <link here>. Reading through the not so subtle
hint I then knew that the badge was going to be built around the propeller.

Not knowing what hardware is on the badge before the con makes it pretty
difficult to hack in those three days so there is little preparation you can
do.

Should I bring displays (what if the badge already has one).
What about communications? IR / RF / ??

In the end I decided to not worry about it and just showed up with the gear
I needed to assemble the badges I had designed to give away to friends of
mine who I only get to see once a year.

Before I started on my badge design I wrote a 10 liner SPIN program to dump
the full image of an eeprom, found a friendly goon and dumped his badge.

Quickly, myself and a colleague Stoo wrote code to generate a flashable .binary
image and I published it and the flashing instructions to the DC22 badge
thread on the parallax forums.

I got a nearly front-row seat in the "Hack the Badge" talk by walking down the
line systematically flashing human badges with goon firmware. Over the entire
length of the con I must have converted hundreds of them.

After those few hours of trouble-making I got to working on mine.

The only "luxury" hardware I brought with me was a 150 ws2812 LED strip. I
was going to use that to make lanyards for the badges I was going to give
away.

The badge drops and it's a very awesome, perty design. All GPIO pins, GND,
3.3 and separate power for Vusb and Vbatt are broken out. Exposing all
three power rails is **genius**.

Staring at the solder stencil I brought to assemble my own badges and looking
at the strip I decided to make a 16 x 9 LED matrix and duct-tape it to my
solder stencil. Making the strips fold back on themselves was impossible so
I cut and soldered each "turn" by hand which was a horrible, horrible hack.

I insulated and strengthened the joints with hot-glue. A worse hack.

I've been experimenting recently with Chinese RF modules. I'm staying far away
from 2.4Ghz because that band is congested almost everywhere. Instead I've
been lurking on the 915Mhz ISM band with these cute little modules, RFM69HCW.

I ordered 10 of them and got them fast-shipped to defcon and set to work.

There was no propeller object for this module. There is now, although
functionally incomplete.

I'll release that module in its current (horrific) state here and will re-factor
and make a more polished version for OBEX later.

I tried to do ALL my badge hacking in the hardware hacking village because
defcon is about community. I wanted to share my passion for electronics
with anyone who was there. Doing so is a definite handicap if you're
competing due to the constant interruptions from people asking what you're
doing or asking for help with their badge. Community first or what's the
point?

I used female connectors on the badge so I could use bread-board wires for
re-configuration. This was KEY because it allows you to change the LED power
supply from USB to Battery and back again by moving one jumper.

The next morning I was successful in getting table-space in HHV and I wrote
all of the code with the exception of the SPI device driver in that one session.

I spoke with countless people about the project, the propeller and hackery
in general. Several people just sat and watched me code. I'm hoping they
learned SPIN through osmosis :-)

It was very important to me personally that I did everything on-site and
that's probably a limitation I put on myself. Without that self-limitation
I don't think I would have felt so proud of the final result.

Later in the afternoon I was invited to do a talk on the badge and badge hacking
in the HHV. A speaker was kind enough to give me 15 minutes of his "Intro to
Electronics / Micro-controllers" time and I directly followed him with
discussion of the prop, its architecture, my approach to badge-hacking and
the projects that I have previous done and am continued to persue.

I talked architecture with people who understood and CARED. So refreshing.

I just heard via twitter that I was not successful in winning the badge-hacking
competition. The winner built a quad-copter out of his badge which is
ridiculously epic and well deserved. There is no shame losing to that.

I really hope that the winner releases their code as our community really
needs an open-source drone / quadcopter codebase.

I got so much out of this project both in knowledge and enjoyment. On Saturday
night I went from party to party, handing the remote control to people and
letting them play the game. At one point I was 30-40ft from the players and
it still behaved flawlessly.

I wish I had photos and / or kept count. I must have had hundreds of people
play and thousands watch or ask questions. At various times I was 30-40 people
deep.

I'll be posting my current source-code. Please remember this
is optimized for development time and functionality - it's not an industrial
application or intended to be bug-free and it is DEFINITELY NOT good example
code.

It was all about cramming as much functionality into the platform as quickly as
possible.

This was a huge challenge for me and it has definitely improved my fluency
and programming abilities. Being a new father means I almost never have
time to really get deep into something anymore as I only ever get small
chunks of time. A hacking binge is something I really miss and to get to
do that and share with my brethren was amazing.

Comments

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-08-10 19:25
    I hate you, you had all the fun I'd be hoping for :) But it was a hacking binge a new father well deserves, congratulations. Thanks for sharing and I'm looking now at the RF modules you used too.
  • ercoerco Posts: 20,256
    edited 2014-08-10 20:48
    Terrific writeup, red! Great to hear that you enjoyed yourself at DEFCON so much. Sounds like you were connected in many different ways. :)

    And a pleasant diversion from poopy diapers. Congrats on fatherhood too.
  • GenetixGenetix Posts: 1,754
    edited 2014-08-11 00:01
    Nice write up red, congratulations on being a father, and hopefully we will see more of you in the forums.
  • doggiedocdoggiedoc Posts: 2,241
    edited 2014-08-11 04:16
    Sounds like you had fun RD.


    Good stuff.
  • PublisonPublison Posts: 12,366
    edited 2014-08-11 04:38
    Nice write-up DAD!

    We love feedback like this.

    Thanks!
  • JonnyMacJonnyMac Posts: 9,105
    edited 2014-08-11 06:08
    Was nice to meet you in person. I hope you can post pictures of your badge hack for other to see, it was quite something.
  • Heater.Heater. Posts: 21,230
    edited 2014-08-11 06:38
    That's a great write up of a small part of a seemingly great event. Thanks. We, out here, are all very jealous of not being there!

    Oddly it got me thinking...I have from time to time been involved in presentations of hardware and/or software at trade shows and expos. It always happens of course that Murphy turns up bugs that need fixing at that point. So there have been some all night, emergency, hacking sessions to get the show to run smoothly. Frustrating and tiring.

    You guys go to a 20,000 person convention to do the same thing. For fun !

    My hat is off to you.
  • __red____red__ Posts: 470
    edited 2014-08-11 09:52
    My source-code is here:
    https://github.com/redvers/dc22hack
  • __red____red__ Posts: 470
    edited 2014-08-24 03:06
    Doh, forgot to post this.

    Video in "Demo Mode". Like I said before, it's fully playable via RF.

    https://www.youtube.com/watch?v=cwO17EsPX-M
Sign In or Register to comment.