From nobody Mon Nov 29 07:24:20 2021 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 06C6F18B722E for ; Mon, 29 Nov 2021 07:24:45 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from midget.dons.net.au (2403-5800-5200-4700-225-90ff-fe47-39b4.ip6.aussiebb.net [IPv6:2403:5800:5200:4700:225:90ff:fe47:39b4]) (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 ECDSA (P-384) client-digest SHA384) (Client CN "dons.net.au", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J2cLN3b26z583f for ; Mon, 29 Nov 2021 07:24:44 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from midget.dons.net.au (localhost [127.0.0.1]) by midget.dons.net.au (8.16.1/8.16.1) with ESMTPS id 1AT7ORSM082797 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Mon, 29 Nov 2021 17:54:32 +1030 (ACDT) (envelope-from darius@dons.net.au) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=dons.net.au; s=default; t=1638170675; bh=51fH60+9DHg0gTouR6fwyo7gF4Z33maCZTQrw82ZZ6s=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=W7lrs59aTcEcMsGZ2z+QTnZNcAHfggUSUj2rOsL5+yyoYafUfJiHHA8BlPnaPFZAr Erv7eE5KbU+c23nXvM0ED8xgBFX64Jl833wO6VqLu5h4WAwp8HwF55DLe5VWkKIPEB Mbvq99s1DxoBRH6va+pOrPaWrLUYdBhG9MOKn8Zg= Received: (from mailnull@localhost) by midget.dons.net.au (8.16.1/8.16.1/Submit) id 1AT7OLKk082789 for ; Mon, 29 Nov 2021 17:54:21 +1030 (ACDT) (envelope-from darius@dons.net.au) X-MIMEDefang-Relay-f0f0b4ff001831caa5b8ac39868c4c7e9b4d12fc: 2001:44b8:1d2:8900:a9cb:700e:9980:3d76 Received: from smtpclient.apple ([IPv6:2001:44b8:1d2:8900:a9cb:700e:9980:3d76] [2001:44b8:1d2:8900:a9cb:700e:9980:3d76]) by 2403-5800-5200-4700-225-90ff-fe47-39b4.ip6.aussiebb.net (envelope-sender ) (MIMEDefang) with ESMTP id 1AT7OKI1082784; Mon, 29 Nov 2021 17:54:21 +1030 Content-Type: text/plain; charset=utf-8 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 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: usb serial - need quirk? In-Reply-To: Date: Mon, 29 Nov 2021 17:54:20 +1030 Cc: freebsd- Content-Transfer-Encoding: quoted-printable Message-Id: References: <11EBCD70-3259-4E4D-8B9C-9F25364BC73C@cs.huji.ac.il> <20F9C20E-BB89-4FC1-A339-171447368AD2@dons.net.au> To: Daniel Braniss X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Spam-Score: 1.3 (*) No, score=1.3 required=5.0 tests=RDNS_NONE,SPF_HELO_NONE, T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.4 X-Scanned-By: MIMEDefang 2.83 on 10.0.2.1 X-Rspamd-Queue-Id: 4J2cLN3b26z583f X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Reply-To: darius@dons.net.au From: Daniel O'Connor via hackers X-Original-From: Daniel O'Connor X-ThisMailContainsUnwantedMimeParts: N > On 29 Nov 2021, at 17:35, Daniel Braniss wrote: >>> it=E2=80=99s the last line that I think is causing failure to flash = the device (probably needs the break to set the speed?) >>=20 >> Why would it need break to set the speed? > don=E2=80=99t know, but I=E2=80=99ve seen in the past serial stuff = that needed the break to synchronize. >>=20 >>> any ways, is there some fix for this? >>=20 >> You didn't actually post the problem you are having so it's = impossible to say :) >> I assume esptool fails but it would be helpful if you posted the = output. > the flashing keeps failing with: > Chip is ESP32-C3 (revision 3) > Features: Wi-Fi > Crystal is 40MHz > MAC: 7c:df:a1:a3:61:74 > Uploading stub... >=20 > A fatal error occurred: Failed to write to target RAM (result was = 01070000) >>=20 >> I haven't used an ESP32-C3 but all of the other ESP's don't have USB = built in so it depends what USB UART you have on your board - any idea = which one it it? > all the other esp32 I have work fine, it=E2=80=99s this esp32c3 that = fails. > anyways, i got hold of a ttl to usb from m5stack, and after some = fiddling got it to flash! > this chip is CP2104, > so the problem seems to be in the driver for the unknown chip on this = esp32c3 - no > indication in the diagrams, nor can I read the micro words on the chip = :-( I had a look at the ESP32-C3 datasheet and it *does* have a USB = interface built in and it talks about a CDC-ACM virtual serial port = which matches what you see. The only ACM quirk I can see is UQ_ASSUME_CM_OVER_DATA so you could try = that I suppose.. (See the usb_quirk man page) -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum