A few notes about the BSidesSF e-badge.
It was an extraordinarily fast spin. We proposed in mid-September, were surprised to get a thumbs-up in October, and hit the first technical no-go in November.
It was an extraordinarily fast spin. We proposed in mid-September, were surprised to get a thumbs-up in October, and hit the first technical no-go in November.
Upon reflection, what stands out from initial concept to final deliverable is sticking to the goals:
- Get folks talking, collaborating, and sharing
- Provide a valuable ioT learning experience
- Create a memorable conference collectible that reflects the Mr Robot theme, and the uniquely vibrant entrepreneurial Maker infused Bay Area tech culture
- Keep the BOM at $50 to $60
We ramped up over Thanksgiving, went crunch over Christmas, balls-to-the-wall week before the conference, and pulled an all-nighter Friday that lasted through a catnap Sunday night. At that, we still didn’t have all the badges assembled in time for registration, and there are still a few outstanding.
Successful disaster 0_o
First Pivot:
The original pitch was a Raspberry Pi Zero, the adorable $5 micro-processor. Unfortunately, Raspberry Pi moved production in-house resulting in severely limited stock. To this day, it is available one per customer from a few select resellers - if they have it in stock and have not bundled it with add-ons.
We knocked our heads against that wall for a couple of weeks before realizing there was no way we could purchase the quantity required and, if this project was going to move forward, we had to find a different CPU.
The NanoPi NEO Air from FriendlyArm (FriendlyElec) at first-blush looked too expensive, but then we realized the onboard wifi and bluetooth made up for the cost difference.
We ordered a bulk shipment that slid through customs right before Chinese New Year (January 28th).
Manufacturing and shipping stops week before Chinese New Year as workers start their annual migration back home. The full-stop lasts about 7 - 10 days which this year was February 6th. Way too late for the conference.
Ordering components in general was nerve wracking, especially since one of us (that would be me) didn't listen to the other (REDACTED) and accept the
Final Pivot:
We loaded the assembled badges in the car and the parts we needed to keep making, and headed over (late) Sunday morning feeling like we'd totally fucked it up.
Instead of dodging rotten fruit, there was this group of cool people who made it easy to accept their help carrying the boxes - and then they hung out. Building through lunch, through dinner, through the parties.
It was a spontaneous hardware hacking village! One of the most amazing experiences of my life. The wave of curiosity and enthusiasm kept us going. You know who you are. Thank you!
What does it DO?!
We wanted to hook folks into hacking the badge.
The initial concept was a capture-the-flag game where points are gathered based on social-ability, ioT, and hacking. For example, did you change the root password?
The badges communicated via AP with a scoreboard server. After kicking around a few locations we decided to stash the laptop and AP in a backpack for sake of mobility, not knowing the exact conference layout and best location to maximize frequency of communication with greatest number of badges.
It worked in test mode.
We started flashing the distro to the EMMC, connected the pis - and the server completely froze after 10.
That was a bad moment. bloom ripped out 60% of his code :/
Known Bug: If you have NO lights and a 4 char code on the display, that means the final version did not get flashed to your badge; it is running test code. We will be posting an update that you can download, but not certain when...
The e-badge does two things:
Blinky Lights:
The blinky lights are a row of three, 3-color LEDs that blend together for a rainbow effect through the light pipe on the case. They are so bright, that bloom dropped the output to 30%.
Each LED was supposed to change color depending on how many flags were captured by that badge. The overall effect of the light pipe would communicate with other badge wearers and, hopefully, get folks wondering, Why are the colors on the badges different?
But you can also change the color display via tap codes picked up by the accelerometer / gyro sensor (look it up; very cool). You don’t have to bang the case. The lights will change if you set the board on a table and bang the table.
There are six, 6-tap codes where ‘T’ is a tap and ‘^’ is a pause”
TTT^TTT
TTT^T^T^T
T^TT^TTT
TT^TT^TT
TTTT^T^T
T^T^TT^T^T
Known Bug: If the LEDs don't change color you need to boot the pi.
Bluetooth Scanner:
The OLED display was intended solely for the wearer of the badge.
When you first turn the badge on, it shows an 8 character ID. Then it changes. The e-badge scans for and displays the ID of broadcasting bluetooth devices within 10’ to 30’.
ioT Dev Kit
We were inspiried by the FSociety’s takedown of Evil Corp via RPi (eps1.3__da3m0ns.mp4), and had initially explored deploying a PwnPi-like toolset but after becoming more familiar with the NanoPi, it just didn’t make sense.
The NanoPi NEO Air was released in October,
We flashed the EMMC with a custom Armbian Debian distro which eliminates the additional cost of an SD card, while (somewhat) lowering the power consumption and increasing reliability.
Root password is ‘owatagoosiam’.
The python code is at /usr/sbin/badge.py
The achilles heel is power management. The NanoPi Neo Air was designed for set top boxes (TV) i.e., plugged in via USB for power. We coulda shoulda put better power management on the board to support the batteries. But by the time we figured out the power management it was too late. For this board ;-)
The e-badge battery life is about 6 hours running on 3 AAA lithium batteries.
To power on, push the switch on the side of the case down. Off is up. Design is based on wearing the e-badge on a lanyard where the lights and faux camera lense are facing out, where other people can see them.
The micro USB input is accessible on the bottom without cracking the case. You can plug into a computer and access via telnet or putty (or UI of choice). Battery switch should be OFF when powering via USB.
There is one screw on the bside (uh backside) that holds the case, bracket and board. Be careful when jiggling the little OLED display into place and tucking the wires; we found a number of badges in the RMA box because the components were scraped off the display board.
Known Bug: If the display doesn’t work, it takes the LEDs with it. The code needs to be modified to trap errors instead of crashing. We’ll be posting an update, but not certain when...
The Case
The body worn cam, uh badge, is two snap pieces that REDACTED designed in SolidWorks and iterated on our Lulzbot printer using standard black PLA filament.
We wanted folks to experience what it’s like to try talking with people when they think a camera is recording the conversation.
It takes about 2.5 hours to print each case and bracket. The Plan for scaling production to 175 e-badges was to build 5 - 7 silicone molds from the 3D print and pore Type 3 plastic, figuring 1 hour to turn each case. Each mold took an entire day to construct. Fortunately, REDACTED started testing after 3 molds and found the original time estimate was off by a factor of 3. There was no way we could produce enough cases one week before the conference.
Meanwhile, he was still surface mounting PCBs and baking them in a re-flow oven because there wasn’t enough time to send out for assembly. (This process not for the faint of heart.)
The obvious solution was to scale 3D printing. I requested quotes from about a dozen companies: large online, small independent, and medium-sized local production.
The independents were cheap, but obviously had one printer; average production time 3 - 4 weeks. The large online companies were fairly priced and could make the deadline, but there was only one-shot, and I wanted the option to tweak the files after first article. The medium-sized locals tended to be astronomically over-priced, but gave a free lecture about using injection molding (which of course they do in-house); over $4k for the mold not counting cost to produce 175 cases. One-shot, no edits.
We outsourced the job to a 3D printer company that caterers to the small run manufacturing market. Type A Machines got us back in production.
Summary
More than once I've thought about 1o57, and been struck by the magnitude of producing THOUSANDS of badges, let alone 175. It is, and he is, awe. Inspiring.
Electronic or not, badge-making is some kinda crazy performance art.
No comments:
Post a Comment