From owner-freebsd-usb@FreeBSD.ORG Mon Apr 20 20:02:02 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79EBA693 for ; Mon, 20 Apr 2015 20:02:02 +0000 (UTC) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "raven.bwct.de", Issuer "BWCT" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 10CBAABD for ; Mon, 20 Apr 2015 20:02:01 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id t3KJmwns078289 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 20 Apr 2015 21:48:59 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.5/8.14.4) with ESMTP id t3KJmtNV070050 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 20 Apr 2015 21:48:56 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id t3KJmtq4030075; Mon, 20 Apr 2015 21:48:55 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id t3KJmtkZ030074; Mon, 20 Apr 2015 21:48:55 +0200 (CEST) (envelope-from ticso) Date: Mon, 20 Apr 2015 21:48:55 +0200 From: Bernd Walter To: freebsd-usb@freebsd.org Cc: Bernd Walter Subject: Strange problems with CH340G (uchcom) Message-ID: <20150420194855.GA29418@cicely7.cicely.de> Reply-To: ticso@cicely.de Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED=-1, BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 autolearn=ham version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on spamd.cicely.de 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: Mon, 20 Apr 2015 20:02:02 -0000 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. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.