Converting Bluetooth Sensors To Zigbee

With the increase in popularity of Internet of Things (IoT) devices and their need to communicate wirelessly,  there’s been a corresponding explosion of wireless protocols to chose from. Of course there’s Wi-Fi and Bluetooth, but for more specialized applications there are some other options like Z-Wave, LoRa, Sigfox, and Thread. There’s a decent amount of overlap in their capabilities too, so when [SHS] was investigating some low-cost Xiaomi sensors it was discovered that it is possible to convert them from their general purpose Bluetooth protocol over to the more IoT-specialized Zigbee protocol instead.

These combination temperature and humidity sensors have already been explored by [Aaron Christophel] who found that it’s possible to flash these devices with custom firmware. With that background, converting them from Bluetooth to Zigbee is not a huge leap. All that’s needed is the Zigbee firmware from [Ivan Belokobylskiy] aka [devbis] and to follow the steps put together by [SHS] which include a process for flashing the firmware using an over-the-air update and another using UART if the wireless updates go awry. Then it’s just a short process to pair the new Zigbee device to the network and the sensor is back up and running.

Converting from one wireless protocol to another might not seem that necessary, but using Bluetooth as an IoT network often requires proxy nodes as support devices, whereas Zigbee can communicate directly from the sensor to a hub like Home Assistant. Other Zigbee devices themselves can also act as a mesh network of sorts without needing proxy nodes. The only downside of this upgrade is that once the Bluetooth firmware has been replaced, the devices no longer has any Bluetooth functionality.

Thanks to [RoganDawes] for the tip!

New Part Day: An ESP With ZigBee

It seems that the folks at Espressif are doing their best to produce chips to fit every possible niche in the microcontroller-with-radio market, because here comes news of their latest chip bearing the ESP32 name: a single-core 96MHz RISC-V part with built-in IEEE 802.15.4 to support ZigBee 3.x and Thread 1.x. The ESP32-H2 is not the most powerful of the Espressif line-up, but it will find its place in home automation products and projects.

The ESP32-H2 joins a multitude of other IEEE 802.15.4 devices from manufacturers such as Microchip, ST, NXP, and Nordic in an increasingly crowded marketplace, so what can if offer that the others can’t? If previous ESP chips are anything to go by we’d expect it to compete on price as well as the obvious attraction for developers used to working with other Espressif products. We look forward as always to seeing what you do with it.

DIY ZigBee Therapy Lights Are Hue Compatible

Working on a project into the wee hours is hardly uncommon for us hackers, but if you’re consistently sleeping until the afternoon, it’s possible you’re suffering from a condition known as Delayed Phase Sleep Disorder (DPSD). Put simply, your body’s internal clock is out of alignment with the world around you. One of the ways to treat this condition is to expose yourself to bright light in the morning, which can help you wake up and feel more refreshed. Unfortunately, these so-called “Bright Light Therapy” boxes tend to be pretty expensive.

Looking for a way to treat his own DPSD, [Edward Shin] decided to build his own light box based on the research he’d done on the various commercial offerings out there. After all, a box full of bright lights that operates on a timer doesn’t seem particularly complex. Of course, in reality there’s a bit more to it than that, but so far the results are certainly promising.

The first decision [Edward] had to make was what kind of light he wanted. Classic light therapy devices, often used to treat Seasonal Affective Disorder (SAD), tend to be full spectrum lights that try and simulate sunlight. But in his research, he found a paper from Nature that explained the melanopsin in the human eye responds primarily to blue and green light. But as intense blue light can apparently lead to macular degeneration, he decided to go with green.

Since [Edward] already uses the Philips Hue system for his home’s lighting, he wanted to bring his therapy light into that ecosystem. The idea was that he could easily schedule his new green light box to go on when he wanted to wake up in the morning. So he used the Mesh Bee from Seeed Studio which not only supports ZigBee, but for which software is available to emulate a Hue bulb. Then he just needed to pair that with a sufficiently beefy LED driver and some 510 nm emitters. Everything is enclosed in a box made of laser cut wood that’s designed to hang from the headboard and shine down onto his face.

Over the years we’ve seen a number of similar projects trying to address SAD, so the idea of a hacker tweaking the concept to tackle DPSD seems a natural enough evolution of the idea. Just remember to speak with a medical professional before coming up with a homebrew treatment plan.

Drone Gives Up Its Wireless Secrets To Zigbee Sniffer

There’s something thrilling about decoding an unknown communications protocol. You start with a few clues, poke at the problem with some simple tools, and eventually work your way up to that first breakthrough that lets you crack the code. It can be frustrating, but when you eventually win, it can be very rewarding.

It seems that [Jason] learned this while decoding the wireless conversation between his mass-market quad and its controller. The quad in question, a Yuneec Q500, is one of those mid-range, ready-to-fly drones that’s targeted at those looking to get in the air easily and take some cool pictures. Unsure how the drone and controller were talking, [Jason] popped the covers and found a Zigbee chipset within. With the help of a $14 Zigbee USB dongle and some packet sniffing software from TI, [Jason] was able to see packets flowing, but decoding them was laborious. Luckily, the sniffer app can be set up to stream packets to another device, so [Jason] wrote a program to receive and display packets. He used that to completely characterize each controller input and the data coming back from the drone. It’s a long and strange toolchain, but the upshot is that he’s now able to create KML in real time and track the drone on Google Earth as it flies. The video below shows the build and a few backyard test flights.

Congratulations to [Jason] for breaking the protocol and opening up drones like this for other hackers. If you’re interested in learning more about Zigbee sniffing, you can actually hack a few smarthome gadgets into useful sniffers.

Continue reading “Drone Gives Up Its Wireless Secrets To Zigbee Sniffer”

Zigbee-Based Wireless Arduinos, Demystified

Hackday regular [Akiba] is working on a series of video tutorials guiding newbies into the world of the 802.15.4 wireless protocol stack — also known as ZigBee. So far, his tutorials include a “getting started with chibiArduino”, his own Arduino-based wireless library, as well as a more basic tutorial on how radio works.

[Akiba] already made a name for himself though a large number of wireless projects, including his Saboten sensor boards, which are ruggedized for long-term environmental monitoring. The Saboten boards use the same wireless stack as his Arduino-compatible wireless development boards, his Freakduino products. The latest version features an ATmega 1284P with 8x the RAM and 4x the flash of the older, 328P-based Freakduinos. It comes in both 900 MHz and 2.4 GHz and there’s also a special 900 Mhz “Long Range” variant. The boards include some great power-saving features, including switchable status LEDs and on-board battery regulation circuity allowing one to run a full year on two AA cells while in sleep mode. They also have a USB stick configuration that is great for Raspberry Pi projects and for running straight from the PC.

For more [Akiba] goodness, check out our colleague [Sophi]’s SuperCon interview with him as well as our coverage of his Puerto Rico lantern project.

Cheap Smarthome Gadget(s) Hacked Into Zigbee Sniffer

French hacker [akila] is building up a home automation system. In particular, he’s been working with the “SmartHome” series of gadgets made by Chinese smartphone giant, Xiaomi. First, he started off by reverse-engineering their very nicely made temperature and humidity sensor. (Original in French, hit the translate button in the lower right.) With that under his belt, he opened up the PIR motion sensor unit to discover that it has the same debugging pinouts and the same processor. Almost too easy.

For a challenge, [akila] decided it was time to implement something useful in one of these gadgets: a ZigBee sniffer so that he can tell what’s going on in the rest of his home network. He built a USB/serial programming cable to work with the NXP JN5169’s bootloader, downloaded the SDK, and rolled up his sleeves to get to work.

While trolling through the SDK, he found some interesting firmware called “JennicSniffer”. Well, that was easy. There’s a demo version of a protocol analyzer that he used. It would be cool to get this working with Wireshark, but that’s a project for another day. [Akila] got far enough with the demo analyzer to discover that the packets sent by the various devices in the home network are encrypted. That’s good news for the security-conscious out there and stands as the next open item on [akila]’s to-do list.

We don’t see as many ZigBee hacks as we’d expect, but they’ve definitely got a solid niche in home automation because of commercial offerings like Philips Hue and Wink. And of course, there’s the XBee line of wireless communications modules. We just wrote up a ZigBee hack that aims to work with the Hue system, though, so maybe times are changing?

Wardriving For Zigbee

Wardriving started out as a search for unprotected WiFi access points before hot spots were prevalent. And so this ZigBee protocol wardriving hardware which [Travis Goodspeed] put together really gives us a sense of nostalgia for that time. Don’t get us wrong, we love our pervasive WiFi access and don’t wish to go back to simpler times. But if the radio signals your looking for are scarce, locating them provides a challenge.

Regular readers will recognize that [Travis] is interested in all things RF. One of his projects included sniffing wireless keyboard packets out of thin air and displaying them on the screen of his Nokia N900. This is right along those lines but he’s upgraded to an N9 phone for the display hardware. He switched up the RF hardware, using a TelosB (a board he’s already familiar with) to get on the 802.15.4 ZigBee spectrum. This dev board has an expansion port which let him use an RN42 module for wireless communications with the phone. This means the sniffing hardware can be hidden away in a backpack or jacket. After all, nobody will question someone walking around staring at a smart phone.