From nobody Tue Oct 22 18:02:04 2024 X-Original-To: hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XY0Pl65F5z5VhSV for ; Tue, 22 Oct 2024 18:02:19 +0000 (UTC) (envelope-from tomek@cedro.info) Received: from mail-yb1-xb2d.google.com (mail-yb1-xb2d.google.com [IPv6:2607:f8b0:4864:20::b2d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XY0Pk2YlLz4fLQ for ; Tue, 22 Oct 2024 18:02:18 +0000 (UTC) (envelope-from tomek@cedro.info) Authentication-Results: mx1.freebsd.org; none Received: by mail-yb1-xb2d.google.com with SMTP id 3f1490d57ef6-e28fa2807eeso5562483276.1 for ; Tue, 22 Oct 2024 11:02:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cedro.info; s=google; t=1729620137; x=1730224937; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=GGuVPsU925bacKvGR4CxZ1USC2pK6VmAYX6ZHH6zS8E=; b=C/Sk01D6sRMAb0Hto7hA9KENI+Mi4cDx1tXBIszV60oNu67wa18FC8ESwGG6s8TsP+ mR/ZllvYOjL32mRM376XYur78cK76MJQZH5lrI9PJ5LB22ouQXOpzVKDAlrOPYtJvjL6 Ysrcp06jOfTTEmgwzO1ayOH0LFWWaOyBMDEuEZKFDCqah87DWgSYI05ltp14ooAv8byA vfiqKADiiq5bSYb9/LMMJ/ojyXK24SD0xw2P5lT0+ePZnx5M31sF3aEq17ytvkI6oaas 3di+FjH751Zmw7XAkLuDfmEnRAaTBrhpbzvc6xbcaVDFWoRHHkIYXHz1wP4H+hFyJUac awgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729620137; x=1730224937; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GGuVPsU925bacKvGR4CxZ1USC2pK6VmAYX6ZHH6zS8E=; b=kc2xhC8G3t9hKSzbLG4JvlK1iI82GuPDZhR2qR5vx05zXJWoya/1Px2U3b8mX70ClX IKKeJR1GWCrXham0OaRVxnRdOLhbqIpRjE6foZUt+XkM12fbwC/jKdoSQ272Wn+i4/mn tM05k9yxJ+gTWmH06mkmA3tVt6apDS0NmpdJ7b30PGuH4R4q81TWc5y17S4DtNl2nlPw RIBxtBwhEsvc2oMUtemWBWMIR7KIugWbJcNPjvQikFzm5hf16H1pQ4OHYEaux9DdCTSm HOe2JlRshU7ES9l5SmGUMhCPn4Za2Ycy5eBqJ3Ugyvq2VCtoJHbV/B57chD5bty3Gjgp hO9g== X-Gm-Message-State: AOJu0YxmX+dq4+9UvTBP7N7Fy7/vMA2U+uyxxsrQKseIuA4AMgsYYhQS dXZxzAO13IcZE91tx6HSoVq/JcO3jVhugpVo5lvLDALg1epxvTABpLD3vgc06HRGGhDksNHPCTY = X-Google-Smtp-Source: AGHT+IHaV360XK9ZUfwdSItgkIuQfgauXSevhjM8s5nWQCLm06QNxikvFtnqV/j3PHtBZQ4I6W7h7Q== X-Received: by 2002:a05:6902:200b:b0:e22:4f74:9590 with SMTP id 3f1490d57ef6-e2e27199c5amr3036994276.27.1729620137559; Tue, 22 Oct 2024 11:02:17 -0700 (PDT) Received: from mail-yw1-f179.google.com (mail-yw1-f179.google.com. [209.85.128.179]) by smtp.gmail.com with ESMTPSA id 3f1490d57ef6-e2e312b9971sm244634276.34.2024.10.22.11.02.16 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Oct 2024 11:02:16 -0700 (PDT) Received: by mail-yw1-f179.google.com with SMTP id 00721157ae682-6e5cec98cceso35155227b3.2 for ; Tue, 22 Oct 2024 11:02:16 -0700 (PDT) X-Received: by 2002:a05:690c:11:b0:6dd:d0fa:159f with SMTP id 00721157ae682-6e7d82af510mr38187407b3.34.1729620136499; Tue, 22 Oct 2024 11:02:16 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 References: <202410210954.49L9s9sD076618@critter.freebsd.dk> <203ADA8C-A4ED-4849-B89D-6D18664D67D0@webweaving.org> <202410221118.49MBIRSj009090@critter.freebsd.dk> In-Reply-To: <202410221118.49MBIRSj009090@critter.freebsd.dk> From: Tomek CEDRO Date: Tue, 22 Oct 2024 20:02:04 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: pyserial.tools.list_port improvement for FreeBSD To: Poul-Henning Kamp Cc: hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4XY0Pk2YlLz4fLQ X-Spamd-Bar: ---- On Tue, Oct 22, 2024 at 2:36=E2=80=AFPM Poul-Henning Kamp 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: at usbus0, cfg=3D0 md=3DHOST spd=3DFULL (12Mbps) pwr=3DON (100mA) bLength =3D 0x0012 bDescriptorType =3D 0x0001 bcdUSB =3D 0x0200 bDeviceClass =3D 0x0000 bDeviceSubClass =3D 0x0000 bDeviceProtocol =3D 0x0000 bMaxPacketSize0 =3D 0x0040 idVendor =3D 0x10c4 idProduct =3D 0xea60 bcdDevice =3D 0x0100 iManufacturer =3D 0x0001 iProduct =3D 0x0002 iSerialNumber =3D 0x0003 <1a2626680675eb11955981afb7be2ba5> bNumConfigurations =3D 0x0001 Thank you!! :-) Tomek --=20 CeDeROM, SQ7MHZ, http://www.tomek.cedro.info