HID with windows 10

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
ilHw_4713311
Level 4
Level 4
5 solutions authored 50 sign-ins 50 replies posted

Tool: modustoolbox 3.0
Sample: https://github.com/Infineon/mtb-example-btsdk-hid-dual-mode-keyboard
Platform: CYBT-41355-EVAL
BR/EDR mode(not BLE)

 

Hello.
I could make build, program, connect to Windows 10 as HID. And send key stoke via HID.
But windows Bluetooth off and on, it connected again but my test board cannot send data any longer although HID is connected.
Can you please give me any idea?


attached log
432 16:35:58.111 D🠈 L2CAP HID Data RECV - Data type:Output 01 01 <- begin to fail sending data 

 

0 Likes
1 Solution
ilHw_4713311
Level 4
Level 4
5 solutions authored 50 sign-ins 50 replies posted

I changed hid library so that support multiple host.

View solution in original post

0 Likes
7 Replies
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

Do you mean if you turn off and turn on the windows bluetooth again, the device can't send data to your computer again?

How about reset the device? Can it send data again?

0 Likes
lock attach
Attachments are accessible only for community members.
ilHw_4713311
Level 4
Level 4
5 solutions authored 50 sign-ins 50 replies posted

Yes. I test it again and found still cannot send data.
(BT is connected by AUTO_RECONNECT.)

538 08:43:56.272 - GENERIC Send key report: RptId:01 Modifier:00 00 Keys:1f 00 00 00 00 00
539 08:43:56.468 - GENERIC Send key report: RptId:01 Modifier:00 00 Keys:00 00 00 00 00 00
540 08:43:58.446 - GENERIC Send key report: RptId:01 Modifier:00 00 Keys:1f 00 00 00 00 00
541 08:43:58.620 - GENERIC Send key report: RptId:01 Modifier:00 00 Keys:00 00 00 00 00 00
542 08:43:59.981 - GENERIC Send key report: RptId:01 Modifier:00 00 Keys:1f 00 00 00 00 00
543 08:44:00.199 - GENERIC Send key report: RptId:01 Modifier:00 00 Keys:00 00 00 00 00 00

0 Likes
ilHw_4713311
Level 4
Level 4
5 solutions authored 50 sign-ins 50 replies posted

I found "LE_DEFAULT=1" is necessary to reconnect in makefile. I'm testing it, and tell you further question.

LE_DEFAULT=1

0 Likes
ilHw_4713311
Level 4
Level 4
5 solutions authored 50 sign-ins 50 replies posted

Hello  

1. for data sending error, I could fix it. hidd_btlink_connectInd() was not called without BLE_SUPPORT.

ilHw_4713311_0-1682392586983.png

2. Reconnection.
My expectation
1) make connection host 1 (windows 10) and use it
2) turn host 1 BT off, make connection host 2 (windows 10) and use it.
3) turn host 2 BT off, turn host 1 BT on, connection is made with host 1 automatically. (without user action)
My previous project with HID over GATT Profile(Nordic semi) works as I expected.

In my study & test, reconnection was made in your sample code but not host. Besides your sample only support 1 host even if HIDD_HOST_LIST_MAX set from 1 to 5.
Today I found that  ATTR_ID_HID_NORMALLY_CONNECTABLE enable host(Windows 10) to reconnect to my HID device(CYW20719). I know that wiced_bt_hidlinkcfg.normallyConnectable is similar feature but it only works from host connection.
Can I use this feature in BR/EDR ? 

dev-kit/baselib/20719B2/release-v4.1.3/COMPONENT_20719B2/include/stack/sdpdefs.h:160:#define ATTR_ID_HID_NORMALLY_CONNECTABLE 0x020D
dev-kit/baselib/20719B2/release-v4.1.3/COMPONENT_20719B2/include/wiced_bt_sdp_defs.h:161:#define ATTR_ID_HID_NORMALLY_CONNECTABLE 0x020D

 

0 Likes
ilHw_4713311
Level 4
Level 4
5 solutions authored 50 sign-ins 50 replies posted


I have just found ATTR_ID_HID_NORMALLY_CONNECTABLE  in wiced_bt_sdp_db.
Sometime it works after reset BT device(cyw20719).

lock attach
Attachments are accessible only for community members.
ilHw_4713311
Level 4
Level 4
5 solutions authored 50 sign-ins 50 replies posted

Hello.
I spent lots of time but I have no idea what made this issue.

My goal: Support multiple host with one HID device. 
1. Issue: looks connected but cannot send keystroke from HID. 
Moreover spy log is telling me it is disconnected but no disconnection event received.

ilHw_4713311_0-1683083677333.png

(error_spylog.zip)


2. My Changes from original source code
1) app: mtb-example-btsdk-hid-dual-mode-keyboard-master_20719_w.zip
a. makefile
COMPONENTS += hidd_lib4
BREDR_DEFAULT=1
LED_SUPPORT_DEFAULT=0
b. app.h
#define LED_GREEN 38///WICED_PLATFORM_LED_1
#define LED_RED 38//WICED_PLATFORM_LED_2
2) lib: COMPONENT_hidd_lib4.zip
a. hidd_host.h
#define HIDD_HOST_LIST_MAX 6 /*1*/
b. hidd_host.c
//wiced_bool_t found = index != < HIDD_HOST_LIST_MAX;
wiced_bool_t found = index < HIDD_HOST_LIST_MAX;
c. hidd_btlink.c
hidd_btlink_bthidd_evtHandler()
#endif
hidd_btlink_connectInd(p_event_data->host_bdaddr);
// Tim #endif

3. steps
1) make connection host 1 (windows 10) and use it
2) turn host 1 BT off, make connection host 2 (windows 10) and use it.
3) turn host 2 BT off, turn host 1 BT on, connection is made. But windows cannot receive any key stroke.
(in my test, android had same issue as well)

4. My expectations
From your doc, 20719 can be used with this sample. 
I hope you give me any solution for multiple host or another HID sample for Modustoolbox 3.0.

0 Likes
ilHw_4713311
Level 4
Level 4
5 solutions authored 50 sign-ins 50 replies posted

I changed hid library so that support multiple host.

0 Likes