Reverse Engineering A BLE Service To Control A Light Bulb

So, you buy an Internet of Things light bulb, it’s a fun toy that allows you to bathe your environment in pretty colours at the touch of an app, but eventually you want more. You start to wonder how you might do more with it, and begin to investigate its inner workings. Then to your horror you discover that far from having bought a device with a convenient API for you to use, it has an impenetrable closed protocol that defies easy access.

This was the problem facing [Ayan Pahwa] when he bought a Syska Smartlight Rainbow LED bulb, and discovered that its Bluetooth Low Energy  interface used a closed protocol. But instead of giving up, he proceeded to reverse engineer the communication between bulb and app, and his write-up makes for an interesting read that provides a basic primer on some of BLE’s workings for the uninitiated.

BLE allows a device manufacturer to define their own device service specific to their functionality alongside standard ones for common device types. Using a handy Android app from Nordic Semiconductor he was able to identify the services defined for the light bulb, but sadly they lacked any human-readable information to help him as to their purpose. He thus had to sniff BLE packets directly, and lacking dedicated hardware for this task he relied on a developer feature built into Android versions since KitKat, allowing packets to be captured and logged. By analysing the resulting packet files he was able to identify the Texas Instruments chip inside the bulb, and to deduce the sequences required to control its colours. Then he was able to use the Bluez utilities to talk directly to it, and as if by magic, his colours appeared! Take a look at the video we’ve placed below the break.

Many of us may never need to reverse engineer a BLE device. But if we are BLE novices, after reading [Ayan]’s piece we will at least have some idea of its inner workings. And that can only be a positive thing.

Continue reading “Reverse Engineering A BLE Service To Control A Light Bulb”

Another Arduino Compatible? This Time, It’s A Sony

When it comes to microcontroller development boards, we have a plethora of choices at our disposal. Each has its strengths and weaknesses, be they associated with its support and community, its interface capabilities, or its choice of processor family. Most boards you’ll find in our communities come from niche manufacturers, or at least from manufacturers who started as such. Just occasionally though along comes one whose manufacturer you will have heard of, even whose manufacturer the Man in the Street will have heard of.

Which brings us neatly to today’s story, the quiet announcement from Sony, of a new microcontroller development board called the Spritzer. This is Arduino compatible in both physical footprint and IDE, is intended for IoT applications, and packs GPS, an audio codec, and an ARM Cortex M4 at 156 MHz. There is a Japanese page with a little more detail (Google Translate link), on which they talk about applications including audio beam forming with up to eight microphones, and a camera interface. 

The board is due to be available sometime early next year, and while it looks as though it will be an interesting device we’d sound a note of caution to Sony. It is not good enough to have an amazing piece of hardware; the software and community support must be more than just make-believe. If they can crack that then they might just have a winner on their hands, if they fail to make any effort then they will inevitably follow Intel into the graveyard of also-ran boards.

Thanks [Chris] for the tip.

Do You Have An Endangered Craft?

It is probably fair to say that as Hackaday readers, you will all be people with the ability to make things. Some of you can make incredible things, as your writers we are in constant awe of the projects that pass through our hands. But even if you feel that your skills in the maker department aren’t particularly elite, you’ll have a propensity for work in this direction or you wouldn’t be here.

Most of the craft we feature involves technologies that are still very modern indeed to the majority of the population. We for example know that the first 3D printers were built decades ago and that we take them for granted on our benches, but to the Man In The Street they are still right up there with flying cars and time-travelling police telephone boxes.

We use 3D printers and microcontrollers because they are the tools of our age, but how different might our crafts have been if we’d been born a few centuries ago? Apprenticed to a master craftsman as teenagers, we (well, at least you boys!) would have learned  a single craft to a high level of expertise, making by hand the day-to-day products of life in those times.

The Industrial Revolution brought mechanisation and mass production, and today very few of the products you use will be hand-made. There may still be a few craftsmen with the skills to produce them by hand, but in the face of the mass-produced alternative there is little business for them and they are in inevitable decline. In an effort to do something about this and save what skills remain, the Heritage Crafts Association in the UK has published a list of dying crafts, that you can view either alphabetically, or by category of risk.

It’s a list with a British flavour as you might expect from the organisation behind it, after all for example hand stitched cricket balls are not in high demand in the Americas. But it serves also as a catalogue of some fascinating crafts, as well as plenty that will undoubtedly be of interest to Hackaday readers. Making hand-made planes, saws, or spades, for example, or at least where this is being written, coracle making.

As your Hackaday scribe this is close to home, a blacksmith carrying on her father’s business can’t earn enough to live in Southern England while an electronic engineer and technical journalist can. Eventually there will be one less blacksmith plying the craft, and though his tools and some of his skills will live on here, the business will not. Take a look at the list of crafts, do any of you have them? Or do you know of any craftspeople who have any of the skills listed, that the HCA might not know about? Let us know in the comments.

Treadle lathe image: Patrick-Emil Zörner (Paddy) [CC BY-SA 2.0].

The Trouble With Cordless Power Tools

If you grow up around a small engineering business you are likely to gain something of an appreciation for power tools. You’ll see them of all ages, sizes, manufacturers, and technologies. When thinking of the power tools constantly on hand in the workshop of a blacksmith like my dad for instance, I’m instantly seeing a drill and an angle grinder. The drill that most comes to mind is a Makita mains powered hand drill, and given that I remember the day he bought it to replace his clapped-out Wolf in 1976, it has given phenomenal service over four decades and continues to do so.

41 years of hard use, and still going strong.
41 years of hard use, and still going strong…

Of course, the Makita isn’t the only drill in his possession. A variety of others of different sizes and speeds have come and gone over the years, and there is always one at hand for any given task. The other one I’d like to single out is I think the most recent acquisition, a Bosch cordless model he bought several years ago. It’s similar in size and capabilities to the Makita save for its bulky battery pack, and it is a comparably decent quality tool.

So, we have two drills, both of similar size, and both of decent quality. One is from the mid 1970s, the other from the end of the last decade. One is a very useful tool able to drill holes all day, the other is little more than a paperweight. The vintage model from the days of flared trousers is a paperweight, you ask? No, the not-very-old Bosch, because its battery pack has lost its capacity. The inevitable degradation due to aged cell chemistry has left it unable to hold enough charge for more than maybe a minute’s use, and what was once a tool you’d be glad to own is now an ornament.

Continue reading “The Trouble With Cordless Power Tools”

One Person’s Experience Of Having PCB Assembly Done In China

Those of us who have our PCBs manufactured by Chinese PCB fab houses will be used to seeing tempting offers to also assemble our completed boards. Send the Gerbers as normal, but also send a BoM, and for an extra slice of cash you can receive fully assembled PCBs instead of just bare boards. It sounds alluring, but leaves a few questions for those without the experience. How much will it cost, what will the quality be like, and will my boards work? [Alexander Lang] had a limited run of ten small pressure sensor boards to make, and since his board house had started an assembly service,  decided to take the plunge and opt for full assembly.

His first step was to assemble his BoM and send it with the Gerbers. He is at pains to stress that the BoM is key to the whole project, and getting it right with the correct packages and more than one source for each component is critical. The board house first charged him £32.05 ($41.76) to make his PCBs and stencil, and assess his BoM for a build quote. A few days passed, and then he had a quote for assembly, £61.41 ($80). He placed the order, the board house processed it and made the boards, and in due course his working PCB modules arrived.

This might sound at this point like an unexciting saga, but its very smoothness is the key to what makes it interesting. Those of us who have wondered about the risks involved in taking up such a service need to hear stories like this one as surely as we do stories of failure, because without them we’re flying blind. Whether £93.46 ($121.76) for ten small boards represents good enough value is another matter, but if surface-mount soldering is not your thing you might be interested to follow [Alexander]’s example. After all, it wasn’t so long ago that getting a cheap PCB made in China was a similar leap of faith.

A New Battery For A Potted Clock Module

If you did much dismantling of PCs back in the 1980s and 1990s, you might be familiar with the Dallas Semiconductor range of potted real-time clock modules. These were chunky dual-in-line devices containing clock and non-volatile RAM chips, a crystal, and a lithium battery. The battery was good for about a decade, which was fine for most PCs of the day because the majority of desktop computers are replaced long before that deadline.

[Glitch], however has an industrial single-board computer with a 486 processor that has had a life much more prolonged than its desktop siblings due to its application. The battery in the onboard Dallas DS1387 has long ago expired, and since these devices are so long out of production to be unavailable, he’s had to improvise.

Improving on some previous documented projects he found through an internet search, he carefully ground away the potting compound to reveal a couple of the battery conductors, cut them with a PCB drill, and mounted a lithium cell holder on the top of the device with some tidily soldered Kynar wires to bring in the power. A CR1225 cell was used rather than the ubiquitous CR2032, as space was at a premium in the width of the ISA card form factor.

The potted RTC module is something of a rare device these days, but if you have a retro computer containing one this seems to be a very useful piece of work to bring it back to life. We’ve covered another similar one with a slightly larger battery in the past.

Hackaday Prize Entry: A Six Axis Robotic Arm With Fingertip Control

If you were a child of the 1980s whose fascination extended to the contents of your local Radio Shack store, you may remember the Armatron robot arm as a particular object of desire. It was a table top robot arm operated not by motors or a microcontroller, but by a clever set of gears directed manually from a pair of joysticks. If you took a look at it with an eye to control from your 8-bit home computer you were likely to be disappointed, but nevertheless it was an excellent toy.

The Armatron may be long gone, but if you hanker for a similar device you should take a look at [3D Meister]’s finger controlled six axis arm. This is an arm similar to the Armatron in size, but with far more capabilities. Control is via cable loops to sliders at the arm’s base, and in addition to the usual arm movements there is an extra loop which can be used to operate any of a selection of tools including a gripper, a magnet, and a clipper. The video below the break shows the arm in action, and for the faint-hearted it should be noted that it contains the gratuitous death of some innocent plants.

Continue reading “Hackaday Prize Entry: A Six Axis Robotic Arm With Fingertip Control”