Skip to main content
Hoang_Tran
Associate III
April 12, 2019
Question

Barcode Scaner in USBHID

  • April 12, 2019
  • 6 replies
  • 3026 views

I'm trying to use the stack usb hid to talk with a barcode scanner. When I connect the scanner it is classified as a keyboard, but does not generate the interrupt events. Does anybody know why?

thanks!0690X000008AQtbQAG.png

This topic has been closed for replies.

6 replies

Hoang_Tran
Associate III
April 13, 2019

up

Hoang_Tran
Associate III
April 13, 2019

help me

Tesla DeLorean
Guru
April 14, 2019

You've got all the equipment in front of you, instrument the code to understand the interaction and perhaps augment that with a USB analyzer if you have one. Perhaps use a software based monitor on a PC, and compare.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Pavel A.
Super User
April 13, 2019

Does it work with other, real keyboards?

Which STM32 is it? For some families, update to the latest CubeMX library version can help.

-- pa

Hoang_Tran
Associate III
April 14, 2019

I am using the latest Cubemx version!

It works normally with a normal keyboard, but when used with Barcode, the Usb only Start, not ready

Pavel A.
Super User
April 14, 2019

As Clive advised, you need to debug with a USB analyzer or debug prints

Matthew_ST
Visitor II
December 22, 2020

Hello, I have the same problem in my program, did you solve it?

0693W000006Ga87QAC.jpg

Pavel A.
Super User
December 22, 2020

The HID host goes to "ready" state after completing few class-defined requests to the device.

Looks like some request fails or the device does not respond.

Debug to understand where it's stuck and how to recover, and use a USB sniffer.

If this sounds not feasible, find a consultant/contractor who can do it for you.

-- pa