Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Jan 2020 15:10:13 +0100
From:      Hans Petter Selasky <hps@selasky.org>
To:        Wojciech Puchar <wojtek@puchar.net>, freebsd-hackers@freebsd.org
Subject:   Re: raspberry pi zero and SLOW USB HID
Message-ID:  <9f8ae63f-abe5-27d9-e6bf-3d0cc1d3d4f3@selasky.org>
In-Reply-To: <alpine.BSF.2.20.2001131439440.2189@puchar.net>
References:  <alpine.BSF.2.20.2001131439440.2189@puchar.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2020-01-13 14:40, Wojciech Puchar wrote:
> thank you for the help i already got. Raspberry pi zero run now 
> completely with FreeBSD including USB.
> 
> Over this USB we connect our own hardware that looks like HID device. 
> Actually it's nothing like mouse or keyboard, but it's HID
> device so to be able to work under windoze without requiring user to 
> install any drivers.
> 
> Both raspberry pi and PC have 480Mbit/s USB. device actually works with 
> 12Mbit/s USB.
> 
> my program does lots of hid_read_timeout from this device
> 
> When running on PC it goes fast - able to perform enough reads to read 
> all needed data.
> 
> When running on raspberry pi - in spite of total CPU load is far less 
> than 5% - it is slow. all hid_read_timeout works properly but
> way too slow. every read takes like 10 times more time.
> 
> what is needed to fix this?

Hi,

Can you check the USB speed used between PC and RPI-zero ? Is one 
perhaps High-Speed, while the other is, Full-Speed?

If yes, try to connect a high-speed USB hub in between.

Output from:
usbconfig


You can also check using "usbdump -i usbus0 -s 65536" to see the actual 
timing of the commands.

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9f8ae63f-abe5-27d9-e6bf-3d0cc1d3d4f3>