Sending Keyboard Data to Mac Devices via Micropython BLE

The official PYBD running MicroPython, and its accessories.
Target audience: Users with a PYBD
Post Reply
ScytheLucifer
Posts: 1
Joined: Mon Apr 25, 2022 2:01 am

Sending Keyboard Data to Mac Devices via Micropython BLE

Post by ScytheLucifer » Mon Apr 25, 2022 2:26 am

Hello,
I am trying to create a Bluetooth program that will advertise to other devices and, when it connects, types out a message using the connected device's keyboard. Essentially, I want to create a Bluetooth rubber ducky.

Bluetooth connects to all devices, but, of the three machines I tested it with, Windows, Mac, and Android, keystrokes are not visible on Mac devices. This has especially been confusing us because there is no visible error and no difference in what is printed out in the REPL prompt when it is run on a Windows or Android machine versus a Mac. It appears to send the data for the keys normally, but the computer doesn't receive the data. Here is a link to an image of the output across all devices.
https://drive.google.com/file/d/181p7Vf ... sp=sharing

The “Notify with report” lines just print data corresponding the the letters being sent, but I am not sure what the “Unhandled IRQ Error” is. I don’t believe it is related to the error of the keys not typing out on Mac devices because it is present whenever the pyboard connects to a peripheral device, regardless of OS.

I am working with a modified version of this(https://github.com/Heerkog/MicroPythonBLEHID) HID library. Has anyone else run into this problem?

Post Reply