Live data from Hacker News

STM32 Blue Pill as an Hid USB Keyboard

instructables.com

31–34 of 34 posts

Re: STM32 Blue Pill as an Hid USB Keyboard

#31
post #2

The F103 microcontroller on the blue pill is the epicenter of price hiking during the semiconductor shortage. I've seen prices upwards of 35 USD for each chip. It was more expensive to get one of these chip than to get a Raspberry Pi. I think it is better to use the Nucleo series of evaluation boards from ST now as they have first party support from ST.

Don't the Pis still go for 100 a pop or has that finally normalized now?

Prices started to fall during the last months, but they're still far from the pre-shortage years. It will be a slow process, and being the Pi produced by a single manufacturer, they could take more time compared to other similar products.

Re: STM32 Blue Pill as an Hid USB Keyboard

#32

On that note,, does anyone have some resources on using a phone as a USB keyboard? It would be pretty useful not to have to haul around my bulky keyboard when I'm, say, just working on my server. Requiring root is fine.

Android phones: https://github.com/tejado/android-usb-gadget

I have unfortunately not yet developed any mouse/keyboard app for this. I only use it for https://github.com/tejado/Authorizer

Re: STM32 Blue Pill as an Hid USB Keyboard

#33
post #24

Earlier quoted context omitted.

Windows will try to use the VendorID/ProductID pair on the device to look up which driver to load, but if there isn't any then a regular USB-HID device will default to using the generic HID driver. You'd get assigned a VendorID if you have a USB license: That is a USB-IF thing, not a Microsoft thing. Then each licensee gets to assign its own ProductIDs. There is no authentication in the core USB protocol: A device ca…

If your project is open source, you can get a PID for free. [1] I received one for a virtual usb keyboard [2] that I made to work alongside a desktop app. Having a dedicated VID/PID makes detecting the presence of the device easy. [1] https://pid.codes/ [2] https://github.com/veyh/AutoPTT-sidekick/

Nice project!

Re: STM32 Blue Pill as an Hid USB Keyboard

#34
post #32

On that note,, does anyone have some resources on using a phone as a USB keyboard? It would be pretty useful not to have to haul around my bulky keyboard when I'm, say, just working on my server. Requiring root is fine.

Android phones: https://github.com/tejado/android-usb-gadget I have unfortunately not yet developed any mouse/keyboard app for this. I only use it for https://github.com/tejado/Authorizer

Thanks so much for that, I ended up making my own app using Android USB Gadget and some code I stole from Authorizer.

https://github.com/askiiart/android-usb-keyboard

It's my first app, and it definitely shows, but it works. Though, it's definitely missing a fair number of keys.

Post reply on HN