Which Wireless Is Right Wireless?

Back in the early days of Arduino proliferation (and before you ask, yes we realize there was a time before that too), wireless was a strange and foreign beast. IR communication was definitely a thing. And if you had the funds there was this cool technology called ZigBee that was available, often in funny blue house-shaped XBee boards. With even more funds and a stomach for AT commands you could even bolt on a 2G cell radio for unlimited range. WiFi existed too, but connecting it to a hobbyist ecosystem of boards was a little hairier (though maybe not for our readership).

But as cell phones pushed demand for low power wireless forward and the progression of what would become the Internet of marking Terms (the IoT, of course) began, a proliferation of options appeared for wireless communication. Earlier this week we came across a great primer on some of the major wireless technologies which was put together by Digikey earlier in the year. Let’s not bury the lede. This table is the crux of the piece:

There are some neat entries here that are a little less common (and our old friend, the oft-maligned and never market-penetrating ZigBee). It’s actually even missing some entries. Let’s break it down:

  • Extremely short range: Just NFC. Very useful for transferring small amount of sensitive information slowly, or things with high location-relevance (like between phones that are touching).
  • Short range: BLE, Zigbee, Z-Wave, etc. Handy for so-called Personal Area Networks and home-scale systems.
  • Medium/long range: Wifi, Bluetooth, Zigbee, Z-Wave, LoRaWAN: Sometimes stretching for a kilometer or more in open spaces. Useful for everything from emitting tweets to stitching together a mesh network across a forrest, as long as there are enough nodes. Some of these are also useful at shorter range.
  • Very Long range/rangeless: Sigfox, NB-IoT, LTE Category-0. Connect anywhere, usually with some sort of subscription for network access. Rangeless in the sense that range is so long you use infrastructure instead of hooking a radio up to a Raspberry Pi under your desk. Though LoRa can be a fun exception to that.

You’re unlikely to go from zero to custom wireless solution without getting down into the mud with the available dev boards for a few different common protocols, but which ones? The landscape has changed so rapidly over the years, it’s easy to get stuck in one comfortable technology and miss the appearance of the next big thing (like how LoRaWAN is becoming new cool kid these days). This guide is a good overview to help catch you up and help decide which dev kits are worth a further look. But of course we still want to hear from you below about your favorite wireless gems — past, present, and future — that didn’t make it into the list (we’re looking at you 433 MHz).

New Part Day: Put An Alexa In Everything

The last great hope for electronics manufactures is smart home assistants. The Alexas and Siris and OK Googles are taking over homes across the country. At its best, it’s HAL 9000, only slightly less homicidal. It will entertain your children, and you can order cat litter just by saying you want cat litter. This is the future, whether we like it or not.

In an attempt to capture the market, Amazon has released the Alexa Connect Kit. This is an Amazon-Echo-On-a-Chip — a piece of hardware that adds Alexa to microwaves, blenders, and whatever other bit of home electronics you can imagine.

The Alexa Connect Kit is the hardware behind Amazon’s efforts to allow developers easy integration with Alexa. The options for adding Alexa to a product up until now have been using Zigbee to connect an Echo Show or Echo Plus, or simply giving a device the ability to connect to an Echo through Bluetooth. The Alexa Connect Kit, however, is a pure hardware solution that puts Alexa in anything.

Unfortunately you can’t get one yet. Right now, the Alexa Connect Kit is just a preview, and if you want to get your hands on one — or get any specs on this bit of hardware — you’ll need to apply to the developer program. We’ve signed up and will share and juicy details that come our way as part of the program.

According to the Wall Street Journal (try Google referral link if you hit the pay wall), several companies are already working on integrating the Alexa Connect Kit into their existing product lines. Hamilton Beach and Procter & Gamble are both working on something, although the press doesn’t say what kind of device will now be loaded up with a voice assistant. Amazon, however, has a microwave using the technology that the owner can, “command the microwave to do things like defrost a half-pound of chicken, or set it up to automatically reorder a favorite type of popcorn on Amazon”.

Despite the sparse details, this is relatively game-changing when it comes to the world of homebrew electronics. We’ve seen dozens of projects using hacked Raspberry Pis and other microcontrollers to at Alexa to hacked coffee machines, to shoot Nerf darts, and to control a projector. If you can actually get one of these Alexas-on-a-chip, all those projects could be done with one simple piece of hardware.

Hacking The IKEA Trådfri Light Bulb

[BasilFX] wanted to shoehorn custom firmware onto his IKEA Trådfri light bulb. The product consists of a GU10-size light bulb with a LED driver as well as IKEA’s custom ZigBee module controlling it all. A diffuser, enclosure shell, and Edison-screw base give the whole thing the same form factor as a standard A-series bulb. The Trådfri module, which ties together IKEA’s home automation products, consists of an ARM Cortex M4 MCU with integrated 2.4Ghz radio and 256 Kb of flash — not bad for 7 euros!

Coincidentally, [BasilFX] had just contributed EFM32 support to RIOT-OS (“the friendly OS for IoT”) so he was already halfway there. He used a JTAG/SWD-compatible debugger to flash the chip on the light bulb while the chip was still attached.

[BasilFX] admits the whole project is a proof of concept with no real use yet, though he has turned his eye toward getting the radio to work, with a goal of creating a network of light bulbs. You can find more info on his code repository.

We ran a post on Trådfri hacking earlier this year, as well as one on the reverse-engineering process used to suss out the bulb’s secrets.

Continue reading “Hacking The IKEA Trådfri Light Bulb”

Michael Ossmann Pulls DSSS Out Of Nowhere

[Michael Ossmann] spoke on Friday to a packed house in the wireless hacking village at DEF CON 25. There’s still a day and a half of talks remaining but it will be hard for anything to unseat his Reverse Engineering Direct Sequence Spread Spectrum (DSSS) talk as my favorite of the con.

DSSS is a technique used to transmit reliable data where low signal strength and high noise are likely. It’s used in GPS communications where the signal received from a satellite is often far too small for you to detect visually on a waterfall display. Yet we know that data is being received and decoded by every cell phone on the planet. It is also used for WiFi management packets, ZigBee, and found in proprietary systems especially any dealing with satellite communications.

[Michael] really pulled a rabbit out of a hat with his demos which detected the DSSS signal parameters in what appeared to be nothing but noise. You can see below the signal with and without noise; the latter is completely indiscernible as a signal at all to the eye, but can be detected using his techniques.

Detecting DSSS with Simple Math

[Michael] mentioned simple math tricks, and he wasn’t kidding. It’s easy to assume that someone as experienced in RF as he would have a different definition of ‘simple’ than we would. But truly, he’s using multiplication and subtraction to do an awful lot.

DSSS transmits binary values as a set called a chip. The chip for digital 1 might be 11100010010 with the digital 0 being the inverse of that. You can see this in the slide at the top of this article. Normal DSSS decoding compares the signal to expected values, using a correlation algorithm that multiplies the two and gives a score. If the score is high enough, 11 in this example, then a bit has been detected.

To reverse engineer this it is necessary to center on the correct frequency and then detect the chip encoding. GNU radio is the tool of choice for processing a DSSS capture from a SPOT Connect module designed to push simple messages to a satellite communication network. The first math trick is to multiply the signal by itself and then look at spectrum analysis to see if there is a noticeable spike indicating the center of the frequency. This can then be adjusted with an offset and smaller spikes on either side will be observed.

When visualized in a constellation view you begin to observe a center and two opposite clusters. The next math trick is to square the signal (multiply it by itself) and it will join those opposite clusters onto one side. What this accomplishes is a strong periodic component (the cycle from the center to the cluster and back again) which reveals the chip rate.

Detecting symbols within the chip is another math trick. Subtract each successive value in the signal from the last and you will mostly end up with zero (high signal minus high signal is zero, etc). But every time the signal spikes you’re looking at a transition point and the visualization begins to look like logic traced out on an oscilloscope. This technique can deal with small amounts of noise but becomes more robust with a bit of filtering.

This sort of exploration of the signal is both fun and interesting. But if you want to actually get some work done you need a tool. [Michael] built his own in the form of a python script that cobbles up a .cfile and spits out the frequency offset, chip rate, chip sequence length, and decoded chip sequence.

Running his sample file through with increasing levels of noise added, the script was rock solid on detecting the parameters of the signal. Interestingly, it is even measuring the 3 parts per million difference between the transmitter and receiver clocks in the detected chip rate value. What isn’t rock solid is the actual bit information, which begins to degrade as the noise is increased. But just establishing the parameters of the protocol being used is the biggest part of the battle and this is a dependable solution for doing that quickly and automatically.

You can give the script a try. It is part of [Michael’s] Clock Recovery repo. This talk was recorded and you should add it to your reminder list for after the con when talks begin to be published. To hold you over until then, we suggest you take a look at his RF Design workshop from the 2015 Hackaday Superconference.

Home Automation: Evolution Of A Term

Home automation: for me the term recalls rich dudes in the ’80s who could turn off their garage lights with remote-control pads. The stereotype for that era was the more buttons your system had—even non-enabled ones—the more awesome it was, and by extension any luxury remote control had to be three times the size of any TV remote.

And it was a luxury–the hardware was expensive and most people couldn’t justify it. Kind of like the laser-disc player of home improvements. The technology was opaque to casual tinkering, it cost a lot to buy, and also was expensive to install.

The richie-rich stereotypes were reinforced with the technology seen in Bond movies and similar near-future flicks. Everything, even silly things, is motorized, with chrome and concrete everywhere. You, the hero, control everything in the house in the comfort of your acrylic half-dome chair. Kick the motorized blinds, dim the track lighting, and volume up the hi-fi!

This Moonraker-esque notion of home automation turned out to be something of a red herring, because home automation stopped being pretty forever ago; eventually it became available to everyone with a WiFi router in the form of Amazon Echo and Google Nest.

But the precise definition of the term home automation remains elusive. I mean, the essence of it. Let’s break it down.

Continue reading “Home Automation: Evolution Of A Term”

Ikea Tradfri Hacking

Smart lighting is all the rage right now. Sure, Phillips Hue is the giant player in the market, but there are plenty of ZigBee, Bluetooth, and WiFi light bulbs out there. Ikea–known for cheap furniture, meatballs, and waffles–is a recent addition to the field with their Tradfri system. Like most things from Ikea, they are effective and inexpensive. [Andreas] takes a Dremel to the controller and shows how to hack the system to use MQTT. You can check out the video below.

Once he had the device opened, the used the German Make magazine article we talked about earlier, to help understand what he had. Armed with the pinout, he was able to solder a wiring harness to the controller. He then connected a WeMos board. A little Arduino code later, and he was controlling the light with MQTT.

Continue reading “Ikea Tradfri Hacking”

Hackaday Prize Entry: WiFi In Wall Switches

The Internet of Things and Home Automation are the next big thing, even though we’ve had X10 switches and controllers for forty years. Why the sudden interest in home automation? Cheap microcontrollers with WiFi, ZigBee, and Z-wave, apparently. For this Hackaday Prize entry, [Knudt] is building a WiFi switch, meant to be retrofitted into any Euro wall switch.

There are three parts of [Knudt]’s WiFi wall switch, each of them with different requirements. The top layer is the switch itself and a small OLED display. These switches are really two small capacitive switches, which means there’s no reason to go through the work of sourcing a proper mechanical switch. Good thinking, there. The second layer of this contraption is basically an ESP8266, providing all the logic for this wall switch. The bottom layer is a bit more interesting, housing the 110-230V input, with a Triac or relay. This is where the fun, burny stuff happens.

Right now, you can go down to your local home supply store and simply buy a device like this. History has shown that’s a terrible idea. With home automation cloud services shutting down and security vulnerabilities abound, a DIY or Open Source home automation project really is the best idea. That makes [Knudt]’s project a great entry for the Hackaday Prize.