A serial terminal based on the newly released WebBluetooth API, connect your Arduino to pretty much anything that runs Chrome! Click here to check it out. See this link for full implementation details.
I would really appreciate everyones feedback and testing data to see where it works / with what hardware / how reliably so we can try make it a bit more consistent.
Setup / Wiring Guide:
To use the WebBluetooth Terminal you will need an Arduino (or pretty much any other microcontroller) and a HM Bluetooth Low-Energy module, if you want to setup your own BLE module the Service UUID is 0000ffe0-0000-1000-8000-00805f9b34fb
and the Characteristic UUID is 0000ffe1-0000-1000-8000-00805f9b34fb
. Alternatively, you can fork the project and change them in the JavaScript. It's near the top (I'll make a menu to change them later).
Follow this Fritzing diagram to hookup your Arduino to one of the Bluetooth modules - pretty straightforward. Make sure to check that you're using 3.3v logic or that your BLE module is 5v logic tolerant. Admittedly, I've never bothered to use a level shifter, but it's not my fault if you let out the magic smoke by neglecting to do so.
Power it on, open the terminal and press the green connect button. A pop-up will appear if you've correctly enabled WebBluetooth on a supported browser (Chrome now supports it natively, except on Windows where you have to navigate to this chrome://flags
and enable experimental features). Follow this link to get a list of the full implementation and how to enable it properly.
Click pair, and you should be auto-magically connected and have a virtual serial link between your browser and your Arduino. Load one of my example sketches and connect an LED if you want to wow your friends by letting them connect to it on THEIR phone.
Details:
Service UUID: 0000ffe0-0000-1000-8000-00805f9b34fb
Characteristic UUID: 0000ffe1-0000-1000-8000-00805f9b34fb
All the data is sent down the value of the one characteristic, 20 bytes at a time. Technically this could run into issues reading/writing to the buffer at the same time, however it probably shifts into the CC2540's memory quick enough that it's unlikely to ever be an issue. Nordic Semiconductors has a similar method that utilises two characteristics, one for RX and one for TX, but using one of their microcontrollers is waaaay overkill for a simple Bluetooth -> Serial bridge. If you want to fork it go ahead, but note that you have to host it on either a HTTPS server or locally. This is one of the security methods that the W3 guys implemented to make sure bad guys don't mess with your Bluetooth stuff.
Platform | Implemented | Tested | Note |
Chrome (OSX) | ✓ | ✓ | |
Chrome (Android) | ✓ | ✓ | |
Chrome (Windows) | ✓ | ✓ | Requires experimental flag |
'WebBLE' (iOS) | ✓ | × |