ESP32-S3-WROOM connecting HID device.

vapisoft
Posts: 12
Joined: Sun Sep 03, 2023 6:12 am

ESP32-S3-WROOM connecting HID device.

Postby vapisoft » Mon Oct 02, 2023 11:03 am

I have an ESP32-S3-WROOM module.
I downloaded the examples from GitHub.
I connected an HID device that sends data continuesly by a USB cable to the USB port in the module.
I run the "ble_hid_device" example, and I expect to receive data fro mthe device.
https://github.com/espressif/esp-idf/tr ... evice_demo
But I don't see and data coming in from the device.
I add log lines to its interrupt handler, but nothing is comming in.
What should I need to change in the code to make it work?
More:
I see that see that in the main module: ble_hidd_demo_main.c there are hardcoded parameters that I don't know if I should change them to match my HID device. For example the name of the device in the code is "HID", but the name of the device (as I see in the Terminal) is "Fourtec (VID:10C4) EC8xx III (PID:1F0C) 0E5139433".
The settings:
#define HIDD_DEVICE_NAME "HID"
static uint8_t hidd_service_uuid128[] = {
/* LSB <--------------------------------------------------------------------------------> MSB */
//first uuid, 16bit, [12],[13] is the value
0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0x12, 0x18, 0x00, 0x00,
};

static esp_ble_adv_data_t hidd_adv_data = {
.set_scan_rsp = false,
.include_name = true,
.include_txpower = true,
.min_interval = 0x0006, //slave connection min interval, Time = min_interval * 1.25 msec
.max_interval = 0x0010, //slave connection max interval, Time = max_interval * 1.25 msec
.appearance = 0x03c0, //HID Generic,
.manufacturer_len = 0,
.p_manufacturer_data = NULL,
.service_data_len = 0,
.p_service_data = NULL,
.service_uuid_len = sizeof(hidd_service_uuid128),
.p_service_uuid = hidd_service_uuid128,
.flag = 0x6,
};

static esp_ble_adv_params_t hidd_adv_params = {
.adv_int_min = 0x20,
.adv_int_max = 0x30,
.adv_type = ADV_TYPE_IND,
.own_addr_type = BLE_ADDR_TYPE_PUBLIC,
//.peer_addr =
//.peer_addr_type =
.channel_map = ADV_CHNL_ALL,
.adv_filter_policy = ADV_FILTER_ALLOW_SCAN_ANY_CON_ANY,
};

bidrohini
Posts: 202
Joined: Thu Oct 27, 2022 12:55 pm

Re: ESP32-S3-WROOM connecting HID device.

Postby bidrohini » Wed Oct 04, 2023 11:51 am

Is there any error messages that you can see?

Who is online

Users browsing this forum: Assasinsareus and 99 guests