Hardware hackers are always looking for devices to tear apart and scavenge from. It’s hardly a secret that purchasing components individually is significantly more expensive than the minuscule cost per unit that goes along with mass manufacturing. Bluetooth devices are no exception. Sure, they’re not exactly a luxury purchase anymore, but they’re still not dirt cheap either.
Luckily for [Troy Denton], it seems dollar stores have started carrying a Bluetooth camera shutter for just a few dollars (it was three bucks, perhaps the dollar store actually means divisible-by). The device is designed to pair with a smart phone, and has two buttons allowing you to control the camera from afar. The fact that it works at all at that price is a small miracle, but the device also has potential for hacking that adds to its appeal.
Inside is a Bluetooth chips with integrated ARM controller. It connects to an EEPROM via I2C. Using an oscilloscope, an Arduino, and a Bus Pirate, [Troy] has so far succeeded in dumping and deciphering the EEPROM and was successful in renaming the device. He has high hopes that he’ll be able to discover something juicy from his preliminary explorations of the USART on the Bluetooth chip.
Ultimately he plans to document his quest to rewrite which keys the device’s buttons emulate. Once that’s accomplished, this dollar store find will have a lot of potential for cheap Bluetooth control. If you’re a reverse engineering veteran we’d love to hear some suggestions of low hanging fruit for him to explore. If you’re eager to learn more about about what you can do with Bluetooth, check out our awesome BLE primer.
If you are a regular Hackaday reader, you’ve probably seen plenty of ESP8266 projects. After all, the inexpensive device is a workhorse for putting a project on WiFi, and it works well. There is a processor onboard, but, most often, the onboard CPU runs a stock firmware that exposes an AT command set or Lua or even BASIC. That means most projects have a separate CPU and that CPU is often–surprise–an Arduino.
It isn’t a big leap of logic to imagine an Arduino with an integrated WiFi subsystem. That’s the idea behind the MKR1000. But the real question you have to ask is: is it better to use an integrated component or just put an Arduino and ESP8266 together?
[Andreas Spiess] not only asked the question, but he answered it in a YouTube video (see below). He examines several factors on the MKR1000, the Arduino Due and Uno, and several other common boards. The examination covers performance, features, and power consumption.
This simple WiFi serial port monitor would have saved us a lot of trouble. We can’t count how many times where being hooked into an Arduino with USB just to get the serial out has nearly been more trouble than it’s worth. Times where we sat cross-legged on the floor and could choose comfort or accidentally shifting the set-up and ruining everything, but not both.
As simple as this technique is, we can see ourselves making a neat little box with TX, RX, GND, and VCC screw terminals to free us from the nightmare of tethering on concrete floors just for a simple test. Video after the break.
In the dark ages, you had to use a key to lock and unlock your car doors. Just about every car now has a remote control on the key that lets you unlock or lock with the push of a button. But many modern cars don’t even need that. They sense the key on your person and usually use a button to do the lock or unlock function. That button does nothing if the key isn’t nearby.
[Pierre Charlier] wanted that easy locking and unlocking, so he refitted his car with a Keyduino to allow entry with an NFC ring. What results is a very cool fistbump which convinces your car to unlock the door.
Keyduinio is [Pierre’s] NFC-enabled project, but you can also use a more conventional Arduino with an NFC and relay shield. The demo also works with a smartphone if you’re not one for wearing an NFC ring. Going this round, he even shows how to make it work with Bluetooth Low Energy (BLE).
In the video below, you can see how he removed the car’s internal lock switch and modified the wire harness to take the connection to the Arduino. He’s also included all the code. About the only tricky part is doing the actual wiring in your car and finding a suitable source of power. That varies from car to car, so it isn’t easy to give specific instructions.
[Akiba] over at FreakLabs just put up a detailed tutorial outlining how to control and sequence lighting wirelessly using an Arduino and Vixen lighting sequencer software.
For those that don’t know [Akiba], he’s the guy behind Wrecking Crew Orchestra (TRON Dance) and their EL wire costumes. [Akiba] hacks on his projects at Hacker farm out in rural Japan.
In the tutorial, he sets up a simple 6 LED circuit on a Fredboard (an Arduino compatible board with integrated breadboard). [Akiba] then describes configuring the Vixen sequencer software to control the Arduino, providing simple example code to decode the Vixen serial protocol. Finally [Akiba] shows how to use the ChibiArduino protocol stack to build a wireless illumination system.
[Akiba] has used these tools in many stage performances including with the Wreaking Crew Orchestra (shown above) and the world number 1 flair bartending crew, UPT.
This tutorial is particularly awesome, as it includes both step-by-step videos and a text reference. The videos give a great overview of the process, while the text provides a handy reference to refer to as you hack on your own illumination projects.
Thanks for the writeup [Akiba]! With Christmas just round the corner we hope to see readers using these techniques in their own festive illuminations soon!
Historically when hams built low power (QRP) transmitters, they’d use a crystal to set the frequency. Years ago, it was common to find crystals in all sorts of radios, including scanners and handheld transceivers. Crystals are very stable and precise and it is relatively easy to make a high quality oscillator with a crystal and a few parts.
The big problem is you can’t change the frequency much without changing crystals. Making a high quality variable frequency oscillator (VFO) out of traditional components is quite a challenge. However, today you have many alternatives ranging from digital synthesis to all-in-one IC solutions that can generate stable signals in a wide range of frequencies.
[N2HTT] likes to build radio projects and he decided to take an Si5351 clock generator and turn it into a three frequency VFO for his projects. The Si5351 uses a crystal, so it is very stable. However, you can digitally convert that crystal frequency into multiple frequencies over a range of about 8kHz to 160MHz.
The chip has two PLLs that multiply the crystal frequency by a programmable amount. Then you can set each channel to start with the crystal frequency or either PLL and divide it by an integer or a fractional amount. As you might expect, the integer divisions result in a more stable output, but if you really need a particular frequency and can accept some jitter, you can get almost anything you want out of the device.
One thing of interest is the breadboard the VFO is built on. [N2HTT] used an Arduino and a small display along with an encoder to control the chip. But the chip generates some high frequencies and common wisdom is that solderless breadboards aren’t good for high frequency. Acting on a tip he read in a magazine article [N2HTT] took a bamboo cutting board and then affixed standard solderless breadboards to unetched copper PCB material. He then made sure the PCB ground planes were well connected and grounded. It seems to work (you can see it working in the video below).
The output of the chip is a square wave, so if you wanted to use it for radio applications, you’d probably have to low pass filter the output to get a sine wave. The device is only as accurate as the crystal and will exhibit some phase noise and jitter (especially if you don’t have integer divisions). However, having a wide range programmable frequency source for a few bucks is a great building block for lots of different projects.
The number of things that can carry Internet traffic is always increasing. Now, you can add LED light bulbs to this list, as engineers in Disney Research have just demonstrated a system that transmits Internet traffic using an LED light bulb. This method of communication isn’t new: Visible Light Communication (VLC) has been demonstrated before by Disney and others, but this project puts it into a standard LED light bulb. This bulb has been modified to include an Atheros AR9331 SoC running OpenWRT and an Atmel ATmega328p that controls the LED elements and sensors that send and receive the data. So, the device is acting as a gateway between a WiFi network and a VLC one.
Disney’s new test system (PDF link) isn’t especially fast: it can only carry about 380 to 400 bits per second, so it won’t be streaming video anytime soon. That is definitely fast enough, though to send control data to a toy, or to send a continual stream of updated data to a device in the room, such as an ebook reader with a continually updated encyclopaedia. This being Disney, the authors coin a new phrase to end their paper: The Internet of Toys.
In August of 2014, something new started showing up in the markets of Shenzen, the hi-tech area of China where the majority of the world’s electronics components are made. This is the ESP8266, a WiFi SoC (System on a Chip) that can connect to 802.11b/g/n networks on the 2.4GHz band. It can be addressed with SPI or a serial connection, and has an AT command set that makes it behave rather like an old-style modem. Basically, it has everything you would need to connect a device to a WiFi network, with the ESP8266 chip itself handling the complicated business of finding, joining and transmitting/receiving over a WiFi network.
That’s nothing particularly new in itself: WiFi connection devices like the TI CC3000 have been around for longer, and do much the same thing. The difference was the price. While the TI solution costs about $10 if you buy several thousand of them, the ESP8266 costs less than $7 for an individual board that can plug straight into an Arduino or similar. Buy the chip in bulk, and you can get it for less than $2.
The ESP8266 is more than just a WiFi dongle, though: it is a fully fledged computer in itself, with a megabyte of flash memory and a 32-bit processor that uses a RISC architecture. This can run applications, turning the ESP8266 into a standalone module that can collect and send data over the Internet. And it can do this while drawing a reasonably low amount of power: while receiving data, it typically uses just 60mA, and sending data over an 802.11n connection uses just 145mA. That means you can drive it from a small battery or other small power source, and it will keep running for a long time.
The ESP8266 almost achieves the holy trifecta of electronics: cheap, powerful and easy to work with. Before this, if you wanted to add a wireless connection to a project, you had to use more power-hungry devices like USB WiFi dongles, or squish everything into a serial connection and use a wireless serial link. Either way added to the complexity of the project: you either needed a system that supported USB and had WiFI OS support, or you had to put up with the limitations of wireless serial links, which typically offer very limited bandwidth. The advent of WiFi SoCs removed these limitations because the SoC did the heavy lifting, and WiFi offered much more bandwidth. And the ESP8266 did this all at a very low cost: do some digging on eBay and you can get an ESP8266 board for less than $2. So, it is no surprise that we are starting to see the ESP8266 showing up in commercial products.
How Can I Use the ESP8266?
With the popularity of the ESP8266 for adding WiFi to projects, it is no surprise that there are a lot of options for trying it out. On the hardware side, ESP8266 development boards are available from a number of places, including Seeedstudio, Sparkfun and Olimex. Adafruit also has a nice ESP8266 board that breaks out all of the signals for easy breadboard use, and adds a 3.3V output, so it can drive an external device. It is also FCC approved, which is important if you are looking to sell or use the devices you build commercially. Some users have also been building their own development boards, which add features such as LCD displays and buttons.
On the software side, the easiest way to get into the ESP8266 is to use the Arduino compatible mode. This involves loading custom firmware that turns the chip into a mid-range Arduino board, which makes for much easier programming. The people behind this project have produced a list of supported ESP8266 boards: buying one of these will make the installation process easier, as they have noted which data lines in the Arduino SDK correspond to the physical pins on the board. These boards also provide easy access to the reset lines that you have to use to install the Arduino compatible firmware.
The third option is to flash NodeMCU to the ESP8266 module. This turns it into a Lua interpreter. Scripting can be done in real-time to prototype your program, then flashed to the EEPROM to make your program persistent and remove the need for a serial connection.
Beginners will be comfortable with both the Arduino and NodeMCU approaches, but experienced users should be able to wade straight in and start writing code for this cheap, powerful and fairly easy to use chip.
These days, connecting your microcontroller project to a WiFi network is pretty easy — you connect up an ESP8266 to your microcontroller project and pretend it’s a WiFi modem, using these old-school-style AT commands. But what do you do if you need to flash new code into the microcontroller? You can’t reprogram the micro remotely through the ESP8266 because those stupid AT commands get in the way.
The solution? By flashing the esp-link firmware into your ESP8266, you talk directly to the microcontroller over WiFi as if it were connected by a serial cable: the ESP8266 becomes a totally transparent WiFi-serial bridge. Now, with a serial bootloader and an ESP8266 in Wifi-to-serial bridge mode, you can reflash your microcontroller wirelessly, and then telnet in to interact with and debug the system remotely. Once you’ve fixed the bugs, you can re-flash the microcontroller: all over WiFi, without having to climb up a ladder to reach your IoT attic-temperature sensor.
To flash a connected Arduino, for instance, all you need to do is convince AVRDUDE to use the network instead of a locally-connected USB-serial cable: avrdude -p m328p -c arduino -b 115200 -P net:192.168.1.123:23 -U:yourHexFile.hex. The ESP8266 passes the data straight through its TX and RX lines to your microcontroller and everything works as if it were wired.
Configuration to allow the ESP8266 to join your WiFi network takes place on a self-hosted webpage that uses [Sprite_tm]’s esp-httpd standalone server, which makes setup pretty painless. And then after that you can simply telnet to the ESP8266 at port 23 and type away, or do anything else you would with a wired serial connection.
Although the simple bridge mode came first, esp-link looks like it’s growing to be a one-stop shop for all your IoT or microcontroller + WiFi needs. In addition to the serial bridge code, there is also a REST-based microcontroller-to-internet mode and there is bi-directional MQTT support in the wings. We haven’t had a chance to dig into these yet, so if you have, let us know in the comments.
If you want to dig in deeper, head over to [Jeelabs]’ blog for a slightly outdated tour of the project written by the code’s author, [Thorsten von Eicken]. For the most up-to-date development news, follow the very active development of esp-link in this thread on the esp8266 forums.
[jmilldrum] really gets a lot of use out of his Si5351A breakout board. He’s a ham [NT7S], and the Si5351A can generate multiple square waves ranging from 8 kHz to 160 MHz, so it only stands to reason that it is going to be a useful tool for any RF hacker. His most recent exploit is to use the I2C-controllable chip to implement a Fast Simple QSO (FSQ) beacon with an Arduino.
FSQ is a relatively new digital mode that uses a form of low rate FSK to send text and images in a way that is robust under difficult RF propagation. There are 32 different tones used for symbols so common characters only require a single tone. No character takes more than two tones.
The Si5351A can easily handle the encoding job. Since the output is a square wave, you do need a low-pass filter to put it on the air. [jmilldrum] also used some relatively small amplifiers to get the output up to 20 watts.
Planet Arduino is, or at the moment is wishing to become, an aggregation of public weblogs from around the world written by people who develop, play, think on Arduino platform and his son. The opinions expressed in those weblogs and hence this aggregation are those of the original authors. Entries on this page are owned by their authors. We do not edit, endorse or vouch for the contents of individual posts. For more information about Arduino please visit www.arduino.cc
You are currently browsing the archives for the wireless hacks category.