Issue in interfacing Barcode scanner using LPC4337 controller with LPCUSBLIB

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Issue in interfacing Barcode scanner using LPC4337 controller with LPCUSBLIB

49 Views
RDGC_member
Contributor I

Hello ,

I’m currently working on barcode scanner interfacing with LPC4337 using lpcusblib (HID keyboard host example). 

Issue: The USB1 host receives only the first character from the scanner after receiving few successful barcode readings, and then stalls. After rescanning, no further data transfers occur.

I’ve enabled USB1 interrupts and used HID_Host_ReceiveReport(), but suspect I’m missing proper IN packet handling or report clearing.

Has anyone implemented HID barcode scanning with lpcusblib on LPC microcontrollers? Any guidance or code snippets on handling continuous data transfer would be greatly helpful for me and appreciated.

i wanted to know that which are the conditions cause to clear the  pipe buffer. some times i receive full barcode properly. some times after first character nothing is received also the usb line gets stuck so that after that nothing is received for several times barcode scanning. 

Thank you in advance!

#EmbeddedSystems #LPC4337 #USBHost #HID #Firmware 

Regards,

0 Kudos
Reply
1 Reply

20 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @RDGC_member 

My colleague has modified the LPC4337 USB host keyboard code to work with the NLS-HR11 barcode scanner on the LPCXpresso4337 EVK using MCUXpresso IDE. It works well.

Please see the screenshot of the changed code, as I cannot send the source code to you due to company policy. I have taken a screenshot for you to compare the differences. You can refer to it to check. Thank you.

Alice_Yang_0-1794537301916.png

 

Alice_Yang_1-1794537310094.pngAlice_Yang_2-1794537315795.png

 

BR

Alice

 

 

 

0 Kudos
Reply