Ti85
Posts: 19
Joined: Thu Oct 27, 2016 2:31 am

bluetooth uart keyboard emulaton

Mon Nov 27, 2017 2:22 pm

I have a Bluetooth project that uses a microcontroller and a bluefruit ez-key to send HID keyboard information to my software on the raspberry pi. It works great; the bluefruit ez does a great job of emulating a Bluetooth keyboard that the raspberry pi recognizes. Now, I am looking to create another project with the same setup, however, bluefruits ez-keys are not available any more (plus they were expensive). So I am looking for another Bluetooth type setup. I have been looking to do a Bluetooth uart serial setup with something like a HC-05 module (very cheap), but my software on the raspberry pi (App Game Kit) side only accepts joystick and keyboard inputs. Is there a way to run a program in the background on the raspberry pi, like a python script, that can accept the Bluetooth serial information and translate that information into keyboard information that the AGK software can read as keyboard inputs? Both programs (Python scrip and AGK) would have to run concurrently.

User avatar
Douglas6
Posts: 4675
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: bluetooth uart keyboard emulaton

Mon Nov 27, 2017 2:42 pm

Yes, it's possible, but I don't have any code for you. I did Bluetooth HID once, several years ago (see here: viewtopic.php?p=509679#p509679) but BlueZ has changed, so that code no longer works. This is some current code for adding a service record (SPP, not HID) perhaps you can figure it out: viewtopic.php?f=63&t=133263&p=1126037&h ... d#p1126443

Ti85
Posts: 19
Joined: Thu Oct 27, 2016 2:31 am

Re: bluetooth uart keyboard emulaton

Mon Nov 27, 2017 6:38 pm

Looking through the forums...uinput might work??? But is there a way to run the python script in the background, while the app game kit program runs and have the app game kit program recognize the keypress??

Return to “General discussion”