Allow a Computer to mimic a Bluetooth Keyboard (& Mouse). Using some hardware (a couple of different options currently) and a piece of software running on the 'Server' machine - any devices which support Bluetooth LE HID can then receive the keystrokes.
- RelayKeys
Well a range of purposes. For some - its just a convenient way of saving some money on a KVM switch - or replacing now hard to find commercial solutions.
For the AceCentre we want people with disabilities who are forced to use one system (e.g. a dedicated Eyegaze system) to be able to access other computers and systems they may need to use for work or leisure. This has only been available on a couple of commercial AAC systems - and often need to be on the same network which is sadly often impossible in schools or government workplaces - Or they do work over bluetooth but for only one system in the field exists like this (see here for more details on these).
There are two different boards to purchase currently (NB: A range have been looked into - but its not as straightforward as you would think). Your options:
- Adafruit Feather nRF52840 Express (Buy in the UK from Pimoroni). Carry on reading to know how set this up (to-do)
- The Adafruit - Bluefruit LE Friend - nRF51822 - v3.0 (Buy in the UK from Pimoroni). Carry on reading here to see how to set this up.
If you are developing the 'server' side of things and want to try out the code you can run this without any hardware by having a null serial terminal. To do this, in a terminal run:
python resources/demoSerial.py
then in another terminal run
python relayeKeys.py no-serial
NB: Only tested on MacOS but should work on any posix system
- Check the setup of your Arduino IDE (remember we're using the nRF52840 board!)
- Upload the sketch to your feather.
- Run the server side code
- Done!
-
Update it to 0.8.0. Easiest way to do this is to connect to using the Bluefruit app - it will auto update it if required.
-
Plug it in
-
Set the switch on the device to CMD mode
-
Open up a serial terminal and connect to the device (See here for exact settings for your Operating System)
-
Turn on HID Mode. More info here. To be precise - enter this into your serial terminal
AT+BLEHIDEN=1 ATZ
(You should see 'OK' after each entry)
-
Next change the default speed. i.e. enter this in your serial terminal:
AT+BAUDRATE=115200
-
Next put the device into DATA mode (slide the switch).
This is easy. On your other device connect to the unit as you would any bluetooth keyboard. E.g. Settings->Add Bluetooth Device->Search for device and add the device.
You currently have two options for this - 1. Run the precompiled binaries or 2. Use the python code on its own
There is a number of exe's available
You can try running the installer package (see releases). Note that on Windows - finding your dongle isn't reliable yet. You will more than likely need to find which COM port the device is on (look in device manager) - and add it to the relaykeys.cfg under the server. e.g.
dev = COM6
Once installed - you can test it by opening the C:\Program Files(x86)\AceCentre\RelayKeys\relaykeys-qt.exe and type in the box. For working with the Grid etc you will want to call the relaykeys-cli-win.exe in this directory.
You need nsis installed for this next part.
pip install -r requirements.txt
python build.py
You will then get a setup.exe
Although there are two bits of hardware identified you can do this with other Bluetooth boards. The essential element is being able to transmit at a high enough speed, reliably, over the serial port of the computer (what we are defining as the 'server' in this context).
- The original RelayKeys from Harold Pimental.
- bbx10 on the adafruit forums. bbx10 developed the Ascii to HID translation function. A massive thanks - the code is currently mostly his. He also worked out some of the early problems on speed issues we were having. You can read the full thread here.
- HID-Relay from juancgarcia. Not really spent much time looking at this - but looks neat. Converts hardware keyboards to Bluetooth.
- 232Key - Converts Serial devices to Keyboard. Kind of the other way round to what we want.
- BL_keyboard_RPI. Turns a Pi into keyboard emulator
- ESP32_mouse_keyboard. Uses a ESP32 as a mouse/keyboard over serial. Very similar idea. (See issue 39 for details about this in relation to using VNC (TY @RoganDawes))
- MacroServerMac was an attempt to create a Mac Port of "MacroServer" developed by JabblaSoft for MindExpress . This is a protocol for communication over a TCP/IP stack. Its pretty nice - but if you are in a school or business allowing others machines to access the network in this way is often restricted. It can also be pretty flaky
- Liberator / PRC - have the neatest commercial solution out there for AAC. You can either plug in a USB cable - or use a bluetooth dongle to connect with another computer. Its awesome - but sadly only available to you if use one of their devices.
- Dynavox used to make the AccessIT. A similar idea but using infrared rather than radio/bluetooth. It was pretty expensive but a lot of people loved its simplicity.
- The AAC world has been trying to create standards for this for years.. and some have succeeded. Check out AACKeys and the "GIDEI" protocol - which now feels a little outdated but a great attempt at standardising communication between AAC devices and other systems over serial.
- the Buffalo BSHSBT04BK was pretty neat. You can still get this in Japan and does a very similar job
- The IOGEAR KeyShair (now discontinued) looked like exactly the same dongle - but with different software.
Both of these products though failed to respond to software (on-screen) keyboards reliably.
This project is licensed under the MIT License - see the LICENSE.md file for details