Add Bluetooth To A Cheap Electronic Lock

[James] works from home. His office is filled with objects that can be described with adjectives such as, “expensive,” and, “breakable.” His home, however, is filled with professional object-breakers known as children. To keep these two worlds from colliding, he installed a keypad lock on his office door. The potential side-effect of accidentally training his children to be master safe-crackers aside, the system seems to work so far.

However, being a hacker, the tedium of entering a passcode soon grew too heavy for him. Refusing to be a techno-peasant, he set out to improve his lock. The first step was to reverse engineer the device. The lock is divided into two halves, one has a keypad and handle, the other actually operates the lock mechanism. They are connected with a few wires. He hooked an oscilloscope to the most likely looking candidates, and looked at the data. It was puzzling at first, until he realized one was a wake-up signal, and the other was the data. He then hooked the wires up to a Bluetooth-enabled Arduino, and pressed buttons until he had all the serial commands the door lock used.

After that it was a software game. He wrote code for his phone and the Arduino to try out different techniques and work out bugs. Once he had that sorted, he polished the app and code until he reached his goal. All of the code is available on his GitHub.

Finally, through his own hands, he elevated himself from techno-peasant to wizard. He need but wave his pocket oracle over the magic box in front of his wizard’s lair, and he will be permitted entry. His wizardly trinkets secure from the resident orcs, until they too begin their study of magic.

24 thoughts on “Add Bluetooth To A Cheap Electronic Lock

  1. “[James] works from home. His office is filled with objects that can be described with adjectives such as, “expensive,” and, “breakable.” His home, however, is filled with professional object-breakers known as children.”

    I _so_ like your writing style [Gerrit]!

      1. Bobby drop tables will break your DB for you too. [too lazy to look up the XKCD ref]

        Also – great writing style, and I can also recommend children to test the failure modes of enclosures and devices. A few minutes with a small child is like a few weeks with the general public; it’s like the UV lights they use for accelerated ‘sunlight exposure’ tests…

    1. From past exp. most I have worked with will be useable from the inside but need some sort of batery connector to run from the outside. a few had mechanical locks on the handle its self. An other one we had at work would latch the handle (unlock) in any fail safe condition. One student figured out that a Good static shock could (2 or so times out of 10) get it to fail safe.

  2. Aren’t you afraid that you are inadvertently teaching children that “things behind these locked doors are too important for you to have access to, and are reserved only for specially trained ‘grownups’, and not you”? I’ve always tried to teach my kids a) Don’t get hurt. Let me show you ways I figured out how to get hurt so you can avoid them. and b) If you break it, please try to remember what you did so we can figure out how it broke and hopefully we won’t break it in the same way again. Oh, and c) Everything is fixable (with the understanding that sometimes it’s not worth it to fix it but it’s fun trying). Yes, my Sherline lathe has been seriously abused, almost to the point of not worth using, but my Son got admiration from friends on the things he has made and has an interest in doing things himself, working with metal, etc.

    1. Many of us cannot afford to replace high-ticket items broken out of sheer ignorance. Kid puts a pencil through the TV screen? Whoops, she doesn’t get to watch TV for a few months. Spill on my computer, *I* don’t get to use it for a few months. Spill on my current project, months of work ruined. I’m all for demonstrating and encouraging kids to try adult tasks as soon as they’re able – our kindergartener vacuums when she gets the chance and can microwave things with some supervision, and I’d happily share woodworking projects or electronics, had I the space at the moment.

      The way I see it, the training you give in a) and b) are enough to be roughly responsible with most tools. I’ve got a sesquipedalian five-year-old that can’t be trusted not to stand on her head next to a full drinking glass, or put her feet on my keyboard. She cut the cord off my mouse and “didn’t remember” why. Joys of having an active kid. I would absolutely not have her in the metal shop until she learns some discretion.

      Besides, at work a lot of us are restricted from accessing areas reserved only for specially trained ‘grownups’, why should they be any different?

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.