From owner-freebsd-embedded@freebsd.org Mon Mar 16 20:25:09 2020 Return-Path: Delivered-To: freebsd-embedded@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6A5D026EAA6 for ; Mon, 16 Mar 2020 20:25:09 +0000 (UTC) (envelope-from bmelo@protonmail.com) Received: from mail-40135.protonmail.ch (mail-40135.protonmail.ch [185.70.40.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "protonmail.com", Issuer "SwissSign Server Gold CA 2014 - G22" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48h78M2MFmz4232 for ; Mon, 16 Mar 2020 20:25:07 +0000 (UTC) (envelope-from bmelo@protonmail.com) Date: Mon, 16 Mar 2020 20:24:56 +0000 To: Ian Lepore From: bmelo Cc: "freebsd-embedded@freebsd.org" Reply-To: bmelo Subject: Re: STM32 not identified Message-ID: <1XBw5X1NatiMuyWhr7sMj-_NVC_2uQxwdcUvYJeSkHSq8SAGXcyabJQXQoscmfjXZ_T_22qkxfCCUvq6aIV9bkpOk6ilz_I4h-qBKNm0Fw4=@protonmail.com> In-Reply-To: <7ee5309c7ba196a23e4030dbb0883525fd38f971.camel@freebsd.org> References: <2e1b00c4213037f308417c902291e0a88c06674b.camel@freebsd.org> <7ee5309c7ba196a23e4030dbb0883525fd38f971.camel@freebsd.org> Feedback-ID: qWjSYckcgWWcZ4sn33dAM-M6U8dYd-Kg7WN_cqNWul_NwneiFWMmqSheunmYdNbSmzUzMmz444KsHd71b-Gqfg==:Ext:ProtonMail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=7.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mail.protonmail.ch X-Rspamd-Queue-Id: 48h78M2MFmz4232 X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.09 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; HAS_REPLYTO(0.00)[bmelo@protonmail.com]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:185.70.40.0/24]; FREEMAIL_FROM(0.00)[protonmail.com]; DKIM_TRACE(0.00)[protonmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[protonmail.com,quarantine]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(0.00)[ip: (-9.83), ipnet: 185.70.40.0/24(-4.89), asn: 62371(-3.91), country: CH(0.05)]; RCVD_IN_DNSWL_LOW(-0.10)[135.40.70.185.list.dnswl.org : 127.0.5.1]; ASN(0.00)[asn:62371, ipnet:185.70.40.0/24, country:CH]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.986,0]; R_DKIM_ALLOW(-0.20)[protonmail.com:s=default]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVFROM(0.00)[protonmail.com]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_REPLYTO(0.00)[protonmail.com]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[] X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Mar 2020 20:25:09 -0000 > I don't have anything in my devfs.conf at all. So do /dev/cuaU* > devices have the right permissions when you plug in an adapter? Do you > just need to unplug/replug it to force the permissions to change? The permmission is actually this even replugging: crw-rw-rw- 1 uucp dialer - 0x29f Mar 16 17:22 /dev/cuaU0 rw-rw-rw- 1 root wheel - 0x29c Mar 16 17:22 /dev/ttyU0 Sent from ProtonMail, Swiss-based encrypted email. > > Sent from ProtonMail, Swiss-based encrypted email. > > =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Origina= l Message =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80= =90 > > On Monday, 16 de March de 2020 s 17:02, Ian Lepore ian@freebsd.org > > wrote: > > > > > On Mon, 2020-03-16 at 16:46 +0000, bmelo wrote: > > > > > > > Here is my devfs.rules: > > > > [devfsrules_common=3D7] > > > > add path 'ad[0-9]\' mode 666 > > > > add path 'ada[0-9]\' mode 666add path 'da[0-9]\' mode 666 > > > > add path 'acd[0-9]\' mode 666add path 'cd[0-9]\' mode 666 > > > > add path 'cuaU[0-9]\' mode 666add path 'mmcsd[0-9]\' mode 666 > > > > add path 'pass[0-9]\' mode 666add path 'xpt[0-9]\' mode 666 > > > > add path 'ugen[0-9]\' mode 666add path 'usbctl' mode 666 > > > > add path 'usb/\' mode 666 > > > > add path 'ttyU[0-9]\' mode 666add path 'lpt[0-9]\' mode 666 > > > > add path 'ulpt[0-9]\' mode 666add path 'unlpt[0-9]\' mode 666 > > > > add path 'fd[0-9]\' mode 666add path 'uscan[0-9]\' mode 666 > > > > add path 'video[0-9]\' mode 666add path 'tuner[0-9]' mode 666 > > > > add path 'dvb/\' mode 666add path 'cx88*' mode 0660 > > > > add path 'iicdev*' mode 0660 > > > > add path 'uvisor[0-9]*' mode 0660 > > > > > > I suspect the escaped wildcards are causing a problem, try using > > > "cuaU*" instead of "cuaU[0-9]\*" (and likewise for all the rules, I > > > don't think there is any device that puts a literal * in the devfs > > > name). > > > -- Ian > > > > > > > Sent from ProtonMail, Swiss-based encrypted email. > > > > =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Ori= ginal Message =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90= =E2=80=90 > > > > On Monday, 16 de March de 2020 s 13:23, Ian Lepore > > > > ian@freebsd.org > > > > wrote: > > > > > > > > > On Mon, 2020-03-16 at 12:23 +0000, bmelo via freebsd-embedded > > > > > wrote: > > > > > > > > > > > Hi, I have a STM32 Nucleo board and installed stlink from > > > > > > ports > > > > > > here. > > > > > > But all the time I run st-util command I get the message: > > > > > > WARN usb.c: Couldn't find any ST-Link/V2 devices > > > > > > The Nucleo creates cuaU0 and ttyU0 in /dev. It seems like a > > > > > > permission problem, but I have no idea how to fix that. I > > > > > > already > > > > > > tried to edit /etc/devfs.rules and the problem persists. > > > > > > /dev/cuaU0 > > > > > > is uucp:dialer and ttyU0 is root:wheel. > > > > > > Any idea? > > > > > > > > > > You didn't saywhat you tried with devfs.rules. This is what I > > > > > use > > > > > (because I am the only user of this machine, so security is not > > > > > a > > > > > problem; these might not be good for a shared machine): > > > > > [localrules=3D10] > > > > > add path "ttyU*" mode 0666 > > > > > add path "cuaU*" mode 0666 > > > > > add path "ugen*" mode 0666 > > > > > add path "usb/*" mode 0666 > > > > > add path "usb" mode 0755 > > > > > -- Ian