cancel
Showing results for 
Search instead for 
Did you mean: 

Barcode Scaner in USBHID

Hoang_Tran
Associate III

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

8 REPLIES 8
Hoang_Tran
Associate III

up

Hoang_Tran
Associate III

help me

Pavel A.
Evangelist III

Does it work with other, real keyboards?

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

-- pa

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

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 Venmo
Up vote any posts that you find helpful, it shows what's working..
Pavel A.
Evangelist III

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

Matthew_ST
Associate

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

0693W000006Ga87QAC.jpg

Pavel A.
Evangelist III

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