BCOS Monero Village - We Program Our Stinkin Badges

Video thumbnail (Frame 0) Video thumbnail (Frame 4556) Video thumbnail (Frame 6899) Video thumbnail (Frame 14948) Video thumbnail (Frame 18241) Video thumbnail (Frame 21786) Video thumbnail (Frame 26808) Video thumbnail (Frame 28395) Video thumbnail (Frame 29760) Video thumbnail (Frame 31707) Video thumbnail (Frame 33748) Video thumbnail (Frame 35979) Video thumbnail (Frame 37478) Video thumbnail (Frame 40182) Video thumbnail (Frame 42873) Video thumbnail (Frame 51964) Video thumbnail (Frame 54534) Video thumbnail (Frame 55961) Video thumbnail (Frame 57280) Video thumbnail (Frame 59576) Video thumbnail (Frame 60972) Video thumbnail (Frame 64006) Video thumbnail (Frame 68171) Video thumbnail (Frame 71204) Video thumbnail (Frame 72649) Video thumbnail (Frame 74170) Video thumbnail (Frame 78536) Video thumbnail (Frame 83062) Video thumbnail (Frame 87469) Video thumbnail (Frame 98359)
Video in TIB AV-Portal: BCOS Monero Village - We Program Our Stinkin Badges

Formal Metadata

Title
BCOS Monero Village - We Program Our Stinkin Badges
Title of Series
Author
License
CC Attribution 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
2018
Language
English

Content Metadata

Subject Area
Web page Group action Multiplication sign Connectivity (graph theory) Source code Similarity (geometry) Bit Online help Computer programming Connected space Subset Number Neuroinformatik Hacker (term) Internetworking Different (Kate Ryan album) Personal digital assistant Order (biology) Right angle Office suite Computing platform
Source code Suite (music) Execution unit Distribution (mathematics) Debugger Multiplication sign 1 (number) Limit (category theory) Mereology Computer programming Microcontroller Neuroinformatik Software Software Computing platform Integrated development environment Software testing Directed set Utility software Computing platform
Axiom of choice Group action Just-in-Time-Compiler State of matter Code Debugger Source code Execution unit Cloud computing Set (mathematics) Chaos (cosmogony) Shape (magazine) Ordinary differential equation Food energy Computer programming Neuroinformatik Web 2.0 Roundness (object) Different (Kate Ryan album) Computer configuration Square number Circle Area Source code Structural load Data storage device Windows Registry Microprocessor Type theory Telecommunication Software testing Right angle Text editor Procedural programming Whiteboard Laptop Game controller Computer file Connectivity (graph theory) Microcontroller Web browser Computer hardware Integrated development environment Directed set Firmware Plug-in (computing) Computing platform Execution unit Distribution (mathematics) Surface Projective plane Generic programming Cartesian coordinate system Integrated development environment Software Personal digital assistant Factory (trading post) Computing platform Routing
Installation art Source code Execution unit Touchscreen View (database) Debugger Computer file Lemma (mathematics) Electronic program guide Hidden Markov model Bit Stack (abstract data type) Computer programming Microcontroller Type theory Message passing Software Computing platform Integrated development environment Software testing Directed set Error message Computing platform
Installation art Group action Installation art Touchscreen Arm Information View (database) Computer file Basis <Mathematik> Open set Open set Integrated development environment Personal digital assistant Computing platform Source code output Website Text editor Right angle Musical ensemble Computing platform Computer architecture
Software engineering NP-hard Computer hardware Computer file Computing platform Drum memory Open set
Source code Execution unit Intel Link (knot theory) Debugger Computer file Ordinary differential equation Microcontroller Computer programming Open set Web browser Error message CNN Arithmetic mean Large eddy simulation Software Computing platform Integrated development environment Software testing Directed set Maize Process (computing) Gamma function Systems engineering
Source code Intel Computer configuration Oval Directed set Encryption Information Formal language
Installation art Source code Installation art Touchscreen View (database) Computer file Electronic program guide Bit Online help Menu (computing) Open set Ordinary differential equation Microcontroller Computer programming Open set Type theory Computer configuration Software Computing platform output Directed set Right angle Encryption Computing platform
Area Installation art Arm Integrated development environment Time zone Electronic program guide 1 (number) Computing platform Musical ensemble Open set Computing platform
Module (mathematics) Web page Game controller Installation art View (database) Military base Debugger Digitizing Computer file 1 (number) Bit Open set Radical (chemistry) Type theory Integrated development environment Computer configuration Analogy Computing platform Source code output Right angle Whiteboard Computing platform Library (computing)
Area Greatest element Functional (mathematics) Serial port View (database) Multiplication sign Computer file 1 (number) Counting Connected space Programmer (hardware) Visualization (computer graphics) Integrated development environment Personal digital assistant Computer configuration Computing platform Computing platform Plug-in (computing) Computer architecture
Context awareness Computer file Link (knot theory) Multiplication sign Direction (geometry) Source code MIDI 1 (number) Microcontroller Online help Function (mathematics) Parameter (computer programming) 32-bit Computer programming Number Different (Kate Ryan album) Source code Energy level Software testing Software framework Data structure Computing platform Personal identification number Multiplication Email View (database) Block (periodic table) Closed set Computer file Projective plane Planning Connected space Type theory Loop (music) Film editing Angle Personal digital assistant Computing platform output Whiteboard
Adventure game Area Default (computer science) Execution unit Computer file View (database) Multiplication sign Computer file Projective plane Bit Uniform resource locator Goodness of fit Loop (music) Computing platform Source code Briefträgerproblem Software testing Software framework Utility software Library (computing) Asynchronous Transfer Mode
View (database) Computer file Source code Computing platform Right angle Software testing Whiteboard
Computer file View (database) Computer file Projective plane Letterpress printing Computing platform Source code Right angle System call Asynchronous Transfer Mode
Electronic data interchange Proxy server View (database) Computer file Projective plane Computer programming Microcontroller Digital photography CAN bus Order (biology) Whiteboard Crash (computing) Software Computing platform Right angle Musical ensemble Physical system
Email Computer file Projective plane Directory service Computer programming Microcontroller Order (biology) Oval Software Computing platform output Videoconferencing Computing platform Window Flag
Personal identification number Email Computer file View (database) Online help Building Computer file Source code Price index Digital signal Electronic mailing list Open set Compiler Revision control Arithmetic mean Integrated development environment Function (mathematics) Computing platform Source code Configuration space Software testing Whiteboard Loop (music) Computer architecture
Computer file Microcontroller Computer programming Programmer (hardware) Cache (computing) Hash function Computer hardware Error message ASCII Dreizehn Flash memory Interface (computing) Computer file Digital signal Term (mathematics) Oscillation Connected space Type theory Hexagon Logic Function (mathematics) Factory (trading post) Revision control Right angle Communications protocol Data structure Firmware
Greatest element Serial port Dependent and independent variables Flash memory Multiplication sign Internet service provider Bit Power (physics) Neuroinformatik Programmer (hardware) Cache (computing) Computer configuration Revision control Configuration space Whiteboard ASCII Firmware
Reading (process) Asynchronous Transfer Mode Intel Greatest element Computer file Consistency Dependent and independent variables Flash memory Computer file Source code Internet service provider Term (mathematics) Electronic signature Writing Computer configuration Read-only memory Synchronization output Firmware
Intel Greatest element Mathematics Loop (music) Flash memory Computing platform Maxima and minima output Firmware
Point (geometry) Reading (process) Default (computer science) Intel Computer file Flash memory Interface (computing) Computer file Projective plane Computer programming Neuroinformatik Product (business) Number Writing Programmer (hardware) Read-only memory Computer configuration Website output Computing platform Resultant Computer architecture Firmware
Metre Point (geometry) Axiom of choice Intel Group action Tap (transformer) Mereology Tracing (software) Computer programming Programmer (hardware) Regular graph Whiteboard Hypermedia Directed set Personal identification number Source code Email Interface (computing) Open source Data storage device Connected space Type theory Exterior algebra Spring (hydrology) Computer configuration Interface (computing) Encryption Whiteboard
Intel Pay television Computer file Multiplication sign Source code 1 (number) Ultraviolet photoelectron spectroscopy Mereology Graph coloring Number Regular graph Whiteboard Cuboid Directed set Endliche Modelltheorie output Computing platform Source code Boss Corporation Flash memory Sampling (statistics) Macro (computer science) Hexagon Order (biology) Interface (computing) output Website Whiteboard Writing Firmware
Digital electronics Multiplication sign Source code Mereology Food energy Computer programming Neuroinformatik Different (Kate Ryan album) Source code Position operator Exception handling Stability theory Touchscreen Moment (mathematics) Data storage device Electronic mailing list Physicalism Bit Sequence Connected space Telecommunication Order (biology) Right angle Spacetime Metre Divisor Patch (Unix) Connectivity (graph theory) Microcontroller Distance Number Power (physics) Revision control Goodness of fit Address space Information Key (cryptography) Interface (computing) Plastikkarte Planning Limit (category theory) Cartesian coordinate system Loop (music) Film editing Personal digital assistant Logic Radio-frequency identification Computing platform Table (information) Library (computing)
so they're yeah a few things that I had planned to have devices for all of us the programming devices it didn't work out the source code is not online yet either so we have a few inadequacies to work around but we are hackers so we're excellent at producing workarounds when we need them I think success is defined by we have a badge we want to program it and we understand the workflow right we kind of understand what we have to do maybe in the office at home if we want to change the behavior of our badge and a number of other similar devices because it's a similar workflow now there's gonna be I'm going to show a few tools and we don't have a full day we have an hour an hour and a half so these the tool set I'll show it's a very small subset of what's possible this is always the case where there's a lot of different tools this is just the way I'm doing it and please feel free to ask if you think there's a better way or a way you prefer I might know about that I can help you out before we get started it might help to to distribute badges to the people if you haven't purchased the badge and you would like to in order to program it now if there's a small group that wants to do that I think we can handle that quickly is there anybody who still wants to purchase a badge okay so there's one or two people that's fine in the mean time because this will take a few minutes you may want to download well first of all if you haven't got a internet connection set up its yeah you'll you'll need to download some things you can quietly passively observe as well if you prefer or if you don't have your computer with you and you just have a phone it's fine it's you have fun with that as well but there will be a hands-on component to this workshop and it's over an hour long so we have enough time to do that what we will be downloading this is my preference at least it's called platform IO I don't know if I can make this bigger I'll try yeah that seems to work well the title bar doesn't get bigger but the URL is simply platform dot sorry platform IO dot org so you want to maybe read through there a bit and you want to learn how to download and install it what it really involves is downloading atom but it's all on the page there for installation and while you do that I think we'll just take care of the the one badge that we still have need to to get set up and I'll turn to the microphone off
yeah there's gonna be two things that we that if each of us want to individually program on our own computers we'll need two things two new things that you may not have yet that's this platform IO and there's a command-line utility it's called AVR dude so this is how I installed AVR dude I know I'm getting
too far ahead but for anybody who's quite advanced I don't want to get you bored and so well first of all let's do a search if you're on a dpkg style distribution then you use a apt or something obviously the RPM ones are our yums eiper and so on ab k so we can search for AVR dude ah so it's kind of running off the end but I think it's clear enough this is the other this so this is not platform IO this is the second software a piece of software that I'm talking about which is part of our suite or our workflow so we will need platform IO and we will need a PR dude and both of these two pieces have alternatives but with the limited amount of time is going to be kind of a demonstration using the tools that I've been using before so having said that
short explanation of what programming means and how a badge starts out so imagine in that in fact you can see that three of these badges is for three of them are lit up that's because there's a microcontroller controlling the LEDs and doing things with them turning them off and turning them off on in succession to create this animation right that's a program that's running on the MCU just like a program could run on a MPU a microprocessor unit this is a microcontroller unit and one of the big differences is that the storage of a microcontroller unit is directly in size embedded inside the the the plastic housing of the chip so this is what some people refer to as on chip debugging or on chip programming it's a very different procedure as what we have with MP use the question right so atom is what you'll probably choose atom is a generic web editor which I think what is it JIT hub uses or what is that right JIT hub kind of develops atom for general use - yeah it's an editor and the beauty of atom is that you can load plugins components on top of that to make it a full-fledged IDE for example which platform IDE is that's what they're using for it now I assume that if it gives you a second option the vyas code or whatever that you can try that as well it sounds like a more Microsoft style you know type of thing if you want to experiment with that if you have a Microsoft distribution running on your computer maybe it's a better choice I'll try to help but I don't have any experience with Microsoft in any case so back to what these microcontrollers are doing with the lights so they're controlling the lights in a very simple way turning on turning off that's what a microcontroller does when I receive them from the factory I receive them on a reel like this and there are a thousand or a thousand five hundred microcontrollers on there on these little chips right and then I I place them on these boards solder them so that they are yeah soldered onto the board as soon as I flip the switch to turn it on with a battery or an energy source basically nothing happens because the factory does not know if I'm controlling lights or if I'm detecting a door opens or if I'm measuring voltage or measuring temperature they just have no idea what my application is so they arrive in an empty State that's kind of what would happen if I turned it on this one here is not lit up it simply wouldn't light up because there's no program inside and that's what this workshop is about to find a way to get our own programs inside the MCU so that when you turn them on it does what you want the question yeah it's it's not relevant but I like the question it's not so the question is how do I I think it's kind of personal how do I start to design a new badge this okay well I'll give you a very practical answer I'm designing badges for for a quite well-known cryptocurrency conference in Europe which will take place in October I don't know if they want me to announce this because their badges will control entrance and it's quite expensive so they probably don't want people to know how to knock off the badges and so this is a this is a full set of requirements that they're giving me they're asking me questions about are they able to change the shape can there be circles can they be routed out it's going to be squares and these are all questions I have to answer I won't get too far into it but for example the route outs need to have round edges this is what they're doing is syncing a drill bit into the PCB and then going around and and removing a surface area so there's always going to be around area these are the kind of things you talk to customers or groups or co-workers colleagues project people and that's kind of how I get started and then usually it's a there's a lot of chaos involved and then which how cheap can I get the LEDs oh there are only green but I don't like that but then you know trade offs okay cheapness wrong colour or whatever you know I don't have any any better answer than that yeah so we'll see there's going to be plenty of other bad just involved it so rights that's what happens when I get these MC
use on a big reel from the factory they're empty I put them on the board solder them and then I need to program them that's what everybody needs to do and that not everybody is producing hardware but this is relevant for anybody here if you want to change the behavior of the MCU because they're not locked down or anything you can just erase them so that their factory state again or overwrite them with your own firmware this is not called software software would be if you connected a USB cable to this and there was USB communication to your computer and then you opened up a web browser or something and then had some type of software host software running a lot of people believe they're there they're running software on the on the badge or the wallet or something else when it's really only running on the on the notebook and that's software what's running inside the MCU this little chip in the corner that's four more that's it's important to know that distinction right okay so I don't see too many computers but that's fine we'll get started with a quick demonstration and then I think whoever is following along and trying to do hands-on will slow it down then and I'll pay some individual attention to try to get things working does that sound okay there's kind of one or two I think there's two computers in the room all right that's fine okay so the first thing is a demonstration I'm gonna show how to change the behavior of let's say I don't know I'll take this corner one down here so I will change that what we have so far okay so let me just let me let me create a new file I have already downloaded node platform IO and installed it so when I can we see this
right so when I type atom you can't see that on that screen if okay so if I did this then I would be
presented with atom screen this is kind
of the first thing I always see an error
message that's how it looks when you've installed platform IO now I'm a bit concerned I think I have two copies of atom running I'll try to get rid of one of them so I'm not using unnecessary yeah there's two there all right so now we have one only um I think you have atom as well have you found a way to install platform IO on your atom okay but it's a it's working all you no questions about it yep okay it's a package that you need to search for I believe I believe it's let's see there's something up here packages this is Adam and how to yeah I'm not sure hmm I myself have forgotten this works to install more packages maybe help welcome guide I think that's it yeah
yeah so once you do see the the first screen you can install a package here open installer search packages platform IO and there we are the first step is this platform IO IDE and all this does is allow us to edit a new program and compile it right we compile it to the correct architecture which is not intel or AMD or arm in this case we're doing Atmel AVR 8-bit so that's the first thing that we're trying to do that's what we're using platform IO for right and so once you have the atom editor installed what I just did helps you find the platform I of packages and that's how you can install it mine just says uninstalled because I already have it I think there are two here to install but that's all in the information of that platform IO website where it explains how how to install it did you get so far have you had any problems tomorrow yeah it's other way around Adam is the basis exactly what's the question you what I don't think so no no no you don't have to register anything I know that platform IO they optionally I think there is some method to register but I've never done it so I don't think it's needed did you uh did you try the the searching for for packages inside the Adam editor the way that I did this that might may be the distinction there may be many ways to use platform i/o and and I know that there's it's a very small group I know the guy doing that little know he's in Europe he's he wasn't he was invited to the village but he couldn't make it
[Music]
okay we're back there I'm just trying to find it
this link this is interesting
there we go
okay
new bass
oh here that's my screen there okay all
right
okay so I already have my platform i/o setup I'm just gonna do this as a demonstration while they're still getting set up so that everyone knows a bit about how this is supposed to work I search from the help menu has a about or no has a welcome guide and in the Welcome guide there is on the right at least for me there's install a package and under I think yeah under that there's open installer and we're can yeah and at the top of that you can search for platforms just be careful to to type return after your text because it otherwise it doesn't search automatically alright so I'll remove the settings and welcome need the welcome
guide okay so platform I own what I'm now
interested in is making sure I can compile for the Atmel AVR 8-bit is a the instruction set which is 4 which is what we're using with these MC use because these MCS are not ARM based they're not made by Texas Instruments they're not in tell it's etter a-- they are from Atmel and the use of AVR 8-bit instruction sets so i'm going to look for platforms i think is it correct or area here and
for whatever reason the first one that comes up is Atmel AVR because it starts with a I believe is maybe alphabetical and just to show you if you're curious what else is available there are expressive there's I think these are all the ones I have installed so there's not many but it's ok yeah I think there's two that you need is a platform IO - IDE and platform IO let me just show you the ones that I have
so I have platform ioad - IDE and it's possible that by simply installing platform IO - IDE it will install the dependencies as well if that doesn't happen and you suspect that something is not behaving correctly then you will see that I also have platform IO - IDE - terminal yeah I'm not sure if it's needed or not you can test and try on your own I just have those two right so what I was doing just a minute ago is okay I'll give you a short one minute
tour if I click on boards here it's probably gonna show things like arduino like booster pack like well let's see it's got bit see there's quite a lot here our Adafruit Blut whatever bluefruit micro there's 96 boards and there's just quite a lot of things I mean 15 to a page we can do a thousand though let's do a hundred to a page and alphabetically again so there's lots of Adafruit Arduino must be the next one exactly so there's Arduino do it blah blah blah there's lots of boards you get the idea what a board is defined as in the platform i/o world and at the bottom there's a BBC micro bit for example I think some of you know what that is as far as libraries go if I click on that in platform i/o is going to give me options to load libraries to control serial buses like I squared C or maybe temperature modules which work on digital bases or analog these are all the libraries so we have sensor libraries live control libraries etc let me just see the ones I have installed to give idea what I have none that's impossible what's built in so flora ether net GSM these are the type of libraries so we've taken a look at boards libraries devices at the very
bottom I devised is simply what platform il has detected is connected to your computer so if you have a USB connection serial or I don't know what the other options are I guess over Ethernet those are the devices that it tells you you have connected possibly if I connect my programmer it will detect that let's just see if that's the case refresh I kind of doubt it will work but it is connected over USB so maybe it didn't work okay well I spend time with that anyway the very last of all of these areas which make any sense I mean we've seen the home already and the count I don't have an account it's not it's not needed the very last day
that I've shown is now the platforms and as I mentioned there's a few here tiny teensy espresso these are the ones that I have installed there are quite a lot of others and Admiral AVR is the one that we need to use to program these badges because that's the architecture and instruction set so I hope that's clear enough so this is kind of very complex IDE that gives you a lot of features and functionality it's definitely more than the arduino ide although you could use it as well we don't have enough time to do every ID in the world and visual studio and whatever else you can probably find a plug in for that as well but we're gonna stick the platform IO I like it and so here there will usually be maybe
some let's see what it gives us sometimes we get examples and things if you are a 8 and 32-bit MC use here examples for example and the under boards it tells you what boards are using the AVR 8-bit and 32-bit instruction set what I like to do is go right to examples you see that here kind of hard to see at an angle for all of you but if you take a look at examples you have a few different ones like arduino blink is this one you can choose that but you can choose a lot of others as well or do you don't blink it's good enough for us and you can kind of see the style of of the things you need to do this is not so interesting to i and i file let's see all the files we have this one is maybe good so this is kind of this is all there is so that makes it a great first case example that's all you need to program and type and just like all Atmel or at least arduino framework programs you have a setup block and then a loop block the setup just does things one time and the loop will obviously loop this is kind of the the way microcontrollers are are made to work and if you look at the the source code there it's kind of small but I think you can see it well enough it's very simple it does a delay so that your blinks are separated by a delay of some amount and the digital write is simply setting a voltage on a GPIO pin which in this case is the LED built-in pin somewhere in a header file that's defined I think as pin number 13 or something and you said it is high and okay so that's really very clear and easy and that's that's similar to what we're doing here on a very basic level there is a couple problems if you this is this is not so intuitive but if you take a close look at badge you count the number of contacts on the MCU there are eight now two of those are immediately used for the ground plane and the voltage pin so you have six left and because there is a button connected to that a tactile switch that will take up one more and you have five possible inputs and outputs GPIO general purpose input in or out so with five contacts you're trying to drive 16 LEDs and if you look at the structure of a program you you have old egde - one pin and it turns it on through the high parameter or it turns it off with low so you do that to five different LEDs and all the other L 11 LEDs you wouldn't be able to touch them there would be no direct connector connection to the - the five contacts on the MCU so it's been a long time so this for this problem has been solved and basically it's a multiplexing problem where you want to have more than one input or output for one contact on the MCU and it's called Charlie flexing I can't remember why maybe the person who solved the problem for the first time named Charlie I don't know does anybody know anyway so that's what we're doing here we're doing Charlie flexing so we're connecting multiple of of LEDs with a resistor in between and it's it's a bit complicated and not worth mentioning in detail but this is what we're doing we're just doing it in a more complex manner so that we can control more LEDs with it with a small amount of context we have from the MCU so what should we do we could we could compile this and if we're really lucky this LED which is defined as LED built-in would map to one of the LEDs which I've with which I have chosen I'm actually quite curious because I haven't tried this I mean it's a 50/50 and it's the less than 50/50 chance let's try so to compile this how do we do that somewhere there must be I've kind of forgotten from the end from the examples how to compile how do we do that so I'm just gonna cut and paste a link whoops that's too much text let's just imagine that for the first time we're getting exposed to a new platform we don't know how it works so I'm just going to create a new project I've totally forgotten help okay let's go back home new project here from the home screen project named a DEFCON test board and we will do what is the correct board name here I'm going cheat here because there is a board is called
eighty tiny we're still in demonstration
mode so this this may go a bit too fast eighty tiny and it's 13a there it is and framework that we want is Arduino location use the default location finish so this is now creating a new project called DEFCON test and I have on the left here now DEFCON test and libraries everything set up the way I need to so it did a bunch of work for me I even have a main dot
cpp area with a loop and a set up so I'm just going to erase this because I have copied the example from before see that so this is what I copied before and it's the the blink example for the Arduino because it is a VRA bit it it can possibly work I am just concerned about this here this might not work but because I'm an adventurous person I'm just going to try and compile it up here there is a build safe and built fail this file is removed to util delay H move to u tilde like H no all right so that was a good try but I'm gonna quit well while we're still on time instead
of doing that I'm going to take source code from from what I know is good let's
get rid of this here you mean that there yeah all right target target is no what do you mean build target what do you want me to do
there now yeah I think trying to use an example from a different board is it this was kind of an exotic test that I wanted to try so I'm going to erase the
text that i just copied there and we're still in demonstration mode so I'm going to copy this file which I know is good
it's not the one that's running on the badges exactly because that's not uploaded yet but I'm quite sure that it
will work and we'll need one more file this looks okay right and we need one more file this one yeah this is C so I'll create a new file in this print project and put that inside there and it's untitled we'll call it we'll call
it main dot H I hope that's the right place yeah we're in camp all right it's not in the right place so let me just put it there now
Ron Jackson yeah that's it and over here [Music] and we'll move it to where it should be namely DEFCON so now I need to find the place where this new project is stored
documents platform i/o projects alright
sorry about this Jax contest projects so
that must be correct now but it's still not know okay so that looks ok our main
dot H is in the correct place main dot CPP is looks ok as well oh and I haven't
I haven't saved it so I'll just save all
the files now save all and I have the home here I have
the CPP here and and there is a main H as well let's cross our fingers I saw a
lot of red there I'm not sure of no configuration ah okay that's why tiny and it's saying no no it
works okay okay success so what I just did was I cut and pasted a bunch of source code which I know works for this architecture and the pin assignments are similar to what I used for the LEDs soldered onto the board so that's this is not exactly what's running on these boards because that source code I I'm too disorganized right now they haven't uploaded it yet but this does work and I have copied it into this file and there's a mean age file is where a header which is not very long and so I just built it I can built again to show you it goes pretty fast so build and then down here basically says what it's doing and it succeeded what it did really is used a GCC AVR version of the compiler compiling environment this is the spot Intel but it did a lot of tricks because it understands what what architecture it's building for and I should be able to
find the binary now if I just go back
one let me put this at the top I think it's called yeah it's in here and eighty tiny thirteen and there it is there's the firmware let's show both of them the hex is the one that we're going to copy over this one here so now let's see a VR dude command kind of forgotten how it is but I can find it quickly all right here it is so the next thing we need to do here is a VR dude takes a binary it does other things as well but it takes a binary like the one we just produced and it programs a chip like this one over a USB connection so we don't have USB logic in this hardware we'll need some kind of middleman that understands the USB commands and everything coming from a VR dude and then transfers it in a method you know in a in a protocol that can handle which it's SPI the serial peripheral interface so that's what I'll demonstrate now firmware dot hex I think that's the name of the file we're going to flash that and right this is a command I'm gonna change the fuses I think we need to ignore the fuses this is basically you eat that every microcontroller has usually an internal clock you can tell it to to reduce the clock speed you can sometimes change a fuse so that it's no longer programmable there's internal fuses either the type of things that AVR dude can manipulate and here I'm telling it to release the that the having of the an internal oscillator when you get these chips on the factory they're made to run very slow and if we did that then all of this animation would just be very slow it wouldn't be nice so I always release this this this fuse the 3a fuse right and this is the programmer that I have which is the C command and if I do nothing at all because it's not connected to anything it will give me some errors right command failed because
it's not connected to anything
but if I do it again after I connect the programmer which looks like this I'll try to raise this up a bit I mean it's gonna be hard to see I apologize but but you can understand that my computer is this and then if a I've got a couple cables for power and so on and this white thing here is an ad mill it's called a IC II I'm not sure what that stands for it's a serial programmer so this is necessary because there's no way to connect a serial or a or I'm sorry USB cable directly to this board if you have a board like a Raspberry Pi or something where you can directly connect a USB cable to it then you can program directly on it is kind of a bad example because a Raspberry Pi has no microcontroller but because we don't have that we need a serial programmer like this okay so now I'm going to connect that to do this orange board at the bottom when I turn this on for the first time that's the animation that begins it's a fast animation when I click it moves it goes to a slow animation and the third option is kind of a strange Cylon thing there okay so I think that so I'm going to connect and program the new thing on there if I can just there we go so this should work now oops that happens sometimes
well I didn't have it on okay I think
we're still okay so these are the files and now I'm gonna turn it on okay now
that's working you can see it's writing at the bottom if you look at the badge
it's it's lighting up a lot of the LEDs
so now it's no longer beginning with the fast animation it's a bad example I should have done something more pronounced it's starting with a slow animation the next one is a fast animation the third one yeah it did almost the same thing okay to make this more pronounced I'm going to change the source code and that will be the end of the demonstration and I'll walk around and try to get people started on doing other things we can
change things I think close to the bottom here so here's this the loop we'll start with we'll start with a we'll start with five so just you five zero one two three and that means that our maximum I think it's at the top three is the max was it yes three so this should be correct so I'll go back build success and connect I can't see I can't connect
and program take a look at the bads if you can't see it while I'm programming it's going to light up it's interrupting
all of the exactly okay so now I turn it
off turn it on and you can see it has a new program on there the very first animation is different if I switch to the next animation it's a different one switch to the third and there is no forethought I believe or maybe okay there's the fourth is the default end of animation animation and the first one comes back on so I think that kind of demonstrated how this workflow works right there are lots of options instead of platform yo you can use Arduino you can use AVR GCC and make files there's different things to achieve the same results I think we still have a half hour or so so at this point I'll take some questions and then walk around and try to help those with computers do what they're trying to do any questions right well the one that I have which I can tell works pretty well for at mill architectures is called the Apple IC e they have different versions of that I think a few years ago they started with one I'm not sure which one I have maybe it says a number I don't know it just says Atmel - IC e on there and then there's a serial number and a date so we'll work just fine there they're a bit expensive though I think they're 80 90 something like that and they're not worth it why do I say that because I'm an Arduino will work just fine almost anything there's all kinds of hacky projects if you look at hackster IO or or a lot of online sites you can download your own PCB from ash Park populate it and create a programmer on your own we obviously the easiest answer for you if you're trying to get started easily and quickly is to do the same exact thing that I did and then copy that model number down and just pay the money and get it it will work just fine mmm the other thing that I'm East I might say is that there are two interfaces that's where you can plug things in onto these badges because I know some people well people have different preferences right there is the they both have six contacts so they're very easy to identify in fact going to the badge website which you maybe didn't know
there was a website it's this here this
is what I'm talking about these these little interfaces there with six contacts one of them there are six holes and in the other one here there's six contacts as well but there are that they're not pulls through the board either one of those work to program the boards the one that the hand is pointing up now it's called a tag Connect interface and the other one above this is the traditional actually it's just two point five four millimeter pitch header pins it's not really a name but it's a it's a traditional Arduino programming interface so some some programmers come with cables for one or another or even there are many other types question so there are there's only one MCU and the other two chips are non programmable they simply are storage like a USB you know media stores things right so you don't have to worry about those as far as permit programming goes and that's why there are no interface plugs or connectors there the connector really is just a wireless connectors on the back is antenna that's how you access those and that's the interface the interface for the portion that's what we're talking about now and depending on what you like this but what I like best is is this tap Connect interface because of the way that I can very quickly program I push down it has the tag connect cables have kind of a spring action Pogo pin assembly on there so I can very quickly go from one to the next board and there's no attaching a cable but I must say that most people are more comfortable with the header pins and the traditional Arduino plugs and it works just as well and they're more available they're cheaper so that's why I put both of those on there and if I wanted to go crazy I could probably do three or four other alternatives all I would do is put traces on there it would be really easy but it would be more confusing as well and and I would be populating more parts anyway it's not important so the so you have two choices on where to plug in when I just plugged in myself it's too small to show you but I used I I connected to this here to this I can't get it there it is to that and that is when and that is when you
saw all of this writing and verifying happen AVR dude is what programmed the badge any other questions yeah well there are two there are two people there's AJ yes and there's me we're selling the badges AGS has packages of badges for anyone who bought over his website it was a pre-sale that that happened a couple weeks ago I guess and a lot of people bought badges and he has there order numbers so you need your order number if you did that if you didn't buy it during that time then I have badges as well for sale in fact I have all three now the problem yesterday I wasn't how many I had of all three and I had orders to fill so I was telling people we were sold out it wasn't I thought we were but and I was being honest but we're not sold out I think I have a couple handful left of the high-value premium badges and I have a couple boxes of the regular ones any other questions was that halfway clear the workflow where we started with platform i/o we typed we edited we developed and coded we built and compiled and then we had a firmware file which ends with dot hex and then we used AVR dude to program that over a USB device onto the board what does it do without any without Iman I can't show it anymore because oh I wrote mine but they all all of the badges that I sell that I've produced are the same as what's that let me rephrase that there are three different models right there is the killer there is the alien nice blue color and then there is the boss badge with the the two-tone colors and kind of authoritative animation whatever whichever you choose your animation will match every other person that has that badge I don't know if that I mean that doesn't really answer your question I'm just right so after you switch it on the first animation appears just like everyone else and you can change that by clicking on the switch you need to hold it down because it only samples at the end of the animation so sometimes you click too quickly and it won't register it but if you click up just the right time or if you hold it down long enough then it will register and then it goes to the next animation which I which is part of the source code you ups where is
it which I just modified in order to
change the sequence right and that's all that you can do with one button you see it's quite a limited device right this is not measuring temperature or you don't have a screen to get menus and things like that does that answer your question yes okay so the question is does it have NFC features and the answer is yes it's difficult to answer because okay first of all I call this a split-brain badge because there are like two sides to it and that's why I wrote lights on one side and radio on the other and there is communication between the two sides what would be very nice and what for that for that I think the battery is running out does anybody have batteries for the microphone what will be working out for the next version of badges for the next conference in Europe is that once we place the the badge onto a device the microcontroller understands that and lights things up it's gonna be a bit different good but that will require that there's communication from the NFC radio side to the MCU powered lights side and our situation here at Def Con this is a split brain there is no communication between the two sides so if you lay this onto NFC reader writer an active NFC device which you can supply power like a phone then your radio logic your radio circuits will work but the MCU won't have any idea about it you can even have the badge turned off you can turn take the battery out and the radio circuit still works the way to use that so there are two two buttons over there as well try to imagine an NFC tag you know a library card or whatever has an NFC antenna loop inside a key on I'm not a not feeling too creative after so much lack of sleep but if you can imagine an NFC application maybe in your school or whatever door access controls sometimes sometimes it's an RFID device but it's very similar in any case there's a antenna and there's no energy source for one of the two sides for the passive side anyway so this is the same thing with one exception instead of simply lying it on the reader and the reader automatically recognising picking up and taking the information which could lead to opportunistic data theft and for example if you in few for example embed a antenna on a table that would be great at Def Con right you're stealing people's data left and right their wallets going on the table and you're reading their library card information or whatever what we decided is to block or defend against that by putting switches on here so if you lay your badges on a table that was manipulated by an attacker they will not be able to get your data it doesn't mean you should store critical data on here I recommend against that but it does mean that you have a bit of protection because you must use your finger and push on one of those two tactile switches and at that moment a reader or a writer can access the NFC circuit only then you take your finger off and you're safe again or marginally safe safer than usual right does that make sense so if you have your library card and you go to what a coffee shop and they have sometimes embedded chargers on the table and you might have your phone there and you're like the card here they can take your data easy enough I mean if you own the coffee shop and you embed an antenna on there there's gonna be one customer who puts their wallet on the table and then you have their data but if they're that customer had a blocking factor something like a tactical switch tactile switch like these here then they would be then they would need to first push that to complete the circuit with the antenna and only at that moment can data be read out of this or written to it and and that I can talk a bit about how to use an NFC tag in general but this is kind of a this is there's probably if you search online you know a NFC tag this is it's very base I don't have examples but it's a lot of a lot of what library cards for example have RFID or NFC embedded inside the plastic you don't really see it unless sometimes you can with a very bright light that's a radio circuit and an extremely small chip inside as well which basically stores a very small amount of data so it's it's it stores a number for you and anonymized numbers so your library customer five six eight five four zero or whatever you lay down your cut your library card on the reader and then you can check out books books that way and if you don't return the your books then they match your number to your name and address and send you a bill right so that's one of about fifty million applications for contactless Apo application contact list just means you're not plugging cables in and creating copper or physical connections it's going up to one and a half millimeters of distance of space it's a wireless interface so that's what you have in these badges as well all three of the badges which I sell have this feature the only difference is that the less expensive I like I like to keep price as low as you imagine you can see you can see what prices are at DEFCON I like this because it's kind of DeMarco democratizes badges it's hard to find cheap patches at DEFCON I like that you know anybody regardless of how much money they have can have a badge but that means that I have to put less high rated components on here so the tactile switches are a bit clumsier they're not as nice they not they're not low-profile they click a lot and the the NFC eproms don't store very much information they can just store two kilobits of data and the others can store 64 kilobits so yeah people are always asking what the differences are those are a few of the differences any other questions you're welcome no this screen is off I was kind of I was kind of hoping to get a bit further with hands on while which isn't so relevant if we just have one or two people with computers in the whole room but I think in other parts of the
world may be again at DEFCON next year we'll have similar situations where instead we'll be better prepared and we'll have a one programming device for each of us at each stable position for example that was my plan I just didn't get to it but I did do the demonstration and I think that kind of clarified a bit of what must happen after one of these chips comes from manufacturer STMicroelectronics or no in in this case I'm sorry this is a at Mill itself comes to the producer that's me and then they solder that on and it's empty what has to happen then in order for anything like lights to appear right you need to develop compile and then program that's kind of the workflow just in a nutshell yeah so there is there's little to this still you know ten minutes but I think most questions have been answered and we don't really have much time left so I think we'll end it early if it's okay with you one last question yeah that's why should I come over to you I'll wrap up here and then or or is it a question that I can answer like this yeah okay that's what we'll do next
Feedback