groupgets / GetThermal

Cross-platform USB thermal camera viewer
MIT License
228 stars 90 forks source link

Don't use the a USB hub #21

Closed MGreim closed 4 years ago

MGreim commented 5 years ago

I had, as some users before, bigger problems with the software complaining about access rights. I am using Linux Mint 4.15.0-50-generic #54-Ubuntu SMP x86_64 GNU/Linux with Purethermal2 connected to the PC via an USB hub.

Finally I connected the Lepton 2.5 / Purethermal2 directly to the PCs USB port w/o an USB hub and suddenly it works. Markus

kekiefer commented 5 years ago

Does the hub have a single transaction translator (TT) or one for each port? The PT runs at full speed so it will downgrade the connection on the port it is connected to. Since it uses most of the full speed bandwidth, if you've got other devices on a single TT hub they're going to compete.

DaveBGld commented 4 years ago

The PT runs at full speed

Why on earth would you want to do that??? The Lepton 3.5 frame at 3 channels (is it rather one 16 bit channel?) is 57Kb and at 8.7 MHz is 0.5 Mbps, while USB 2.0 is 60 Mbps, in theory 120 times the required bandwidth, and still the PT2 grabs the whole thing!!???

So it seems to me that the problem here is the PT2 design for "full speed" where there is absolutely no need for that, and not neighbourly behaviour, and limits the usability of multiple cameras and USB devices on the same computer.

BTW, I doubt the problem is bandwidth. I just spent three days trying to get one of these to work while on a USB hub (single and only device on the hub), so I would rather say that the PT2 board is incompatible with most USB hubs, and as Markus very appropriate title says, Don't use with a USB hub.

Thanks Markus. I've been waiting for those three days for my support ticket at GroupGets to just get an answer (still waiting because there is another issue...), and had it not been for your post I would be stuck in my project.

kekiefer commented 4 years ago

The PT runs at full speed

Why on earth would you want to do that???

Most low-power small-footprint microcontrollers (like the STM32F4 series used on the PT) simply can't support USB high speed since they don't have high speed phys in them. The electrical signaling is different for high speed versus low/full speed.

and still the PT2 grabs the whole thing!!???

You're missing the point. In order to communicate with a full speed device, the port where the device is attached must reduce the rate at which data flows through it; so the device is using a fraction of the full speed bandwidth on the port where it is attached. It is then the job of the Transaction Translator in the hub to repackage this data to fit it into the high speed packets sent to the host.

As such, you'd be better served spend all that energy being angry with cheap USB hub manufacturers for giving you hubs where the whole thing gets crippled if you plug a single low/full speed device because they were too cheap to give you a TT per-port.