Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Oct 2024 20:02:04 +0200
From:      Tomek CEDRO <tomek@cedro.info>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        hackers@freebsd.org
Subject:   Re: pyserial.tools.list_port improvement for FreeBSD
Message-ID:  <CAFYkXjk2XUc=N49=XN%2B=VA_G%2BVC4KkYUTdE4G=BQDKD86esUHg@mail.gmail.com>
In-Reply-To: <202410221118.49MBIRSj009090@critter.freebsd.dk>
References:  <202410210954.49L9s9sD076618@critter.freebsd.dk> <203ADA8C-A4ED-4849-B89D-6D18664D67D0@webweaving.org> <CAFYkXjmzAsxLiRZNM1=A37hXKHrDRud6u0R-odxosmCg0oPMcg@mail.gmail.com> <202410221118.49MBIRSj009090@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 22, 2024 at 2:36=E2=80=AFPM Poul-Henning Kamp <phk@phk.freebsd.=
dk> wrote:
> --------
> Tomek CEDRO writes:
> > Very cool PHK! But I have some more ideas below :-) :-P
>
> I think "pyserial-ports -v" already gives you the USB info ?

System package:

%  pyserial-ports -v
/dev/cuaU0
    desc: n/a
    hwid: n/a
/dev/cuaU1
    desc: n/a
    hwid: n/a
/dev/cuaU2
    desc: n/a
    hwid: n/a
/dev/cuau0
    desc: n/a
    hwid: n/a
4 ports found

Your repo:

(venv3.9embedded) python3 list_ports.py -v
/dev/cuaU0
    desc: ugen0.7
    hwid: USB VID:PID=3D0483:374B SER=3D"0667FF504955857567182143" LOCATION=
=3Dugen0.7
/dev/cuaU1
    desc: ugen0.8
    hwid: USB VID:PID=3D303A:1001 SER=3D"60:55:F9:CC:E2:B8" LOCATION=3Dugen=
0.8
/dev/cuaU2
    desc: ugen0.9
    hwid: USB VID:PID=3D10C4:EA60 SER=3D"1a2626680675eb11955981afb7be2ba5"
LOCATION=3Dugen0.9
/dev/cuau0
    desc: cuau0
    hwid: cuau0
4 ports found

% ~/.local/venv3.9embedded/bin/pyserial-ports -v
/dev/cuaU0
    desc: ugen0.7
    hwid: USB VID:PID=3D0483:374B SER=3D"0667FF504955857567182143" LOCATION=
=3Dugen0.7
/dev/cuaU1
    desc: ugen0.8
    hwid: USB VID:PID=3D303A:1001 SER=3D"60:55:F9:CC:E2:B8" LOCATION=3Dugen=
0.8
/dev/cuaU2
    desc: ugen0.9
    hwid: USB VID:PID=3D10C4:EA60 SER=3D"1a2626680675eb11955981afb7be2ba5"
LOCATION=3Dugen0.9
/dev/cuau0
    desc: cuau0
    hwid: cuau0
4 ports found


It is here!! :-)

On the "desc:" in place of ugen I would put "Silicon Labs CP2102N USB
to UART Bridge Controller" as the ugen is in the HWID/LOCATION or
there is a reason to put ugen there? :-)

ugen0.9: <Silicon Labs CP2102N USB to UART Bridge Controller> at
usbus0, cfg=3D0 md=3DHOST spd=3DFULL (12Mbps) pwr=3DON (100mA)

  bLength =3D 0x0012
  bDescriptorType =3D 0x0001
  bcdUSB =3D 0x0200
  bDeviceClass =3D 0x0000  <Probed by interface class>
  bDeviceSubClass =3D 0x0000
  bDeviceProtocol =3D 0x0000
  bMaxPacketSize0 =3D 0x0040
  idVendor =3D 0x10c4
  idProduct =3D 0xea60
  bcdDevice =3D 0x0100
  iManufacturer =3D 0x0001  <Silicon Labs>
  iProduct =3D 0x0002  <CP2102N USB to UART Bridge Controller>
  iSerialNumber =3D 0x0003  <1a2626680675eb11955981afb7be2ba5>
  bNumConfigurations =3D 0x0001

Thank you!! :-)
Tomek

--=20
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFYkXjk2XUc=N49=XN%2B=VA_G%2BVC4KkYUTdE4G=BQDKD86esUHg>