JakoobCZ
Posts: 6
Joined: Sat Apr 23, 2016 10:08 am

Identifying USB ports 3B vs 3B+

Tue Nov 27, 2018 7:45 pm

Hi guys,
I need your help regarding my project, which consists of connecting four USB devices to the Raspberry. There will be a web server running on the RPi with four services and I need to bind each USB port to the certain instance of the services.

On the RPi 3B it was quite easy, you run the command:

Code: Select all

ls /sys/bus/usb/devices
and got:

Code: Select all

1-0:1.0  1-1  1-1.1  1-1.1:1.0  1-1:1.0  usb1
1-0:1.0  1-1  1-1.1  1-1.1:1.0  1-1.2  1-1.2:1.0  1-1.2:1.1  1-1:1.0  usb1
1-0:1.0  1-1  1-1.1  1-1.1:1.0  1-1.3  1-1.3:1.0  1-1.3:1.1  1-1:1.0  usb1
1-0:1.0  1-1  1-1.1  1-1.1:1.0  1-1.4  1-1.4:1.0  1-1.4:1.1  1-1:1.0  usb1
1-0:1.0  1-1  1-1.1  1-1.1:1.0  1-1.5  1-1.5:1.0  1-1.5:1.1  1-1:1.0  usb1
which can be then translated to symlink:

Code: Select all

KERNEL=="ttyACM*", KERNELS=="1-1.2", SYMLINK+="ttyUSB2"
KERNEL=="ttyACM*", KERNELS=="1-1.3", SYMLINK+="ttyUSB3"
KERNEL=="ttyACM*", KERNELS=="1-1.4", SYMLINK+="ttyUSB4"
KERNEL=="ttyACM*", KERNELS=="1-1.5", SYMLINK+="ttyUSB5"
---

But on RPi 3B+ this is a complete mess :( , when I run the command:

Code: Select all

ls /sys/bus/usb/devices

Code: Select all

1-0:1.0  1-1  1-1.1  1-1.1.1  1-1.1.1:1.0  1-1.1:1.0  1-1:1.0  usb1
1-0:1.0  1-1  1-1.1  1-1.1.1  1-1.1.1:1.0  1-1.1.2  1-1.1.2:1.0  1-1.1.2:1.1  1-1.1:1.0  1-1:1.0  usb1
1-0:1.0  1-1  1-1.1  1-1.1.1  1-1.1.1:1.0  1-1.1.3  1-1.1.3:1.0  1-1.1.3:1.1  1-1.1:1.0  1-1:1.0  usb1
1-0:1.0  1-1  1-1.1  1-1.1.1  1-1.1.1:1.0  1-1.1:1.0  1-1.3  1-1.3:1.0  1-1.3:1.1  1-1:1.0  usb1
1-0:1.0  1-1  1-1.1  1-1.1.1  1-1.1.1:1.0  1-1.1:1.0  1-1.2  1-1.2:1.0  1-1.2:1.1  1-1:1.0  usb1

I'm a bit lost, how to bind the ports now :shock:

I guess it is:
1-1.2=> 1-1.1.2
1-1.3=> 1-1.1.3
1-1.4=> 1-1.3
1-1.5=> 1-1.2

Can anyone confirm it? I can't test it at the moment and I would like to move forward. Also, I thought the 3B and 3B+ should be the same in terms of the USB hub and apparently something has changed. I wonder why.

Thank you
Jakub

n67
Posts: 938
Joined: Mon Oct 30, 2017 4:55 pm

Re: Identifying USB ports 3B vs 3B+

Tue Nov 27, 2018 7:58 pm

Is there a reason why you want (or need) to run on the 3B+?
"L'enfer, c'est les autres"

G fytc hsqr rum umpbq rm qyw rm rfc kmbq md rfgq dmpsk:

Epmu Sn!

J lnacjrw njbruh-carppnanm vxm rb mnuncrwp vh yxbcb!

JakoobCZ
Posts: 6
Joined: Sat Apr 23, 2016 10:08 am

Re: Identifying USB ports 3B vs 3B+

Tue Nov 27, 2018 8:09 pm

It will be part of a public guide and I'm sure many users will be already on the 3B+
I want to provide them with a solution for both generations of the RPi.

User avatar
rpdom
Posts: 17548
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Identifying USB ports 3B vs 3B+

Tue Nov 27, 2018 8:21 pm

JakoobCZ wrote:
Tue Nov 27, 2018 7:45 pm
I thought the 3B and 3B+ should be the same in terms of the USB hub and apparently something has changed. I wonder why.
Because it is using a different USB/LAN chip. The 3B+ chip contains two USB hubs, a 3 port and a 4 port one. The 4 port is connected to the Pi BCM chip, then the 3 port hub is connected to that. Two of the USB ports run from the 4 port hub, the other two and the ethernet adaptor run from the 3 port hub.

JakoobCZ
Posts: 6
Joined: Sat Apr 23, 2016 10:08 am

Re: Identifying USB ports 3B vs 3B+

Tue Nov 27, 2018 8:24 pm

Thanks for the info rpdom! Now it makes more sense... I will look for some documentation, I was searching the official site yesterday, but found nothing.

Return to “Advanced users”