A simple web-configured BLE to GPIO bridge


[Daniel Dakhno] kept getting into a situation where the ability to read the state of, or control a few digital I/O pins with minimal effort, would be terribly helpful. Not wanting to continue compiling code, for such simple needs, they instead used an nRF51-based module as the physical interface and produced general-purpose firmware that could be configured with a simple web interface. The NRF51-IO module was born, whose job it is to pair with any device you have in front of you, as long as it supports BLE, and gives direct access to those IO pins.

Rather than acting as a rather slow logic analyzer, the firmware is intended for mostly static setups. The web application sends a configuration packet to the nRF51 board, which then programs it in FLASH and restarts, reading the updated configuration and applying it to the IO pins. These outputs then persist as long as there is current. The reading side of the equation can also be done through the webpage, but we haven’t had a chance to check it out. The code implements the Bluetooth Automation IO Service as well as the Binary Sensor Service, so if you have access to apps that talk about these services you should be able to launch and go with it, although we personally don’t have tested this due to the lack of an nRF51 card. We noticed that the Home Assistant automation platform supports BT binary sensor, which could be a great help for some people who need wireless control and detection.

If you need a practical example of using it for remote sensing, here’s a physical mailbox status monitor, using the nRF51. While we’re thinking about Bluetooth and sensors, here’s some custom firmware for some super cheap environmental sensors that frees them from vendor lock-in.

Header image: Ubahnverleih, CC0.


Comments are closed.