As I've been testing and playing around with smart devices at home, figuring out how they work and reverse engineering them to further integrate them into my smart home, I've been primarily using my old Google Pixel 8 Pro to capture Bluetooth data and scan devices. However, I recently came across the nRF52840, a Bluetooth-focused SoC supporting Bluetooth Low Energy, Zigbee, Thread, and more. Curious, I went ahead and bought the $25 Makerdiary nRF52840 MDK dongle, and it's one of the most versatile pieces of tech I own.

To be clear, I purchased this with my own money. It wasn't provided for a review or for testing, and it's something I went ahead and bought purely out of curiosity. It can sniff Bluetooth, Zigbee, and Thread traffic, and it can be used for more than that, too. Because it has a 64 MHz Arm Cortex-M4 core with 256KB RAM, along with exposed pin headers for connecting your own hardware, it's a surprisingly powerful device that has more in common with an ESP32 than a regular USB dongle.

This particular device, while incredibly versatile, is also made for a very specific kind of person. It's for tinkering and playing around with, for learning, and for testing and developing. You could use it as a Zigbee coordinator, for example, but you'd be better off with any of the other purpose-built coordinators out there that are cheaper and often have a built-in antenna for improved range. The same goes for building a Thread border router with OpenThread. Keep in mind that for actual development work, you're better off with the developer kit instead.

If you're curious what you can do with it, though, then read on!

Setting up the nRF52840 MDK

Flashing firmware is surprisingly simple

Out of the box, the Makerdiary dongle ships with a UF2 bootloader, so flashing new firmware is just drag and drop: hold the button while plugging it in to enter DFU, it mounts as a UF2BOOT drive, then copy a .uf2 file across. You can also flash .hex files with DAPLink if needed.

Below is a list of just some of the things this particular USB dongle can be:

  • nRF Sniffer for Bluetooth LE
  • nRF Sniffer for 802.15.4 (Zigbee/Thread)
  • nRF Connect firmware
  • NFC (requires an antenna and modifying the sample to change functionality)
  • Zigbee coordinator

I have seen reports of people frying their dongles quite quickly, though the reports that I've seen were all from a number of years ago, when there have been multiple revisions of this particular dongle. I have kept mine connected to my computer for a few weeks now, using it for up to an hour at a time every couple of days and changing the installed firmware, and it hasn't had any problems whatsoever.

Bluetooth LE sniffing and poking

What I really bought it for

First and foremost: the reason I bought this particular device. I wanted to start doing some Bluetooth LE sniffing and poking around devices. I had been using the nRF Connect app on my phone, which works decently well, but I wanted something that I could use on my PC and integrate into my development flows. Thankfully, there are two separate ways to use this: with Wireshark or with the nRF Connect app on Windows.

Technically, both of these do different things. When paired with Wireshark, you can use the BLE sniffing firmware to forward those packets to Wireshark, and you'll need to install the external capture plugin so that it can connect to your dongle and start tracking traffic.

This is a passive sniffer, meaning that it doesn't interact with devices that are transmitting data; instead, it simply listens in and reports back whatever it can see. It captures advertising packets and connection packets. I've already been able to make use of it for tracking data advertised by smart home devices, and figuring out what data is broadcast to the world without any requirement to connect.

For interacting and poking around devices, the nRF Connect application allows me to connect to specific devices and track what they advertise, where it's stored, and what the values look like. It scans nearby devices, collects information about them, and reports back on what can actually be seen.

With this, I can use the data found here to write my own code to interact with these devices and pull the data that I need to retrieve. This is a great, interactive way to find out where the data I want is located, and it can also show me more information about the devices that are near me.

You can change what information the dongle advertises, so it can masquerade as any device that you'd like, or it can advertise information to see what connects to it. It's a great development and testing tool, and can also be fantastic for debugging when trying to figure out Bluetooth connectivity.

OpenSK and FIDO2 support

A surprising benefit

Google's OpenSK project is an open-source security key implementation that supports the FIDO2 standard. It uses software-based cryptography written in Rust, and can be used to develop your own YubiKey, essentially. This particular dongle is one of the few officially supported ones, and you can use either a pre-compiled image or build your own.

I initially faced problems, so I spun up a Ubuntu VM quickly just to see if I could build it and get it up and running (hence why the compiling user is root, don't worry), and while it compiled successfully and flashed, it still didn't fully work. I think I know why, but I'm currently in the territory of not being fully sure that the fix won't require additional hardware to reflash it if I mess something up.

Part of the security key doctrine is the requirement that a human is the one who logs in. Therefore, to use the key, you need to press a button on it to confirm that a person is physically at the computer, logging in. When pressing that button, though, it restarts the dongle, so the security key process starts again. Both my PC and Chrome can recognize the security key, but it reacts as if I unplugged it and replugged it after removing it.

I believe that the cause either relates to the bootloader or the firmware file, as I have seen users mentioning that you should erase the storage first before flashing this particular firmware file. Right now, pressing the button resets the dongle, but there are other tools for the dongle from Makerdiary that require a double tap to reset the dongle, where the first button tap is reserved for actual functionality.

I suspect that I either need to modify the firmware file in the compilation process to include the erase storage option or that I need to modify OpenSK in some way. Either way, I don't really want to break the dongle, but just know that it's officially supported by Google for OpenSK, and I can see that other users have had success with it on GitHub.

It's a fun piece of tech

And can teach you a lot about networking, too

I love little devices like these, the ones where you buy it for one thing before suddenly becoming overwhelmed by the possibilities. As I mentioned, you're better off buying a development kit if you want to go all-in on this kind of thing... and that's what I'm considering buying next. I was quite surprised by its capabilities, and as someone who spends a lot of time with the ESP32, it felt like familiar enough territory while being different enough to still be exciting.

I really want to get the FIDO2 security key working, just because it sounds like fun to use. I also want to play around with Zigbee packet sniffing, as you can add your encryption key to Wireshark so that it can decrypt all of the Zigbee traffic that it picks up. It's interesting and unique, and that's why I love it.

As for Bluetooth sniffing, that's primarily what I bought it for, and it's incredibly useful for that. When placed between two communicating devices, you can eavesdrop on a lot of their advertisements and connection handshakes, and there's a lot of information you can glean through that. For example, I can collect the power state of my Govee Table Lamp with this particular sniffer, and I can capture attributes of other devices that passively emit their details to the world.

If you're someone who likes to tinker with devices, it doesn't have to be this particular dongle, but an nRF52840 development kit could be an interesting addition to your toolkit. I know it was for mine.