ESP32: HID keyboard not connecting to Windows

632 views
Skip to first unread message

Roel

unread,
Oct 3, 2017, 4:10:14 PM10/3/17
to btstack-dev

Hi,

I have been trying to get the HID keyboard example working for a few days, but I'm unable to connect it to Windows.
Whenever I connect it, the keyboard immediately disconnects. I tried to read the log for information but unfortunately I couldn't find anything useful.

I have attached the HCI dump.

Hopefully you can help me with this.

Kind regards,
Roel
log.pklg

Matthias Ringwald

unread,
Oct 3, 2017, 4:14:55 PM10/3/17
to btsta...@googlegroups.com
Hi Roel

During the SDP query, the SDP response sent by BTstack doesn't look correct. This could be either a bug in the code or in the create_packet_log tool.
Could you post the console output for this, too?

best
 matthias

-- 
You received this message because you are subscribed to the Google Groups "btstack-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to btstack-dev...@googlegroups.com.
To post to this group, send email to btsta...@googlegroups.com.
Visit this group at https://groups.google.com/group/btstack-dev.
For more options, visit https://groups.google.com/d/optout.
<log.pklg>

Roel

unread,
Oct 3, 2017, 4:56:28 PM10/3/17
to btstack-dev
Hi Matthias,

Thanks for the quick response, I have attached the console output.

Kind regards,
Roel
log.txt

Roel

unread,
Oct 4, 2017, 12:23:42 PM10/4/17
to btstack-dev
In the log files that I have made one change with respect to the default demo and that was to turn on the hid reconnect initiate. This I did just for trial error.

Therefore, I ran the demo again without changing anything, and it still doesn't work so I have attached the logs to here.
Thanks
log3.pklg
log3.txt

Matthias Ringwald

unread,
Oct 5, 2017, 12:03:44 PM10/5/17
to btsta...@googlegroups.com
Hi Roel

I've just tried the hid_keyboard_demo myself with a Windows 8 system and my Mac. The keyboard demo doesn't work with them either - looks like there's something missing.
It does work with my iPhone, though.

I think I've considered trying with my mac before but then my Bluetooth keyboard was typing in the mac terminal window, where the hid keyboard demo was running which would have sent keystrokes to the mac, which would have resulted in a nice infinite recursion. Well, it doesn't at the moment.

I'll try give a closer look soon - e.g. running the official Bluetooth tests against it, that should uncover some details.

Best
 Matthias


<log3.pklg><log3.txt>

Matthias Ringwald

unread,
Oct 6, 2017, 11:54:30 AM10/6/17
to btsta...@googlegroups.com
Hi Roel

I've fixed the Service Record for the HID keyboard on the develop branch and I can connect from a Mac now. It still fails from a Windows 8 machine, however, this can also be because it wasn't properly removed. I've heard from multiple people that Windows caches and uses SDP records even when pairing again. Could you try again (maybe from a different Windows machine)?

Best 
 Matthias

Roel

unread,
Oct 6, 2017, 4:31:50 PM10/6/17
to btstack-dev
Hi Matthias,

Unfortunately it still does not work for me. I even tried to remove the device from the registry (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Devices)

In the log multiple reconnects are shown. Hopefully this is helpfull.
Thanks for the help so far!

Kind regards,
Roel
new_log.pklg
new_log.txt

Matthias Ringwald

unread,
Oct 9, 2017, 10:59:47 AM10/9/17
to btsta...@googlegroups.com
Hi Roel

Thanks for testing. My Type2Phone macOS app also implements a Bluetooth keyboard (albeit using Apple's Bluetooth API) and as far as I know, it also works with Windows. Just need to figure out, what's different...

I'll let you know when I find something.

Cheers
 Matthias

<new_log.pklg><new_log.txt>

Chris Gray

unread,
Feb 20, 2018, 2:57:34 AM2/20/18
to btstack-dev
Hey, did you push an update to the SDP record?    I'm hoping to pick up where you left off

thx!
-CG

Matthias Ringwald

unread,
Feb 21, 2018, 3:30:15 PM2/21/18
to btsta...@googlegroups.com
Hi Chris

I didn't get to check or change anything in the HID device example yet. In any case, you could try the HOG demo as well if your system supports HID over GATT (BLE).

Best
 matthias
Reply all
Reply to author
Forward
0 new messages