Skip to main content
MMARI.1
Senior II
April 15, 2024
Solved

USB_HID_Barcode Scanner

  • April 15, 2024
  • 1 reply
  • 856 views

hi, Can anyone please help me in USB-HID-Barcode Scanner connection with stm32f722ze.   Normally Barcode Scanner will behave like keyboard and how to decode the ASCII code using usbh_hid_key.c .  Request : if anyone can suggest me small  example of usb barcode library  .

Best answer by FBL

Hello @MMARI.1 

Keyboard specific functions added to your specific HID APIs help you to customize the class and handle barcode scanner. You need to properly parse the HID report descriptor of your barcode scanner structures representing the data items that the scanner reports, and then use HID_ReadItem to read the values of these items from the HID reports that the scanner sends. Honestly, I'm not the expert but maybe this can be helpful.

1 reply

FBLBest answer
ST Technical Moderator
April 15, 2024

Hello @MMARI.1 

Keyboard specific functions added to your specific HID APIs help you to customize the class and handle barcode scanner. You need to properly parse the HID report descriptor of your barcode scanner structures representing the data items that the scanner reports, and then use HID_ReadItem to read the values of these items from the HID reports that the scanner sends. Honestly, I'm not the expert but maybe this can be helpful.

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL