From nobody Tue Oct 04 11:43:57 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 4MhbT00TNwz4dg2W; Tue, 4 Oct 2022 11:44:04 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4MhbSz265pz3Svj; Tue, 4 Oct 2022 11:44:03 +0000 (UTC) (envelope-from hps@selasky.org) Received: from [10.36.2.155] (unknown [178.232.223.95]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 73B612604CD; Tue, 4 Oct 2022 13:43:59 +0200 (CEST) Message-ID: <84c5bc0b-1c72-d50d-6289-ac91a0878bd1@selasky.org> Date: Tue, 4 Oct 2022 13:43:57 +0200 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 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: Accessing I2C-Bus via ELV USB-I2C Content-Language: en-US To: Axel Rau Cc: hardware@freebsd.org, freebsd-hackers@freebsd.org References: <996df5c0-ffa7-f1bf-a9e2-6dd47d7b49e6@Chaos1.DE> <35D556D7-56EC-4295-93D6-80A4CFE6DCE9@Chaos1.DE> <37c55124-5cd5-6fd1-ca46-9265ebe47b18@selasky.org> <602324D8-515B-4061-8689-5638E9A82759@Chaos1.DE> <2cb6203f-03da-9a05-24a5-c851f1424503@selasky.org> <490EBA38-E103-4DC1-8A42-E16A8279980D@Chaos1.DE> <017C6EBE-910E-43E7-AAF7-A3D9ECE85EFF@Chaos1.DE> From: Hans Petter Selasky In-Reply-To: <017C6EBE-910E-43E7-AAF7-A3D9ECE85EFF@Chaos1.DE> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4MhbSz265pz3Svj X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 2a01:4f8:c17:6c4b::2 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-3.30 / 15.00]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-0.999]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net:c]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org,hardware@freebsd.org]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; DMARC_NA(0.00)[selasky.org]; RCPT_COUNT_THREE(0.00)[3]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On 10/4/22 12:03, Axel Rau wrote: > > > Am 04.10.2022 um 10:39 schrieb Hans Petter Selasky : >> >> That looks normal. >> >> The DONE transaction transferred the SETUP packet, but still lists frame [0], but is not dumping the data, because it has already been sent. frame [0] is always the SETUP packet for control endpoints. >> > > So where should I dig further to find out why the read at 09:28:44.885162 shows only > 'e:' from the string, shown completely at 09:28:47.463632 (2nd block) ? > > 09:28:44.878743 usbus1.3 SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=4,IVAL=0 > frame[0] WRITE 1 bytes > 0000 3F -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |? | > flags 0x8 > status 0xca023 > 09:28:44.878816 usbus1.3 DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 > frame[0] WRITE 1 bytes > flags 0x8 > status 0xca021 > 09:28:44.885162 usbus1.3 DONE-BULK-EP=00000081,SPD=FULL,NFR=1,SLEN=4,IVAL=0,ERR=0 > frame[0] READ 2 bytes > 0000 65 3A -- -- -- -- -- -- -- -- -- -- -- -- -- -- |e: | > flags 0xa > status 0xcb021 > 09:28:44.885176 usbus1.3 SUBM-BULK-EP=00000081,SPD=FULL,NFR=1,SLEN=0,IVAL=0 > frame[0] READ 1024 bytes > flags 0xa > status 0xeb023 > 09:28:44.888153 usbus1.3 DONE-BULK-EP=00000081,SPD=FULL,NFR=1,SLEN=24,IVAL=0,ERR=0 > frame[0] READ 24 bytes > 0000 31 31 35 32 30 30 20 62 69 74 2F 73 0D 0A 49 32 |115200 bit/s..I2| > 0010 43 2D 43 6C 6F 63 6B 3A -- -- -- -- -- -- -- -- |C-Clock: | > flags 0xa > > Here I get the right response: > > 09:28:47.457426 usbus1.3 SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=4,IVAL=0 > frame[0] WRITE 1 bytes > 0000 3F -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |? | > flags 0x8 > status 0xca023 > 09:28:47.457462 usbus1.3 DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 > frame[0] WRITE 1 bytes > flags 0x8 > status 0xca021 > 09:28:47.463632 usbus1.3 DONE-BULK-EP=00000081,SPD=FULL,NFR=1,SLEN=68,IVAL=0,ERR=0 > frame[0] READ 66 bytes > 0000 0D 0A 45 4C 56 20 55 53 42 2D 49 32 43 2D 49 6E |..ELV USB-I2C-In| > 0010 74 65 72 66 61 63 65 20 76 31 2E 38 20 28 43 61 |terface v1.8 (Ca| > 0020 6C 3A 35 43 29 0D 0A 4C 61 73 74 20 41 64 72 65 |l:5C)..Last Adre| > 0030 73 73 3A 30 78 30 30 0D 0A 42 61 75 64 72 61 74 |ss:0x00..Baudrat| > 0040 65 3A -- -- -- -- -- -- -- -- -- -- -- -- -- -- |e: | > flags 0xa > status 0xeb021 > 09:28:47.463644 usbus1.3 SUBM-BULK-EP=00000081,SPD=FULL,NFR=1,SLEN=0,IVAL=0 > frame[0] READ 1024 bytes > flags 0xa > status 0xcb023 > > Axel > --- > PGP-Key: CDE74120 ☀ computing @ chaos claudius >> > > > --- > PGP-Key: CDE74120 ☀ computing @ chaos claudius > Did you clear the endpoint halt condition (for RX BULK endpoint and TX BULK endpoint), to reset the so-called USB data-toggle, before starting to communicate with the device? Else you risk loosing a USB packet? --HPS