This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

could CC2540 USB interface connect to wired USB HID device and receive data?

Other Parts Discussed in Thread: CC2540

to make a classical wired USB HID keyboard wireless by cc2540, is it possible to use cc2540 USB interface connect the USB HID keyboard, and receive the pressed or released key events via USB interface?  does BLE stack 1.4 provided those classical USB HOST HID library for CC2540?

  • Look in the following project on your drive:

    C:\Texas Instruments\BLE-CC254x-1.4.0\Projects\ble\HIDEmuKbd

  • the document TI_BLE_Sample_Applications_Guide.pdf gives a description of HIDEmuKbd. it is the wireless part of a wireless keyboard. what I concern is not to send the key press via HID Over GATT profile.

    generanlly, what I concern is to make CC2540 receive data from a classical wired USB HID device via wired USB interface. this is the classical wired part of USB interface. I want to know if the BEL stack 1.4 provided library for the CC2540 to act as a HID USB HOST to connect to the classical wired USB HID device to get the data before the data can be sent via HID Over GATT profile. or if there's any general HID USB HOST library/sample code for 8051 mcu? so that make the programming process more easy without programming a USB HID HOST driver for CC2540 from scratch.

  • Hello ke fan,

    The USB drivers do not support USB Host or USBOTG.  It may be possible to write your own with a lot of work and Assembly routines for optimization.

    Your alternative would be to interface directly with the Keyboard itself and not the USB controller.  The keyboard may have its own controller that connects with the USB controller using SPI, UART or some other type of protocol.  It also may be a 16 bit connection (rows, columns) that you can wire directly up to or use an i2c port expander like the PCA95555.  Open up your keyboard and have a look.

    Another alternative would be to find an older keyboard with a DP9 connector or the 6 pin PS2.  There are lots of example for PS2 to 8051 micro controllers on the web.

    Thanks,