Tagging your world with RFID
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.
Walker, Adam
Come learn all the wonderful uses of UHF RFID tags and how Ruby makes it easy to read, write and deploy real time asset tracking systems. RFID tags can be read from 30 or more feet away and easily integrated with a variety of existing systems with a low barrier to entry. By the end of this session, you'll learn how to track your pets, clothes, keys, and even make a tool that assists with your grocery shopping.
 All right. Well, this is Tagging Your World with RFID, or How to Annoy Your Friends, Family, and Pets, which is something I'm a bit of an expert on. You can find me on Twitter at adecontius. You can also follow my live tweet stream that has extra information, links to details about RFID tags, that sort of thing, at hashtag rubyrfid. So I work in laboratory information management software. Basically what we do is I personally track vials and robotic freezers using RFID tags. It's freaking cool. It's a lot of fun. And the company that I work for, JMI Laboratory, is we actually test antibiotics and find out which antibiotics are developing, basically bacteria is developing a resistance to. We've been doing this for 15 years. We pass the information off to the FDA. We pass the information off to the European Health Agency. And then of course we help drug companies develop better antibiotics as a side effect. Lots of data to sift through. It's a lot of fun. Follow them up here. I also kind of wanted to promote Ruby for Good. I'm sure some of you have already heard about it. If you haven't, you can visit rubyforgood.org. Also talk to Sean Marcia or talk to Chris Sexton. It's basically a weekend hackathon where you're helping nonprofits and open source. And we go out and last year we had kittens because we worked with the Humane Society this upcoming year where there's going to be red pandas. We're going to actually be at the Smithsonian Mason Research Center in Virginia. And it should be pretty interesting. So a couple of personal things about me. I think I'll understand what I'm doing later on with some of the hardware. For those that don't know me, by knowing that I'm a little bit of a weird dude, I tried to bring back this 40-thin stash that did not work out. I generally hike in a kilt in crocs. I was a professional chef. Not before IT. I quit IT, went to culinary school, became a chef, came back because that turns out that really sucks. I go to a lot of punk rock shows with my daughter who is 18 and surprisingly not too embarrassed by me. I'm Batman. So I work remote. One of the big reasons is because I have, this is what I was known for when I worked in an office, is I was the person that did these horrible things to their office maze. But here's the thing. I didn't actually have that many coworkers. So it was mostly just this guy. We're still dear friends, for the most part. I'm factoid. So this is a photo outside of the plane on the way here. Absolutely beautiful, absolutely fascinating to me. And I've done quite a bit of traveling, but at the age of 38, this is actually the first time I've ever been on a plane. This is also the first time I've ever spoken to a group this large. So I figured it's a whole thing at first. So let's actually move on to what is RFID? So RFID is a radio frequency identification. It's the wireless use of electromagnetic fields to transfer data. You can do this for automatically identifying tracking tags that are attached to objects. That's kind of the Wikipedia definition there. But really no explanation of RFID or magnetic fields and that sort of thing is going to be complete without talking about Tesla. I'm sorry, Nikolai Tesla. Tesla was without a question the greatest geek that I've ever lived. And actually, if you're following that tweet stream, there's a link to an explanation of why he was the greatest geek to ever live. So in 1894, Nikolai Tesla used resonant inductive coupling to wirelessly light up phosphorescent and incandescent lamps. Resonant inductive coupling is the near field wireless transmission of electrical energy between two magnetically coupled coils. Resonant energy transfer is the operating principle behind passive RFID tags, which you're going to see here today. Wireless charging, which I think a lot of people have probably adopted at this point, as well as contactless smart cards, which if you were working in the government, I'm sure you've dealt with. So thank you, Nikolai. There's a lot of practical uses for RFID and a lot that many people in here have already used, such as races. Race timing of the bibs, as well as shoe tags, have become very common, very popular. TVD kiosks, I don't know why I put this one here. These are going to be gone in like a year. Authentication, doors, computer systems, medical cards. This is going more and more and more common. Pole collection, I'm sure that quite a few people here have easy pass or whatever is common down here in Texas. And asset tracking. This is the bread and butter of the RFID industry. This is what has driven prices down. You used to cost several dollars to buy a single RFID tag not that long ago, and now you can buy a paper tag for 13 cents on a giant roll because companies like Walmart and Best Buy and all these large big box stores are using it. They're using it to track their assets. It's easy, it's cheap, and it's certainly become more and more accessible to the rest of us, not just to those industrial purposes. And getting back to access tracking for a moment, that's what I get to do. It's just really fun because you're like, oh, we have a bunch of files of MRSA. Cool, don't touch that. And actually there's a couple of other random uses that I wanted to mention. One is wireless access points and smart dust. There's a thing called the Monza X2K. It's a UHF RFID reader. Sorry, that's not it. It holds about 9,000 bits. It can actually be attached to a circuit board or to microcontroller and can be used to pass information to the processor even if the device is turned off. So where is this getting used and why is this handy? So Microsoft is actually starting to use them in some of their tablets. And the idea is you go into the store, you purchase your product without anybody really even noticing that it's occurring, it gets activated as you're purchasing it. And a signal goes that turned off device and lets it know this was a legitimate purchase, this is now under warranty and joy. However, if you take it and you try to walk out of the store with it, you'll never get to turn it on. That's kind of cool. It's also kind of scary that you can wirelessly transfer information to a turned off computer. There's also a thing called smart dust which are tiny RFID chips that are actually used to create wireless sensor networks. These are starting to be used as neural networks to control artificial robotic limbs. I mean, this is wild stuff. And then of course I think most people are probably familiar with RFID ear tags that are common industrial farming as well as with your pets. That's a fairly common use. And also people, they're used to track movements of personnel within a building at doors, in elevators, that sort of thing. Which every time I've had this conversation somewhere, of course it's going to, it brings up that question. There's the privacy question. There's the, there's this question. So I did link the Google search to find these. It's great. Just pages after pages of Google images. So RFID is cheap. It's becoming more and more common, but it's still not necessarily that understood by the wide populace. The range for reading one of these embeddable RFID chips is centimeters. Not feet. Not even inches. So the concerns that you might be being tracked by RFID tags are a little bit one on a proportion. There's still certain reasons to be cautious. However, the reality is that when you're running around with these networked computers that are getting your location from space in your pockets, I'd be a little more concerned about that. It's a lot easier. But this is a great picture. I just want to say, if this still really is a concern for you. Let me just give you some advice here. Oops. Oh, that went tiny. Okay. So here we have an RFID tag. As we can see it read. No problem whatsoever. Find yourself some tinfoil. Go ahead. Put on the tinfoil hat. They work. Oops. All right. So limitations. There are certain disadvantages to RFID tags. I'm sure that people that are aware of IPKNs and other kind of competing technologies, there's areas where they're just quite a bit better. There's physical limitations. You can't read through aluminum foil. So how are you going to track people? It's difficult to read them through liquids. There are, I think, called signal collision. So if you try to read too many tags in a single spot, things go bad. This is if you have two readers that are trying to read a single tag, it doesn't know who to communicate to. This causes issues. Now the higher end you get with your hardware, the easier, the more collision detection there is and the more it works against it. And then, of course, standards. For the most part there are standards. Generally when you scan an RFID tag, such as a UHF Gen 2 tag, you can look at the first three numbers of the tag and immediately know the manufacturer if you bought it in the US. Everywhere else is just, who knows? And there are privacy concerns. There's a lot of people that have been working on this. And one of my personal favorites are zombie tags. So zombie tags are really cool. So you go into Best Buy, Best Buy Uses, by the way, and say you buy a high end computer. It has an RFID tag in the box that gets picked up at the front of the store. Now you can imagine the potential security issue with that. There's an RFID that might be linked to a product. You leave the store. Is it possible for somebody to pick that up from a distance and know that in your car, say a new MacBook Pro, this is a concern. And this is a concern privacy advocates have, and I certainly have had as well. So they came up with zombie tags. So as you purchase the product, the tag is said, told, you're dead. And it no longer responds. It might actually pick up a magnetic wave and it will resonate, but it won't respond unless it gets a very specific code in which case it goes, oh, sweet, I'm alive again. And of course, why would you do that? Because somebody might return it to a store and you have to add it back into your store ready for sale. I mean, come on, that's awesome. So why Ruby? And why am I just rambling on about RFID tags and all this goofiness? And tinfoil hats. So there's a bit of a lower technical debt. When we looked at this industry 10 years ago, it was like, you got to get your electrical engineer in the room to help you write your software. It was ridiculous. There are libraries now. There are ways of accessing it. The manufacturers are getting better at this. So they're exposing APIs, they're exposing web sockets that makes the language like Ruby perfect. And in my industry personally, where I'm dealing with scientists who oftentimes already know Python, sent that big of a jump, and I can write a script for them, pass it off and go here, enjoy, and they can change it if they need to in the future. And Ruby makes me happy. It really does. I was a PHP dev for many, many, many years. I was dead inside. And then I found a Ruby. And it just, it brings me absolute joy. It really does. So this is a bit of a high-level overview. If you want to talk more in depth, if you want to talk about the frequency ranges for UHF tags versus HF versus NFC tags, I'll be more than happy to. Tonight, after Matt's talks, let's grab a cup of coffee. We'll spend it all the time that you want. If you need something written, of course, just buy me a beer and I'll just write it for you, that's fine. Let's actually get to the fun part. Let's talk about the not-so-practical uses. So this is Betty. Betty is my dog, and I am so thankful to the RubyConf organizers for doing all this, but they did say that no, I could not bring her today. So this will be Betty for this demonstration. So Betty has recently, she's signed up for Twitter. She's been tweeting a little bit. It's difficult, no thumbs. Oh, God. So this is real. Okay, you know, people go and we create goofy things and we throw them up as a demo and a talk. I have an RFID antenna by my back door, and I have this software running on a Raspberry Pi because I'm a goof nut, because I will let my dog out, and I'll go sit down and go, I'm going to get this tested pass real quick, and then I'll go let her back in. Then, like an hour goes by, and I hear the scratching, and she gives me that look of, just, you've betrayed me. I feel terrible. I love my dog. She's absolutely wonderful. So I had to come up with a different solution. So basically what we have here instead is, let's go ahead and run Betty.RB. I'm now watching the door for Betty. Betty around her collar, the real Betty, not this Betty, has an RFID chip. So when Betty goes outside, pretty sure that picked it up. Oh my God, you didn't do this to me, did you? Hardware talking, I think you're right. Oh, then. I've got to run a failsafe in there. Really? That could be it, actually. Let me examine real quick. Like I said, hardware talks. Okay, I'm talking to it. Let's actually get it here. So I'm going to socket. Let me use this. Okay, that's how it works. Well. You're dead to me. So if Betty had not betrayed me, what would have occurred, and I will do a proof of concept here. We'll just go to the page where we can find this. She has been basically tweeting me and letting me, I'm not logged in here, never mind. So she's been tweeting me, letting me know, Adam on the outside, please don't forget me. If you visit that website, you will actually visit her Twitter feed. You'll be able to see the past tweets because I'm sloppy. And when I let her back in, it actually just goes ahead and lets me know how long she's been out. This is the code. If somebody notices why it doesn't work now, feel free to let me know after the fact. You know, we're just basically, we're observing a web socket. That's all we're doing. We're looking for Betty, we're finding Betty's RFID tag, we're performing one of two actions. You know, this is one of the reasons I love Ruby. It's just so quick to throw these things out and or break them. Let's move on to the Internet of Things. I don't like this phrase. I really don't. I mean, this is like, you know, such a buzzword. Everybody's into this. And so, Julian Schiel on an episode of Ruby Rose was quoted as saying, why should your fridge be Internet connected? Because it could tell you that you run out of eggs, but it probably doesn't know that you stopped eating eggs months ago. I mean, what a great point. There's no reason to have a smart fridge. That's why I built a smart trash can, which will work. Hello. Oh my God, you better work. So here's the idea. I'm not going to switch it in this quickly. Let's go and start up my smart trash can. Thank you very much, smart trash can. And there's my smart trash can. So I have just gone to the store and I've deleted my test data from last night. There you go. And I have, you know, say I want to log these items so that in the future I'll know when I run out. I mean, why else would you use the smart trash can, right? There we go. All right. So I bought several items with me today. This is, I mean, direct from my house. This is representation of the things that I usually have around. I have, of course, some taco shells. We have some mason jar covers, because I can. A drop soup. I had something else. Ginseng tea. Love tea. And see your stool softener. What? So with Scandar items, I actually, I have a little API connection. Here it goes up, looks at the barcodes and pulls in items. I'll show you the code for that, I promise. But now we've stocked our, oh, by the way, did you, does anybody notice the iPhone up there, the 4G cover? That's the taco shells? I don't know why. I submitted a request to them. It's not my problem. So as your week goes on and you're ready to, you know, you go through your food, you've taken all hundreds stool softeners, that sort of thing. All you have to do is throw your items away and your smart trash can you better work. I'm not even joking. Oh, oh, oh, oh, no, no, no, I did the wrong one. Look at that. There you go. So, and now we've just put this on, and now we have a shopping list and anybody can view the list from a web browser, your loved ones can be out shopping and go, oh, he had that stool softener problem again and they can just go ahead and pick them up, which that's what loved ones are for. Yeah, I've never talked to them well before. So that was the trash can demo. It was actually the code for it's very simple once again, just listening to a web socket and performing an action in an active record and also hitting this weird funky API that I found someplace that apparently doesn't work completely. Somebody pointed out to me when I had actually discussed this that if you want to take this a step further, you can actually get RFID bracelets, give them to people and find out who's the most wasteful in your house because there's no better way to win over your family than by tagging them and then harassing them. So there's lots of other things that you can do with RFID. Personally for me, I'm not the best dresser and I've been accused of playing golf because of my bad choices. So I want to come out with a better way to deal with this. So I have an RFID scanner in my bedroom because I'm that guy and it's a fashion portal. Once again, very simple, we're observing a web socket. I'm actually not going to, I'm actually missing the original portal I was going to bring so I'm not going to bother with the twice in a row situation but we are going to discuss kind of a pick me up, how to deal with your special clothes for special occasions which I don't know about the rest of you but I live a very rich fantasy life and I personally, I enjoy being entertained and I enjoy it when I can get like put into an excellent mood first thing in the morning. So I have a list of clothing, they're rated based on different uses, I don't know, tuxedo, lab coat. And so basically the end result of this, let me actually get off of this now. I'm going to switch this again. Is when I get up in the morning and I grab my clothes and I have a special purpose, I am going to get psyched up about it. So like I said, I work for a lab. You go and you put on your lab coat. So I mean, you know you're going to kick ass that day when you're walking out like that and to say you know you get off and you have an event after. I really thought I had cut those down a little bit. I'm not sure if you want to go ahead and guess what this was going to do. Yeah. I will do one more and then I will stop beating on this dead horse because I entertained, I was up in the hotel room like all weekend just playing and having fun with it. And my last one was I know that this tie looked good. Good Lord. Once again, simple. Same pattern. We're listening to a web socket. I have been, like I said, there's been some information tweeted out because there's a lot of different devices out there. You can get RFID readers now that are $200 range. Not this setup, but you can get cheap working RFID readers on Alibaba, several other sources. And like I said before, one of the things I didn't cover is I didn't cover writing. I would love to talk to anybody that's interested in that. I did not talk about password locking, kill commands. I didn't cover any of that because the reality is RFID has its own conferences. It's a huge topic and it's just too much to go into. But what I want to do is I want to spark your imagination. This language, the happiness that comes with it, I think you can spark creativity. And I think it gives us an opportunity to, you know, instead of being our heads against a wall, we can explore and we can have fun and we can entertain ourselves when we get up in the morning. So I'm hoping that what everybody takes away from this is that they kind of see there's all this stuff out there that you can go play with and you can make anything that you want. However, I do realize, I said this was about harassing, I'm sorry not harassing, that's horrible. This was about annoying your pets and your family and your loved ones. Okay, admittedly having this music playing, that annoys your loved ones at home. The pets. I don't think she's dead to me. But what about your friends? So I want to tell you a story and I actually want to invite you to explore some of the possibilities here a little bit more. This is Dana. Dana Scully. Don't look at me. I didn't name it. This is Coraline Ada M. Keys Teddy Bear that she brought with her from Chicago. It is missing by the way. So if after Matz's talk, if anybody wants a little something to do and you're not leaving tonight, this is your starter card, Coraline. Grab some people. I'll give you this barcode scanner. As you reveal the correct RFID tags, it will give you the next clue. I hope for your sake that you get them all. So I think with that and everyone heard that threat, I think that's it. So thanks for letting me talk. If you have any questions, I'll be happy to answer them. Does anybody want to foil hat? It depends on the kinds of tags. The higher end tags have like a.01% failure rate. These type of tags, the paper ones like a place on my head, probably somewhere in the 85% range. So generally speaking, what you do is you would load these into like a, I see Brady makes an RFID printer. You start printing the spool, it will read the tag first, write a corresponding barcode to the tag, verify that it operates and continue printing out. Otherwise, you can black it out and know the tag is bad and you just don't use it. No, I am. Yeah, it's NFC. So it's in a different range than I've been showing up here. NFC is really interesting, but it has a range of a few inches. I can actually, the tag that's in Betty, who's said to me, can be read from about 30 feet away with this equipment in theory, I guess not. Or not. So there's a big difference there. But yeah, NFC is great. I mean, there's a lot of cool stuff you can do with it and definitely a lot of fun. If you have an Android phone, it's even more fun. Those, I'm sorry, are those, oh, those are tiles, these are iVecans. I'm sorry, I'm sorry. Talk to Chris Sexton. Oh, the antennas are like 300 each and the reader itself is 15 to 1600. Yeah, this is industrial equipment. This is not home equipment. So I shouldn't like cover that. There is cheaper play equipment out there. In fact, actually, if you have a Raspberry Pi or Arduino or something of that nature, there are now UHF Gen 2 shields that you can get for them, which is like 50 bucks, which is a little cheaper. They can take a bit of a beating. Most of that comes down to the casing. So one of the things that you find with RFID is things like antenna shape play a big role, which limits how you can package them. You can't mount them to metal as well. So they usually have to be, they're usually backed on paper or they're backed on paper that is then sealed inside of plastic. Betty's, oh, okay, she really is going. So Betty is wearing a fireproof RFID tag, as well as the real Betty, because I don't know why. They put them on steel beams in case they get crushed, they'll survive. I mean, they're usually used in industrial applications where you might see a construction site piles and piles and piles of beams everywhere. They put RFID tags on them and they'll go through and they'll read a pile and they'll know exactly what they have and they'll have the GPS coordinates for it and now they have their inventory. So they have to take a beating. And those tags in particular last, I think they're guaranteed the last 20 years, but I would suspect they're probably at least less 50. So yeah, when several tags are trying to respond at the same time, you're going to get the signal collision. Generally, it comes down to the reader. It gets to deal with that. Industrial readers like this, I can read about 100 tags at a time within a span of, I don't know, like 500 milliseconds. With lower end, like, you know, hobbyist type readers, you might be able to read five at a time and it's all about sorting through that. It's like packet collision, similar concept, and on the other side of that, if it's caused from two readers reading the same tag, you just screw up the placement of the readers. You're going to have to figure that out. Yes and no. So a tag can only respond to one antenna at a time. So generally what you do, actually, here's a great, we'll probably enjoy this, so we, the company I worked for, we had actually wired up a anti-doping lab in the Middle East. And what we did was we put RFID readers, which were, they were a very low-range reader, into carts and in the ceilings, like every six feet, more readers and antennas. And then when the athletes would come in and they would give their urine sample, it was sealed in a glass container that had an RFID chip built into it. So now as it would move through the doping lab, they saw who had it because they had a tag. They saw what cart it was on, they saw which floor, which room, because as you would pass each tag, it would just take a log of it. The only way that you would know, though, which direction it was going is because the previous reader had read it. So this becomes kind of the issue. And because you can't read it with two different ones, you have to play with location and worry a little bit about that. But yeah, I mean, it's the exact kind of project that it's becoming more and more common for. All right. I think we're good. All right. Well, once again, thank you, everyone.
 All right.  Well, this is Tagging Your World with RFID, or How to Annoy Your Friends, Family, and  Pets, which is something I'm a bit of an expert on.  You can find me on Twitter at adecontius.  You can also follow my live tweet stream that has extra information, links to details about  RFID tags, that sort of thing, at hashtag rubyrfid.  So I work in laboratory information management software.  Basically what we do is I personally track vials and robotic freezers using RFID tags.  It's freaking cool.  It's a lot of fun.  And the company that I work for, JMI Laboratory, is we actually test antibiotics and find out  which antibiotics are developing, basically bacteria is developing a resistance to.  We've been doing this for 15 years.  We pass the information off to the FDA.  We pass the information off to the European Health Agency.  And then of course we help drug companies develop better antibiotics as a side effect.  Lots of data to sift through.  It's a lot of fun.  Follow them up here.  I also kind of wanted to promote Ruby for Good.  I'm sure some of you have already heard about it.  If you haven't, you can visit rubyforgood.org.  Also talk to Sean Marcia or talk to Chris Sexton.  It's basically a weekend hackathon where you're helping nonprofits and open source.  And we go out and last year we had kittens because we worked with the Humane Society this  upcoming year where there's going to be red pandas.  We're going to actually be at the Smithsonian Mason Research Center in Virginia.  And it should be pretty interesting.  So a couple of personal things about me.  I think I'll understand what I'm doing later on with some of the hardware.  For those that don't know me, by knowing that I'm a little bit of a weird dude, I tried  to bring back this 40-thin stash that did not work out.  I generally hike in a kilt in crocs.  I was a professional chef.  Not before IT.  I quit IT, went to culinary school, became a chef, came back because that turns out that  really sucks.  I go to a lot of punk rock shows with my daughter who is 18 and surprisingly not too embarrassed  by me.  I'm Batman.  So I work remote.  One of the big reasons is because I have, this is what I was known for when I worked  in an office, is I was the person that did these horrible things to their office maze.  But here's the thing.  I didn't actually have that many coworkers.  So it was mostly just this guy.  We're still dear friends, for the most part.  I'm factoid.  So this is a photo outside of the plane on the way here.  Absolutely beautiful, absolutely fascinating to me.  And I've done quite a bit of traveling, but at the age of 38, this is actually the first  time I've ever been on a plane.  This is also the first time I've ever spoken to a group this large.  So I figured it's a whole thing at first.  So let's actually move on to what is RFID?  So RFID is a radio frequency identification.  It's the wireless use of electromagnetic fields to transfer data.  You can do this for automatically identifying tracking tags that are attached to objects.  That's kind of the Wikipedia definition there.  But really no explanation of RFID or magnetic fields and that sort of thing is going to be  complete without talking about Tesla.  I'm sorry, Nikolai Tesla.  Tesla was without a question the greatest geek that I've ever lived.  And actually, if you're following that tweet stream, there's a link to an explanation of  why he was the greatest geek to ever live.  So in 1894, Nikolai Tesla used resonant inductive coupling to wirelessly light up phosphorescent  and incandescent lamps.  Resonant inductive coupling is the near field wireless transmission of electrical energy  between two magnetically coupled coils.  Resonant energy transfer is the operating principle behind passive RFID tags, which  you're going to see here today.  Wireless charging, which I think a lot of people have probably adopted at this point,  as well as contactless smart cards, which if you were working in the government, I'm  sure you've dealt with.  So thank you, Nikolai.  There's a lot of practical uses for RFID and a lot that many people in here have already  used, such as races.  Race timing of the bibs, as well as shoe tags, have become very common, very popular.  TVD kiosks, I don't know why I put this one here.  These are going to be gone in like a year.  Authentication, doors, computer systems, medical cards.  This is going more and more and more common.  Pole collection, I'm sure that quite a few people here have easy pass or whatever is  common down here in Texas.  And asset tracking.  This is the bread and butter of the RFID industry.  This is what has driven prices down.  You used to cost several dollars to buy a single RFID tag not that long ago, and now  you can buy a paper tag for 13 cents on a giant roll because companies like Walmart and Best  Buy and all these large big box stores are using it.  They're using it to track their assets.  It's easy, it's cheap, and it's certainly become more and more accessible to the rest  of us, not just to those industrial purposes.  And getting back to access tracking for a moment, that's what I get to do.  It's just really fun because you're like, oh, we have a bunch of files of MRSA.  Cool, don't touch that.  And actually there's a couple of other random uses that I wanted to mention.  One is wireless access points and smart dust.  There's a thing called the Monza X2K.  It's a UHF RFID reader.  Sorry, that's not it.  It holds about 9,000 bits.  It can actually be attached to a circuit board or to microcontroller and can be used to pass  information to the processor even if the device is turned off.  So where is this getting used and why is this handy?  So Microsoft is actually starting to use them in some of their tablets.  And the idea is you go into the store, you purchase your product without anybody really  even noticing that it's occurring, it gets activated as you're purchasing it.  And a signal goes that turned off device and lets it know this was a legitimate purchase,  this is now under warranty and joy.  However, if you take it and you try to walk out of the store with it, you'll never get  to turn it on.  That's kind of cool.  It's also kind of scary that you can wirelessly transfer information to a turned off computer.  There's also a thing called smart dust which are tiny RFID chips that are actually used  to create wireless sensor networks.  These are starting to be used as neural networks to control artificial robotic limbs.  I mean, this is wild stuff.  And then of course I think most people are probably familiar with RFID ear tags that  are common industrial farming as well as with your pets.  That's a fairly common use.  And also people, they're used to track movements of personnel within a building at doors, in  elevators, that sort of thing.  Which every time I've had this conversation somewhere, of course it's going to, it brings  up that question.  There's the privacy question.  There's the, there's this question.  So I did link the Google search to find these.  It's great.  Just pages after pages of Google images.  So RFID is cheap.  It's becoming more and more common, but it's still not necessarily that understood by  the wide populace.  The range for reading one of these embeddable RFID chips is centimeters.  Not feet.  Not even inches.  So the concerns that you might be being tracked by RFID tags are a little bit one on a proportion.  There's still certain reasons to be cautious.  However, the reality is that when you're running around with these networked computers that  are getting your location from space in your pockets, I'd be a little more concerned about  that.  It's a lot easier.  But this is a great picture.  I just want to say, if this still really is a concern for you.  Let me just give you some advice here.  Oops.  Oh, that went tiny.  Okay.  So here we have an RFID tag.  As we can see it read.  No problem whatsoever.  Find yourself some tinfoil.  Go ahead.  Put on the tinfoil hat.  They work.  Oops.  All right.  So limitations.  There are certain disadvantages to RFID tags.  I'm sure that people that are aware of IPKNs and other kind of competing technologies,  there's areas where they're just quite a bit better.  There's physical limitations.  You can't read through aluminum foil.  So how are you going to track people?  It's difficult to read them through liquids.  There are, I think, called signal collision.  So if you try to read too many tags in a single spot, things go bad.  This is if you have two readers that are trying to read a single tag, it doesn't know who  to communicate to.  This causes issues.  Now the higher end you get with your hardware, the easier, the more collision detection there  is and the more it works against it.  And then, of course, standards.  For the most part there are standards.  Generally when you scan an RFID tag, such as a UHF Gen 2 tag, you can look at the first  three numbers of the tag and immediately know the manufacturer if you bought it in the US.  Everywhere else is just, who knows?  And there are privacy concerns.  There's a lot of people that have been working on this.  And one of my personal favorites are zombie tags.  So zombie tags are really cool.  So you go into Best Buy, Best Buy Uses, by the way, and say you buy a high end computer.  It has an RFID tag in the box that gets picked up at the front of the store.  Now you can imagine the potential security issue with that.  There's an RFID that might be linked to a product.  You leave the store.  Is it possible for somebody to pick that up from a distance and know that in your car,  say a new MacBook Pro, this is a concern.  And this is a concern privacy advocates have, and I certainly have had as well.  So they came up with zombie tags.  So as you purchase the product, the tag is said, told, you're dead.  And it no longer responds.  It might actually pick up a magnetic wave and it will resonate, but it won't respond  unless it gets a very specific code in which case it goes, oh, sweet, I'm alive again.  And of course, why would you do that?  Because somebody might return it to a store and you have to add it back into your store  ready for sale.  I mean, come on, that's awesome.  So why Ruby?  And why am I just rambling on about RFID tags and all this goofiness?  And tinfoil hats.  So there's a bit of a lower technical debt.  When we looked at this industry 10 years ago, it was like, you got to get your electrical  engineer in the room to help you write your software.  It was ridiculous.  There are libraries now.  There are ways of accessing it.  The manufacturers are getting better at this.  So they're exposing APIs, they're exposing web sockets that makes the language like Ruby  perfect.  And in my industry personally, where I'm dealing with scientists who oftentimes already know  Python, sent that big of a jump, and I can write a script for them, pass it off and go  here, enjoy, and they can change it if they need to in the future.  And Ruby makes me happy.  It really does.  I was a PHP dev for many, many, many years.  I was dead inside.  And then I found a Ruby.  And it just, it brings me absolute joy.  It really does.  So this is a bit of a high-level overview.  If you want to talk more in depth, if you want to talk about the frequency ranges for  UHF tags versus HF versus NFC tags, I'll be more than happy to.  Tonight, after Matt's talks, let's grab a cup of coffee.  We'll spend it all the time that you want.  If you need something written, of course, just buy me a beer and I'll just write it  for you, that's fine.  Let's actually get to the fun part.  Let's talk about the not-so-practical uses.  So this is Betty.  Betty is my dog, and I am so thankful to the RubyConf organizers for doing all this, but  they did say that no, I could not bring her today.  So this will be Betty for this demonstration.  So Betty has recently, she's signed up for Twitter.  She's been tweeting a little bit.  It's difficult, no thumbs.  Oh, God.  So this is real.  Okay, you know, people go and we create goofy things and we throw them up as a demo and  a talk.  I have an RFID antenna by my back door, and I have this software running on a Raspberry  Pi because I'm a goof nut, because I will let my dog out, and I'll go sit down and go,  I'm going to get this tested pass real quick, and then I'll go let her back in.  Then, like an hour goes by, and I hear the scratching, and she gives me that look of,  just, you've betrayed me.  I feel terrible.  I love my dog.  She's absolutely wonderful.  So I had to come up with a different solution.  So basically what we have here instead is, let's go ahead and run Betty.RB.  I'm now watching the door for Betty.  Betty around her collar, the real Betty, not this Betty, has an RFID chip.  So when Betty goes outside, pretty sure that picked it up.  Oh my God, you didn't do this to me, did you?  Hardware talking, I think you're right.  Oh, then.  I've got to run a failsafe in there.  Really?  That could be it, actually.  Let me examine real quick.  Like I said, hardware talks.  Okay, I'm talking to it.  Let's actually get it here.  So I'm going to socket.  Let me use this.  Okay, that's how it works.  Well.  You're dead to me.  So if Betty had not betrayed me, what would have occurred, and I will do a proof of concept  here.  We'll just go to the page where we can find this.  She has been basically tweeting me and letting me, I'm not logged in here, never mind.  So she's been tweeting me, letting me know, Adam on the outside, please don't forget me.  If you visit that website, you will actually visit her Twitter feed.  You'll be able to see the past tweets because I'm sloppy.  And when I let her back in, it actually just goes ahead and lets me know how long she's  been out.  This is the code.  If somebody notices why it doesn't work now, feel free to let me know after the fact.  You know, we're just basically, we're observing a web socket.  That's all we're doing.  We're looking for Betty, we're finding Betty's RFID tag, we're performing one of two actions.  You know, this is one of the reasons I love Ruby.  It's just so quick to throw these things out and or break them.  Let's move on to the Internet of Things.  I don't like this phrase.  I really don't.  I mean, this is like, you know, such a buzzword.  Everybody's into this.  And so, Julian Schiel on an episode of Ruby Rose was quoted as saying, why should your  fridge be Internet connected?  Because it could tell you that you run out of eggs, but it probably doesn't know that  you stopped eating eggs months ago.  I mean, what a great point.  There's no reason to have a smart fridge.  That's why I built a smart trash can, which will work.  Hello.  Oh my God, you better work.  So here's the idea.  I'm not going to switch it in this quickly.  Let's go and start up my smart trash can.  Thank you very much, smart trash can.  And there's my smart trash can.  So I have just gone to the store and I've deleted my test data from last night.  There you go.  And I have, you know, say I want to log these items so that in the future I'll know when  I run out.  I mean, why else would you use the smart trash can, right?  There we go.  All right.  So I bought several items with me today.  This is, I mean, direct from my house.  This is representation of the things that I usually have around.  I have, of course, some taco shells.  We have some mason jar covers, because I can.  A drop soup.  I had something else.  Ginseng tea.  Love tea.  And see your stool softener.  What?  So with Scandar items, I actually, I have a little API connection.  Here it goes up, looks at the barcodes and pulls in items.  I'll show you the code for that, I promise.  But now we've stocked our, oh, by the way, did you, does anybody notice the iPhone up  there, the 4G cover?  That's the taco shells?  I don't know why.  I submitted a request to them.  It's not my problem.  So as your week goes on and you're ready to, you know, you go through your food, you've  taken all hundreds stool softeners, that sort of thing.  All you have to do is throw your items away and your smart trash can you better work.  I'm not even joking.  Oh, oh, oh, oh, no, no, no, I did the wrong one.  Look at that.  There you go.  So, and now we've just put this on, and now we have a shopping list and anybody can view  the list from a web browser, your loved ones can be out shopping and go, oh, he had that  stool softener problem again and they can just go ahead and pick them up, which that's  what loved ones are for.  Yeah, I've never talked to them well before.  So that was the trash can demo.  It was actually the code for it's very simple once again, just listening to a web socket  and performing an action in an active record and also hitting this weird funky API that  I found someplace that apparently doesn't work completely.  Somebody pointed out to me when I had actually discussed this that if you want to take this  a step further, you can actually get RFID bracelets, give them to people and find out  who's the most wasteful in your house because there's no better way to win over your family  than by tagging them and then harassing them.  So there's lots of other things that you can do with RFID.  Personally for me, I'm not the best dresser and I've been accused of playing golf because  of my bad choices.  So I want to come out with a better way to deal with this.  So I have an RFID scanner in my bedroom because I'm that guy and it's a fashion portal.  Once again, very simple, we're observing a web socket.  I'm actually not going to, I'm actually missing the original portal I was going to bring so  I'm not going to bother with the twice in a row situation but we are going to discuss  kind of a pick me up, how to deal with your special clothes for special occasions which  I don't know about the rest of you but I live a very rich fantasy life and I personally,  I enjoy being entertained and I enjoy it when I can get like put into an excellent mood first  thing in the morning.  So I have a list of clothing, they're rated based on different uses, I don't know, tuxedo,  lab coat.  And so basically the end result of this, let me actually get off of this now.  I'm going to switch this again.  Is when I get up in the morning and I grab my clothes and I have a special purpose, I  am going to get psyched up about it.  So like I said, I work for a lab.  You go and you put on your lab coat.  So I mean, you know you're going to kick ass that day when you're walking out like that  and to say you know you get off and you have an event after.  I really thought I had cut those down a little bit.  I'm not sure if you want to go ahead and guess what this was going to do.  Yeah.  I will do one more and then I will stop beating on this dead horse because I entertained, I  was up in the hotel room like all weekend just playing and having fun with it.  And my last one was I know that this tie looked good.  Good Lord.  Once again, simple.  Same pattern.  We're listening to a web socket.  I have been, like I said, there's been some information tweeted out because there's a  lot of different devices out there.  You can get RFID readers now that are $200 range.  Not this setup, but you can get cheap working RFID readers on Alibaba, several other sources.  And like I said before, one of the things I didn't cover is I didn't cover writing.  I would love to talk to anybody that's interested in that.  I did not talk about password locking, kill commands.  I didn't cover any of that because the reality is RFID has its own conferences.  It's a huge topic and it's just too much to go into.  But what I want to do is I want to spark your imagination.  This language, the happiness that comes with it, I think you can spark creativity.  And I think it gives us an opportunity to, you know, instead of being our heads against  a wall, we can explore and we can have fun and we can entertain ourselves when we get  up in the morning.  So I'm hoping that what everybody takes away from this is that they kind of see there's  all this stuff out there that you can go play with and you can make anything that you want.  However, I do realize, I said this was about harassing, I'm sorry not harassing, that's  horrible.  This was about annoying your pets and your family and your loved ones.  Okay, admittedly having this music playing, that annoys your loved ones at home.  The pets.  I don't think she's dead to me.  But what about your friends?  So I want to tell you a story and I actually want to invite you to explore some of the  possibilities here a little bit more.  This is Dana.  Dana Scully.  Don't look at me.  I didn't name it.  This is Coraline Ada M. Keys Teddy Bear that she brought with her from Chicago.  It is missing by the way.  So if after Matz's talk, if anybody wants a little something to do and you're not leaving  tonight, this is your starter card, Coraline.  Grab some people.  I'll give you this barcode scanner.  As you reveal the correct RFID tags, it will give you the next clue.  I hope for your sake that you get them all.  So I think with that and everyone heard that threat, I think that's it.  So thanks for letting me talk.  If you have any questions, I'll be happy to answer them.  Does anybody want to foil hat?  It depends on the kinds of tags.  The higher end tags have like a.01% failure rate.  These type of tags, the paper ones like a place on my head, probably somewhere in the  85% range.  So generally speaking, what you do is you would load these into like a, I see Brady  makes an RFID printer.  You start printing the spool, it will read the tag first, write a corresponding barcode  to the tag, verify that it operates and continue printing out.  Otherwise, you can black it out and know the tag is bad and you just don't use it.  No, I am.  Yeah, it's NFC.  So it's in a different range than I've been showing up here.  NFC is really interesting, but it has a range of a few inches.  I can actually, the tag that's in Betty, who's said to me, can be read from about 30 feet  away with this equipment in theory, I guess not.  Or not.  So there's a big difference there.  But yeah, NFC is great.  I mean, there's a lot of cool stuff you can do with it and definitely a lot of fun.  If you have an Android phone, it's even more fun.  Those, I'm sorry, are those, oh, those are tiles, these are iVecans.  I'm sorry, I'm sorry.  Talk to Chris Sexton.  Oh, the antennas are like 300 each and the reader itself is 15 to 1600.  Yeah, this is industrial equipment.  This is not home equipment.  So I shouldn't like cover that.  There is cheaper play equipment out there.  In fact, actually, if you have a Raspberry Pi or Arduino or something of that nature,  there are now UHF Gen 2 shields that you can get for them, which is like 50 bucks, which  is a little cheaper.  They can take a bit of a beating.  Most of that comes down to the casing.  So one of the things that you find with RFID is things like antenna shape play a big role,  which limits how you can package them.  You can't mount them to metal as well.  So they usually have to be, they're usually backed on paper or they're backed on paper  that is then sealed inside of plastic.  Betty's, oh, okay, she really is going.  So Betty is wearing a fireproof RFID tag, as well as the real Betty, because I don't  know why.  They put them on steel beams in case they get crushed, they'll survive.  I mean, they're usually used in industrial applications where you might see a construction  site piles and piles and piles of beams everywhere.  They put RFID tags on them and they'll go through and they'll read a pile and they'll  know exactly what they have and they'll have the GPS coordinates for it and now they have  their inventory.  So they have to take a beating.  And those tags in particular last, I think they're guaranteed the last 20 years, but  I would suspect they're probably at least less 50.  So yeah, when several tags are trying to respond at the same time, you're going to get the  signal collision.  Generally, it comes down to the reader.  It gets to deal with that.  Industrial readers like this, I can read about 100 tags at a time within a span of, I don't  know, like 500 milliseconds.  With lower end, like, you know, hobbyist type readers, you might be able to read five at  a time and it's all about sorting through that.  It's like packet collision, similar concept, and on the other side of that, if it's caused  from two readers reading the same tag, you just screw up the placement of the readers.  You're going to have to figure that out.  Yes and no.  So a tag can only respond to one antenna at a time.  So generally what you do, actually, here's a great, we'll probably enjoy this, so we,  the company I worked for, we had actually wired up a anti-doping lab in the Middle East.  And what we did was we put RFID readers, which were, they were a very low-range reader, into  carts and in the ceilings, like every six feet, more readers and antennas.  And then when the athletes would come in and they would give their urine sample, it was  sealed in a glass container that had an RFID chip built into it.  So now as it would move through the doping lab, they saw who had it because they had  a tag.  They saw what cart it was on, they saw which floor, which room, because as you would pass  each tag, it would just take a log of it.  The only way that you would know, though, which direction it was going is because the  previous reader had read it.  So this becomes kind of the issue.  And because you can't read it with two different ones, you have to play with location and  worry a little bit about that.  But yeah, I mean, it's the exact kind of project that it's becoming more and more common for.  All right.  I think we're good.  All right.  Well, once again, thank you, everyone.
Tagging_your_world_with_RFID_0_71.png Tagging_your_world_with_RFID_72_263.png Tagging_your_world_with_RFID_264_4931.png Tagging_your_world_with_RFID_4932_6695.png Tagging_your_world_with_RFID_6696_15539.png Tagging_your_world_with_RFID_15540_15707.png Tagging_your_world_with_RFID_15708_18995.png Tagging_your_world_with_RFID_18996_19307.png Tagging_your_world_with_RFID_19308_19703.png Tagging_your_world_with_RFID_19704_19799.png Tagging_your_world_with_RFID_19800_20855.png Tagging_your_world_with_RFID_20856_20963.png Tagging_your_world_with_RFID_20964_25991.png Tagging_your_world_with_RFID_25992_27311.png Tagging_your_world_with_RFID_27312_33515.png Tagging_your_world_with_RFID_33516_34019.png Tagging_your_world_with_RFID_34020_39479.png Tagging_your_world_with_RFID_39480_44351.png Tagging_your_world_with_RFID_44352_44987.png Tagging_your_world_with_RFID_44988_45083.png Tagging_your_world_with_RFID_45084_45695.png Tagging_your_world_with_RFID_45696_46007.png Tagging_your_world_with_RFID_46008_46067.png Tagging_your_world_with_RFID_46068_46199.png Tagging_your_world_with_RFID_46200_46295.png Tagging_your_world_with_RFID_46296_46679.png Tagging_your_world_with_RFID_46680_47327.png Tagging_your_world_with_RFID_47328_47519.png Tagging_your_world_with_RFID_47520_47591.png Tagging_your_world_with_RFID_47592_47639.png Tagging_your_world_with_RFID_47640_47783.png Tagging_your_world_with_RFID_47784_48167.png Tagging_your_world_with_RFID_48168_48347.png Tagging_your_world_with_RFID_48348_48431.png Tagging_your_world_with_RFID_48432_49487.png Tagging_your_world_with_RFID_49488_49619.png Tagging_your_world_with_RFID_49620_49679.png Tagging_your_world_with_RFID_49680_49895.png Tagging_your_world_with_RFID_49896_49955.png Tagging_your_world_with_RFID_49956_50351.png Tagging_your_world_with_RFID_50352_50975.png Tagging_your_world_with_RFID_50976_51083.png Tagging_your_world_with_RFID_51084_51767.png Tagging_your_world_with_RFID_51768_51911.png Tagging_your_world_with_RFID_51912_52213.png