I know you can get an Arduino-compatible RS-232 Bluetooth module and turn it into a proper discoverable Bluetooth device. But my task is the opposite: I have a BT device (HID keyboard) that I want to pair with Arduino and process key presses. Is that doable, and if it is - how difficult? As in, will I have to implement all the stuff by myself (the pairing process etc.), or can I count on finding a working example?
P. S. I'm a complete Arduino newbie. Used to do some simple stuff with STM32, but their ecosystem is terrible and finding working examples/solutions for anything more complex than blinking LED is impossible (e. g. USB, Bluetooth). So I want to try Arduino even though the hardware is inferior and the boards are twice more expensive.
Not sure where your getting your boards from.. but clones can be purchased for only a few bucks.
I just order an Uno R3 for like $3.00
Mini are like $2.00 USD..same with Nanos..
(I even get my Pro-Micros for same price)
If you are trying to 'pass on' the keyboard strokes/presses.. then you will need to either Flash your Uno to have HID capability or use a Leonardo/Micro/Pro-Micro..etc that has the HID ability already built into it
I would start with an Uno and a HC-05 module and try to get the two devices paired up.. and then see what kind of data gets sent/received.
Indeed, there are clones as I have learned today. As I said, total newbie
I am, in fact, looking to pass on the key presses by emulating a USB keyboard, but I know that part is at least doable. It's the BT part I have doubts about.
I'm not really clear 'why' the Arduino portion is needed at all.
That being said.. I guess I'm not following your last comment?
I was under the impression that the Nicohood approach is used to reflash the 'usb' chip on the Uno (or other 16u2 based boards) to allow it to act and be seen as an HID device to the end-point PC/device
or... maybe you understand that? Not sure what you mean by "micro MCU"
If you in fact me an Arduino Micro or Pro-Micro.. then you wont need the 'main MCU'...
The HID aspect of this is dead simple.. (especially if you have a Leonardo, Micro, or what I personally always use a Pro-Micro.. (not to be confused with a Pro-Mini)..
I would focus on JUST the bluetooth aspect for now.
If you cant get it to pair to an HC-05 device... the rest is moot.
xl97:
I'm not really clear 'why' the Arduino portion is needed at all.
I need to connect a BT keyboard to a device that can't possibly pair with it directly. I need a Bluetooth-to-USB bridge.
xl97:
I was under the impression that the Nicohood approach is used to reflash the 'usb' chip on the Uno (or other 16u2 based boards) to allow it to act and be seen as an HID device to the end-point PC/device
That's how I understood it! One chip for USB part, one for Bluetooth part. I assume the same would be possible with a single chip as well, but I don't imagine it would be easy to merge USB HID examples and BT examples into a single working project (assuming I can even find a BT pairing example).
xl97:
If you cant get it to pair to an HC-05 device... the rest is moot.
Certainly. I was hoping to find out if that's possible or not before I order the board, though...
ok.. so the 'end device' is not a PC or something?
What IS the end device then?
If the end device has a USB port.. wont a/the USB/BT dongle for the BT keyboard work?
Your last comment makes no sense.
You havent told us ANYTHING.
Also.. regardless if you use an UNOP flashed with some HID capable firmware/bootloader or use a board that already has it 'built in'.. the process is more or less the same..
you need to detect incoming BT (serial) data.. and then pass on 'whatever it is you are trying to do' via HID commands.
Not what the BT keyboard (no links)
Not what the end defvice your trying to connect to is (no links/explanation)
how anyone possibly tell you anything?
Buy a $2.00 HC-05 bt module for your Uno and get to testing.
Or provide info to help others help you.
Is it that you LOST the bt dongle for the keyboard or something? If your end device is taking HID commands from the Arduino.. I dont see why it wont take commands directly from the keyboard and its dongle commented to the usb port?
(something is missing here.. either your objective or information)
I have intentionally left the details out. That's what interfaces are for: Bluetooth keyboard profile (which is documented somewhere, I hope) and USB HID keyboard (which is documented extensively at usb.org). Once I support these interfaces I know the bridge will work with any devices that utilize them. The purpose of interfaces is hiding the underlying implementation details and providing layers of abstraction.
I need a bridge to connect it to a Windows 10 PC. No, I cannot connect it through a USB dongle. I thought I could, but as it turned out there is a reason Windows is not listed among the systems this Bluetooth remote supports. You can't pair Windows with it due to artificial limitations of the Bluetooth stack.
I've just ordered the HC-05. It's $4 around these parts, but whatever, I only need one - unless I break it, of course