From owner-freebsd-usb@FreeBSD.ORG Tue Apr 21 06:03:10 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A28D71CE for ; Tue, 21 Apr 2015 06:03:10 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6685E15D1 for ; Tue, 21 Apr 2015 06:03:10 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 2A87E1FE023; Tue, 21 Apr 2015 08:03:08 +0200 (CEST) Message-ID: <5535E84D.2010905@selasky.org> Date: Tue, 21 Apr 2015 08:03:57 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: ticso@cicely.de, freebsd-usb@freebsd.org CC: Bernd Walter Subject: Re: Strange problems with CH340G (uchcom) References: <20150420194855.GA29418@cicely7.cicely.de> In-Reply-To: <20150420194855.GA29418@cicely7.cicely.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 06:03:10 -0000 On 04/20/15 21:48, Bernd Walter wrote: > I tried to flash an ESP8266 with the onboard CH340. > The same board works fine when I use a CP2102 instead of the CH340. > Flashing requires a python tool, which sends a SLIP encoded request > and expects a SLIP encoded response with 115200@8n1. > The read function however times out receiving the response without > getting a single byte, even if I add a high delay between sending and > reading. > The strange thing is that I can see a valid response on a scope just > a few µs after the request completes, while the receiver don't even > see the first byte. > If however I physically loopback the CH340 it receives it's own request > just fine. > Two CH340 xconnected work fine too. > Same when I xconnect a CH340 and a CP2102. > Now I'm completely out of ideas, why the python tool has problems > to see the response data with the CH340. > Try using: usbdump -i usbusX -f Y -vvv -s 65536 And see if the reply is seen by the USB ... maybe it is a timing issue like one character at a time instead of a word. --HPS