From nobody Sun Apr 10 23:08:39 2022 X-Original-To: hardware@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 4B5DE1A8E881 for ; Sun, 10 Apr 2022 23:08:42 +0000 (UTC) (envelope-from Axel.Rau@Chaos1.DE) Received: from mailout5.lrau.net (mailout5.lrau.net [IPv6:2a05:bec0:26:5::73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mailout5.lrau.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Kc72d2d4gz4ctt for ; Sun, 10 Apr 2022 23:08:41 +0000 (UTC) (envelope-from Axel.Rau@Chaos1.DE) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=chaos1.de; s=email1; h=References:To:Cc:In-Reply-To:Date:Subject:Mime-Version: Content-Type:Message-Id:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=urGnUH4LvcCoZS0s2qR5lOSwZq/TXPquFtvMlaHwBis=; b=qkt+H936AoK8e9AhhL6IyHOVE2 mjyhQkkO+p9cVjbcCnkNKrt61u9ZPp31o5k7e9o7150X+4UW6GjwlWcP3kvPdCW9wr1oX28Tsmdo4 7uxAYQ2aYctkCPH4oRJJRR0JAL/BrqhH+MIWEDESEZxgTMe+G6cJA50gJhitC1e9gHBztJ16/S5lE 2uAOMTCkBzwGOCabX6EOT/BeLMuiIFiKwEKkEqqOAweHEkxxnoIv3cgnFCpR0pKkG+4WCAnOO6+i8 +MMeEvyj0QFAQLUmVOuLx93saRL6/gYbMcaqqUgz1LemQ0wWaC4+GAnBefQClKaRJoXPzp/TuWgtt +LBIf9fQ==; Received: from [2a05:bec0:26:5::74] (helo=imap5.lrau.net) by mailout5.lrau.net with esmtp (Exim 4.95 (FreeBSD)) (envelope-from ) id 1ndgfg-000HYz-8E; Sun, 10 Apr 2022 23:08:40 +0000 Received: from Axel.Rau@Chaos1.DE by imap5.lrau.net (Archiveopteryx 3.2.0) with esmtpsa id 1649632119-44478-42070/7/15; Sun, 10 Apr 2022 23:08:39 +0000 From: Axel Rau Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_4A4EBA20-9180-4B6C-8ACC-1B2DAF4958A3" List-Id: General discussion of FreeBSD hardware List-Archive: https://lists.freebsd.org/archives/freebsd-hardware List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hardware@freebsd.org Mime-Version: 1.0 Subject: Re: timeouts on USB ISP programmer Date: Mon, 11 Apr 2022 01:08:39 +0200 In-Reply-To: Cc: Hans Petter Selasky , hardware@freebsd.org To: Tomek CEDRO References: <3A781DFA-1E2C-41A5-8053-C90A806244DC@Chaos1.DE> <34a747ea-2ee5-660f-71c6-dc00d5de337f@selasky.org> <9334c4f0-3ecf-c046-420f-516e39379981@selasky.org> <976BDBEB-8B57-4541-A0B7-3F2C89498DC6@Chaos1.DE> <7190bdde-22bc-79ee-06d0-d0114a3ffbad@selasky.org> <7CDFB049-241F-4C31-A7B1-A7D6BDE6A002@Chaos1.DE> <24AA646A-698B-4D41-9668-3F9F99732D02@Chaos1.DE> <1A94816D-E3C1-4488-A5A9-784BAC68AE74@Chaos1.DE> <13D17C8D-D67B-47E8-BB64-A8E32267C669@Chaos1.DE> X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Rspamd-Queue-Id: 4Kc72d2d4gz4ctt X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=chaos1.de header.s=email1 header.b=qkt+H936; dmarc=none; spf=none (mx1.freebsd.org: domain of Axel.Rau@Chaos1.DE has no SPF policy when checking 2a05:bec0:26:5::73) smtp.mailfrom=Axel.Rau@Chaos1.DE X-Spamd-Result: default: False [-2.90 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[chaos1.de:s=email1]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-0.999]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[Chaos1.DE]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[chaos1.de:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DWL_DNSWL_NONE(0.00)[chaos1.de:dkim]; MLMMJ_DEST(0.00)[hardware]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:197071, ipnet:2a05:bec0::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[2a05:bec0:26:5::73:from] X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_4A4EBA20-9180-4B6C-8ACC-1B2DAF4958A3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Am 10.04.2022 um 23:59 schrieb Tomek CEDRO : >=20 > On Sun, Apr 10, 2022 at 10:46 PM Axel Rau wrote: >> root@home2l:~ # avrdude -c stk500v2 -p t85 -vvv -t -P usb >>=20 >> avrdude: Version 6.4 >> Copyright (c) Brian Dean, http://www.bdmicro.com/ >> Copyright (c) Joerg Wunsch >>=20 >> System wide configuration file is "/usr/local/etc/avrdude.conf= " >> User configuration file is "/root/.avrduderc" >> User configuration file does not exist or is not a regular = file, skipping >>=20 >> Using Port : usb >> Using Programmer : stk500v2 >> avrdude: usbdev_open(): did not find any USB device "usb" (0x03eb:0x21= 04) >=20 > Okay, your local `~/.avrduderc` configuration needs an update. Remove > all from file and put only this: >=20 > default_programmer =3D "diamex-avr-usb"; > programmer > id =3D "diamex-avr-usb"; > desc =3D "Diamex AVR USB Programmer"; > type =3D "stk500v2"; > connection_type =3D usb; > usbvid =3D 0x16c0; > usbpid =3D 0x2a9b; > ; >=20 > Then run: >=20 > avrdude -c diamex-avr-usb -p t85 -vvv -t >=20 > Configuration will define a new Programmer, that is STK500v2 > compatible (not FT2232), will provide VID:PID pair, and will tell to > use USB connection as default :-) >=20 > Because default_programmer is set to diamex-avr-usb it may not be even > necessary to provide `-c diamex-avr-usb` just `avrdude -p t85 -t` :-) >=20 - - - root@home2l:~ # avrdude -c diamex-avr-usb -p t85 -vvv -t avrdude: Version 6.4 Copyright (c) Brian Dean, http://www.bdmicro.com/ Copyright (c) Joerg Wunsch System wide configuration file is "/usr/local/etc/avrdude.conf" User configuration file is "/root/.avrduderc" Using Port : usb Using Programmer : diamex-avr-usb avrdude: usbdev_open(): did not find any USB device "usb" (0x03eb:0x2104) avrdude done. Thank you. root@home2l:~ # avrdude -p t85 -vvv -t avrdude: Version 6.4 Copyright (c) Brian Dean, http://www.bdmicro.com/ Copyright (c) Joerg Wunsch System wide configuration file is "/usr/local/etc/avrdude.conf" User configuration file is "/root/.avrduderc" Using Port : usb Using Programmer : diamex-avr-usb avrdude: usbdev_open(): did not find any USB device "usb" (0x03eb:0x2104) avrdude done. Thank you. root@home2l:~ # avrdude -p t85 -vvv -t avrdude: Version 6.4 Copyright (c) Brian Dean, http://www.bdmicro.com/ Copyright (c) Joerg Wunsch System wide configuration file is "/usr/local/etc/avrdude.conf" User configuration file is "/root/.avrduderc" Using Port : usb Using Programmer : diamex-avr-usb avrdude: usbdev_open(): did not find any USB device "usb" (0x03eb:0x2104) avrdude done. Thank you. root@home2l:~ # root@home2l:~ # root@home2l:~ # cat ~/.avrduderc default_programmer =3D "diamex-avr-usb"; programmer id =3D "diamex-avr-usb"; desc =3D "Diamex AVR USB Programmer"; type =3D "stk500v2"; connection_type =3D usb; usbvid =3D 0x03eb; usbpid =3D 0x2104; ; - - - usbvid and usbpid are ignored: - - - root@home2l:~ # cat ~/.avrduderc default_programmer =3D "diamex-avr-usb"; programmer id =3D "diamex-avr-usb"; desc =3D "Diamex AVR USB Programmer"; type =3D "stk500v2"; connection_type =3D usb; ; root@home2l:~ # avrdude -p t85 -vvv -t avrdude: Version 6.4 Copyright (c) Brian Dean, http://www.bdmicro.com/ Copyright (c) Joerg Wunsch System wide configuration file is "/usr/local/etc/avrdude.conf" User configuration file is "/root/.avrduderc" Using Port : usb Using Programmer : diamex-avr-usb avrdude: usbdev_open(): did not find any USB device "usb" (0x03eb:0x2104) avrdude done. Thank you. - - - Axel ps: All this is inside a jail, but I see no difference on the host. devfs.rules are - - - [devfsrules_jail_home2l=3D100] add include $devfsrules_jail add path 'ugen*' unhide add path 'usb/*' unhide add path 'usbctl' unhide add path 'cuaU*' unhide add path 'cuau*' unhide - - - =2D-- PGP-Key: CDE74120 =E2=98=80 computing @ chaos claudius --Apple-Mail=_4A4EBA20-9180-4B6C-8ACC-1B2DAF4958A3 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
=

= Am 10.04.2022 um 23:59 schrieb Tomek CEDRO <tomek@cedro.info>:

On Sun, Apr 10, 2022 = at 10:46 PM Axel Rau <Axel.Rau@chaos1.de> wrote:
root@home2l:~ # avrdude -c stk500v2 -p t85 -vvv -t -P = usb

avrdude: Version 6.4
=         Copyright (c) Brian = Dean, http://www.bdmicro.c= om/
        Co= pyright (c) Joerg Wunsch

   =      System wide configuration file is "/usr/loc= al/etc/avrdude.conf"
      &= nbsp; User configuration file is "/root/.avrduderc"
=         User configuration file = does not exist or is not a regular file, skipping

        Using Port =             &= nbsp;      : usb
  = ;      Using Programmer    &= nbsp;         : stk500v2
avrdude: usbdev_open(): did not find any USB device "usb" = (0x03eb:0x2104)

Okay, your = local `~/.avrduderc` configuration needs an update. Remove
= all from file and put only this:

default_pro= grammer =3D "diamex-avr-usb";
programmer
=  id    =3D "diamex-avr-usb";
 des= c  =3D "Diamex AVR USB Programmer";
 type =  =3D  "stk500v2";
 connection_type =3D = usb;
 usbvid     =3D 0x16c0;
 usbpid     =3D 0x2a9b;
;

Then run:

a= vrdude -c diamex-avr-usb -p t85 -vvv -t

Conf= iguration will define a new Programmer, that is STK500v2
co= mpatible (not FT2232), will provide VID:PID pair, and will tell to
use USB connection as default :-)

Because default_programmer is set to diamex-avr-usb it may not be = even
necessary to provide `-c diamex-avr-usb` just = `avrdude -p t85 -t` :-)

- - -
root= @home2l:~ # avrdude -c diamex-avr-usb -p t85 -vvv -t

avrdude: Version = 6.4
         = Copyright (c) Brian Dean, = http://www.bdmicro.com/
   =       Copyright (c) Joerg Wunsch

         System wide configuration = file is "/usr/local/etc/avrdude.conf"
&nbs= p;        User configuration file is "/root/.avrduder= c"

         Using Port  =                   : = usb
         = Using Programmer              : = diamex-avr-usb
avrdude: usbdev_open(): = did not find any USB device "usb" (0x03eb:0x2104)

avrdude done.  Thank you.

root@home2l:~ = # avrdude=   -p t85 -vvv -t
=
avrdude: Version 6.4
         Copyright (c) Brian Dean, = http://www.bdmicro.com/


- - -
programmer
 id    =3D "diamex-avr-usb";
 desc  =3D "Diamex AVR USB Programmer";
=
 type  =3D  "stk500v2";
 connection_type =3D usb;
;=

root@home2l:~ # avrdude -p t85 -vvv -t

avrdude: Version = 6.4
     =     Copyright (c) Joerg Wunsch

     =     System wide configuration file is "/usr/local/etc/avrdude.c= onf"
         User = configuration file is "/root/.avrduderc"

     =     Using Port              =       : usb
     =     Using Programmer            =   : diamex-avr-usb
avrdude: usbdev_open(): did = not find any USB device "usb" (0x03eb:0x2104)

avrdude done.  = Thank you.
- - -

Axel
ps: = All this is inside a jail, but I see no difference on the host.
devfs.rules are
- - = -
[devfsrules_jail_home2l=3D= 100]
add include $devfsrules_jail
add path 'ugen*' unhide
add path 'usb/*' = unhide
add path 'usbctl' unhide
add path 'cuaU*' unhide
add path 'cuau*' unhide
- - -

=
---
PGP-Key: CDE74120  =E2=98=80 =  computing @ chaos claudius

--Apple-Mail=_4A4EBA20-9180-4B6C-8ACC-1B2DAF4958A3--