While the Raspberry Pi 500+ is a fully functional Linux keyboard PC, it’s also possible to use it as a regular mechanical Bluetooth keyboard.
This week, I had a problem with my regular Logitech wireless keyboard and mouse combo, so I sent it back to the shop for repair since it was still under warranty. Then somebody forgot the RF dongle for her own combo at home, so long story short, we ended up with one third spare keyboard for two people. Not ideal. But luckily, we just completed the review of the Raspberry Pi 500+ keyboard PC, so we had a spare mechanical keyboard, and the btferret project allowed us to use it as a Bluetoot…
While the Raspberry Pi 500+ is a fully functional Linux keyboard PC, it’s also possible to use it as a regular mechanical Bluetooth keyboard.
This week, I had a problem with my regular Logitech wireless keyboard and mouse combo, so I sent it back to the shop for repair since it was still under warranty. Then somebody forgot the RF dongle for her own combo at home, so long story short, we ended up with one third spare keyboard for two people. Not ideal. But luckily, we just completed the review of the Raspberry Pi 500+ keyboard PC, so we had a spare mechanical keyboard, and the btferret project allowed us to use it as a Bluetooth keyboard, which I’m using right now to write this article.
We could have used the Pi 500+ as a Linux machine directly, but we would have had to reinstall all the software we use regularly, and would not have had access to some files located on our regular computers.
The basic instructions can be found on the Raspberry Pi forums:
| 123 | git clone https://github.com/petzval/btferretgcc keyboard.c btlib.c -o keyboardsudo ./keyboard |
Output from the command:
| 12345678910111213141516171819202122 | aey@raspberrypi:~/btferret $ sudo ./keyboardInitialising...Device data from keyboard.txt fileDEVICE = My Pi TYPE=Mesh node=1 ADDRESS = 2C:CF:67:FD:8B:AAPRIMARY_SERVICE = 1800 LECHAR=Device Name SIZE=4 Permit=02 UUID=2A00 LECHAR=Appearance SIZE=2 Permit=02 UUID=2A01PRIMARY_SERVICE = 180A LECHAR= PnP ID SIZE=7 Permit=02 UUID=2A50PRIMARY_SERVICE = 1812 LECHAR=Protocol Mode SIZE=1 Permit=06 UUID=2A4E LECHAR=HID Info SIZE=4 Permit=02 UUID=2A4A LECHAR=HID Ctl Point SIZE=8 Permit=04 UUID=2A4C LECHAR=Report Map SIZE=47 Permit=02 UUID=2A4B LECHAR=Report1 SIZE=8 Permit=92 UUID=2A4DAdvertise as LE HID deviceListening for LE clients to connect (ESC=stop server)Advertising as D3:56:D6:74:33:04 HID deviceWait for pair...PAIR OKConnected OK. Key presses sent to client. ESC stops serverF10 sends Hello plus Enter |
My laptop does not support Bluetooth on Ubuntu, so I went to Windows, and the Pi 500+ Bluetooth keyboard was properly detected as the “HID” device, to which I had no issues connecting.
But when I started typing, nothing happened. I modified the source code to print the keyboard code when I pressed a key, but again, nothing… That’s when I understood that I had a wrong assumption. I had started the program in an SSH terminal, but the keys are only captured on the Desktop. So I opened a terminal Window in the Raspberry Pi OS desktop and started the program again, and this time it worked.
It’s great as a temporary solution, but you may have to do some tweaks to adjust it to your keyboard layout but modifying the keyboard.txt file in the code. Also, the Esc key will terminate the program by default, so if you press it, it will stop the program and disconnect from the host:
| 123 | Key press stop server...Disconnecting 10:68:38:3A:0D:DB10:68:38:3A:0D:DB has disconnected |
It happened to me a few times, so I had to restart the program. That also means it’s recommended to keep a monitor attached when using the Bluetooth keyboard function, both when needing to restart the program and for improved stability (the keyboard will disconnect after a while if I don’t connect a monitor).
Some keys are not working, such as the “Raspberry Pi/Windows” key, and things like Alt Tab and other shortcuts are hit or miss. I also get funny characters when using the arrow keys with the Shift key to select a word: [1;2C is Shift + Left arrow and [1;2D is Shift + Right arrow. I haven’t tried it myself, but it’s possible to fix those little issues by modifying the code for your keyboard. Anyway, it’s a good temporary solution if you get stuck without a working keyboard. It will also work with the earlier Raspberry Pi 400 and 500 keyboard PCs.

Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress. We also use affiliate links in articles to earn commissions if you make a purchase after clicking on those links.