hanspython
Posts: 11
Joined: Tue Aug 21, 2018 7:32 am

Usb hub

Mon May 27, 2019 8:25 am

Hello

I got a question how many USB hubs can I connect to a raspberry pi? And to configure remote?

JacobNeill
Posts: 3
Joined: Mon May 27, 2019 8:15 am

Re: Usb hub

Mon May 27, 2019 8:52 am

Hey there, not sure which pi your're using but this post on stackoverflow would suggest 127 total connections! https://raspberrypi.stackexchange.com/q ... -supported

Ernst
Posts: 1335
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: Usb hub

Mon May 27, 2019 9:28 am

hanspython wrote:
Mon May 27, 2019 8:25 am
Hello

I got a question how many USB hubs can I connect to a raspberry pi? And to configure remote?
Quite a few I think, but there is a limitation that you must consider:

There are 8 host channels (i.e. state machines capable of carrying out a single USB transfer to/from a single endpoint) which means there can be a maximum of 8 outstanding transfers. The respective processes trying to access each USB device are blocked waiting for host channels to become available - in the resource-starved case then endpoints will get serviced semi-randomly.

Is it posible increase host channels by recompile Linux kernel?

No, this is a hardware limitation.

Is it limitation of SoC or USB hub?

The limitation is in the SoC USB peripheral.

Extracted from https://github.com/raspberrypi/firmware/issues/582
The road to insanity is paved with static ip addresses

Andyroo

Re: Usb hub

Mon May 27, 2019 11:15 am

Other posts on the forum have identified two limits in software:

1) A maximum of 6 hard drives active at once
2) A maximum of four WiFi adapters active at once

These where on different Pi set ups.

LTolledo
Posts: 3584
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: Usb hub

Mon May 27, 2019 11:59 am

to the OP:

Why do you need to connect many USB hubs?
what is the purpose of that?
what are you planning to do/make?
have you made some trials?

if there is no answer back, this topic might be considered as spam-bot generated.....
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

hanspython
Posts: 11
Joined: Tue Aug 21, 2018 7:32 am

Re: Usb hub

Mon May 27, 2019 1:53 pm

I want to make postboxes with name and number identification I got LCD 1602 displays with are connected with a ardune board. And now I want to configure the LCD 1602 with USB hubs connected to my raspberry pi.

Andyroo

Re: Usb hub

Mon May 27, 2019 2:07 pm

But can you guarantee USB connected devices will have the same name each time the system is powered on? I know with disks I’ve now gone to using the UUID to stop issues in mount commands.

I would look at the shelf edge label systems https://www.eink.com/electronic-shelf-l ... ation&id=5 and possibly serial, SPI or I2C bus systems.

You could even use LoRaWAN to go wireless - the advantage of eInk is the low power use.

hanspython
Posts: 11
Joined: Tue Aug 21, 2018 7:32 am

Re: Usb hub

Mon May 27, 2019 2:14 pm

Andyroo wrote:
Mon May 27, 2019 2:07 pm
But can you guarantee USB connected devices will have the same name each time the system is powered on? I know with disks I’ve now gone to using the UUID to stop issues in mount commands.

I would look at the shelf edge label systems https://www.eink.com/electronic-shelf-l ... ation&id=5 and possibly serial, SPI or I2C bus systems.

You could even use LoRaWAN to go wireless - the advantage of eInk is the low power use.
I know but this solution is cost a lot of money. And I need more than 400 displays on 12 different locations.

Andyroo

Re: Usb hub

Mon May 27, 2019 2:25 pm

Then I would build small clusters of ESP8266 WiFi connected screens and use MQTT to message them.

Each display has a topic and maybe use DIP switches to configure the address rather than 400 different compiles.

If the WiFi will not go through the mailbox (assume they are metal and act as a Faraday cage) then look to use a serial port network and link them similar to the old TokenRing network.

PhatFil
Posts: 1685
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Usb hub

Mon May 27, 2019 2:40 pm

how about substituting esp8266 modules for the arduinos and you can use wifi coms ?

ha snap

hanspython
Posts: 11
Joined: Tue Aug 21, 2018 7:32 am

Re: Usb hub

Mon May 27, 2019 6:27 pm

Andyroo wrote:
Mon May 27, 2019 2:25 pm
Then I would build small clusters of ESP8266 WiFi connected screens and use MQTT to message them.

Each display has a topic and maybe use DIP switches to configure the address rather than 400 different compiles.

If the WiFi will not go through the mailbox (assume they are metal and act as a Faraday cage) then look to use a serial port network and link them similar to the old TokenRing network.
Yes that's more like it. If may ask you you got a schematic view or a plan and part list?

Andyroo

Re: Usb hub

Mon May 27, 2019 7:11 pm

To be honest - no as the idea was off the top of my head and does not involve a Pi. You may do better on the Arduino / ESP forums than here.

The 16x2 LCD displays can have an I2C interface - cuts down the number of pins needed.
The switches could be a hex rotary switch - two of them will give you 256 addresses - you may be able to get a I2C encoder or feed them through a MCP23017 - again to cut down the I/O pins used and simplify the programming.

MQTT broker could run on a Pi - the classic intro site is http://www.steves-internet-guide.com/

Edit: I have assumed that the locations can not see each other on the WiFi - if they can you may need another rotary encoder to be the location number and then two for the mailbox ID.

Return to “Beginners”