From owner-freebsd-usb@freebsd.org Tue Sep 19 16:15:45 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8919CE1B34A for ; Tue, 19 Sep 2017 16:15:45 +0000 (UTC) (envelope-from mandrews@bit0.com) Received: from bit0.com (chunkhead.bit0.com [IPv6:2600:1f16:25b:8032:362b:314d:48b4:975d]) (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 5031E1C5A for ; Tue, 19 Sep 2017 16:15:45 +0000 (UTC) (envelope-from mandrews@bit0.com) Received: from chunkhead.bit0.com (localhost [127.0.0.1]) by bit0.com (Postfix) with ESMTP id 67139D8D5; Tue, 19 Sep 2017 12:15:37 -0400 (EDT) X-Virus-Scanned: amavisd-new at bit0.com Received: from bit0.com ([127.0.0.1]) by chunkhead.bit0.com (chunkhead.bit0.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SBnDOrhPYKP3; Tue, 19 Sep 2017 12:15:33 -0400 (EDT) Received: from [2607:fcc8:bd52:1800:225:90ff:fed1:89d2] (unknown [IPv6:2607:fcc8:bd52:1800:225:90ff:fed1:89d2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bit0.com (Postfix) with ESMTPSA; Tue, 19 Sep 2017 12:15:32 -0400 (EDT) Date: Tue, 19 Sep 2017 12:15:32 -0400 (EDT) From: Mike Andrews X-X-Sender: mandrews@beast.int.bit0.com To: Hans Petter Selasky cc: freebsd-usb@freebsd.org Subject: Re: umodem0, Cisco USB serial console, and quirks In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (BSF 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 16:15:45 -0000 On Tue, 19 Sep 2017, Hans Petter Selasky wrote: > On 09/19/17 16:22, Mike Andrews wrote: >> I'm trying to get the USB console of a Cisco ASA 5506-X firewall (not >> terribly obscure hardware) talking to FreeBSD, and having some trouble. The >> relevant dmesg at probe time is: >> >> umodem0 on uhub7 >> umodem0: on >> usbus4 >> umodem0: data interface 1, has no CM over data, has no break >> >> ...and /dev/cuaU2 is created, and I can connect to it using cu, but then >> nothing happens. As in, hitting enter to get a prompt just sits there. >> (cuaU1 and cuaU0 are a separate two-port USB serial adapter and that one >> works fine, it's using uftdi instead of umodem...) >> >> The "has no CM over data" looks worrying. I attempted to add a quirk, but >> either it isn't working or I didn't do it right. In /boot/loader.conf I >> tried: >> > > Hi, > > Try using usbdump to figure out what is going on. > > usbdump -i usbusX -f Y -s 65536 -vvv > > X and Y are the numbers in ugenX.Y printed in dmesg. > > It will dump all low level communication with the firewall. Maybe it needs > some special character escaping to respond, or maybe it needs to set the RTS > CTS bits. OK, here's a dump while running "cu -s 9600 -l /dev/cuaU2", hitting return about a dozen times, and then ~. to quit. I'm not sure how to interpret this as I'm not familiar with USB stack innards. (I'm more of a tcpdump guy.) Oh, and I suck for not mentioning that this is FreeBSD 11.1-p1 amd64. On macOS the same cu command (for /dev/cu.usbmodem1411) works fine without any other magic. I don't know where their equivalent of usbdump is, unless it's buried in Xcode somewhere. I can give Ubuntu a shot too, once I dust that hardware off and power it up... # usbdump -i usbus4 -f 3 -s 65536 -vvv 12:03:37.726789 usbus4.3 SUBM-CTRL-EP=00000000,SPD=FULL,NFR=1,SLEN=8,IVAL=0 frame[0] WRITE 8 bytes 0000 21 22 03 00 00 00 00 00 -- -- -- -- -- -- -- -- |!"...... | flags 0x10 status 0xee1a3 12:03:37.726815 usbus4.3 SUBM-INTR-EP=00000081,SPD=FULL,NFR=1,SLEN=0,IVAL=2 frame[0] READ 8 bytes flags 0x8a status 0xcf023 12:03:37.726830 usbus4.3 SUBM-BULK-EP=00000082,SPD=FULL,NFR=1,SLEN=0,IVAL=0 frame[0] READ 1024 bytes flags 0xa status 0xcf023 12:03:37.729716 usbus4.3 DONE-CTRL-EP=00000000,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 8 bytes flags 0x10 status 0xce1a1 12:03:37.729785 usbus4.3 SUBM-CTRL-EP=00000000,SPD=FULL,NFR=1,SLEN=8,IVAL=0 frame[0] WRITE 8 bytes 0000 21 22 03 00 00 00 00 00 -- -- -- -- -- -- -- -- |!"...... | flags 0x10 status 0xce1a3 12:03:37.732696 usbus4.3 DONE-CTRL-EP=00000000,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 8 bytes flags 0x10 status 0xee1a1 12:03:37.732753 usbus4.3 SUBM-CTRL-EP=00000000,SPD=FULL,NFR=2,SLEN=16,IVAL=0 frame[0] WRITE 8 bytes 0000 21 20 00 00 00 00 07 00 -- -- -- -- -- -- -- -- |! ...... | frame[1] WRITE 7 bytes 0000 80 25 00 00 00 00 08 -- -- -- -- -- -- -- -- -- |.%..... | flags 0x10 status 0xee1a3 12:03:37.736700 usbus4.3 DONE-CTRL-EP=00000000,SPD=FULL,NFR=2,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 8 bytes frame[1] WRITE 7 bytes flags 0x10 status 0xce1a1 12:03:37.840679 usbus4.3 SUBM-CTRL-EP=00000000,SPD=FULL,NFR=2,SLEN=16,IVAL=0 frame[0] WRITE 8 bytes 0000 21 20 00 00 00 00 07 00 -- -- -- -- -- -- -- -- |! ...... | frame[1] WRITE 7 bytes 0000 80 25 00 00 00 00 08 -- -- -- -- -- -- -- -- -- |.%..... | flags 0x10 status 0xce1a3 12:03:37.844696 usbus4.3 DONE-CTRL-EP=00000000,SPD=FULL,NFR=2,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 8 bytes frame[1] WRITE 7 bytes flags 0x10 status 0xee1a1 12:03:47.719626 usbus4.3 SUBM-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=4,IVAL=0 frame[0] WRITE 1 bytes 0000 0D -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |. | flags 0x9 status 0xce023 12:03:47.720517 usbus4.3 DONE-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 1 bytes flags 0x9 status 0xee021 12:03:48.425798 usbus4.3 SUBM-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=4,IVAL=0 frame[0] WRITE 1 bytes 0000 0D -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |. | flags 0x9 status 0xee023 12:03:48.426504 usbus4.3 DONE-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 1 bytes flags 0x9 status 0xce021 12:03:48.959494 usbus4.3 SUBM-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=4,IVAL=0 frame[0] WRITE 1 bytes 0000 0D -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |. | flags 0x9 status 0xce023 12:03:48.960496 usbus4.3 DONE-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 1 bytes flags 0x9 status 0xee021 12:03:49.299515 usbus4.3 SUBM-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=4,IVAL=0 frame[0] WRITE 1 bytes 0000 0D -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |. | flags 0x9 status 0xee023 12:03:49.300487 usbus4.3 DONE-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 1 bytes flags 0x9 status 0xce021 12:03:49.597312 usbus4.3 SUBM-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=4,IVAL=0 frame[0] WRITE 1 bytes 0000 0D -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |. | flags 0x9 status 0xce023 12:03:49.597483 usbus4.3 DONE-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 1 bytes flags 0x9 status 0xee021 12:03:49.851622 usbus4.3 SUBM-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=4,IVAL=0 frame[0] WRITE 1 bytes 0000 0D -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |. | flags 0x9 status 0xee023 12:03:49.852480 usbus4.3 DONE-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 1 bytes flags 0x9 status 0xce021 12:03:50.096901 usbus4.3 SUBM-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=4,IVAL=0 frame[0] WRITE 1 bytes 0000 0D -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |. | flags 0x9 status 0xce023 12:03:50.097474 usbus4.3 DONE-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 1 bytes flags 0x9 status 0xee021 12:03:50.319320 usbus4.3 SUBM-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=4,IVAL=0 frame[0] WRITE 1 bytes 0000 0D -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |. | flags 0x9 status 0xee023 12:03:50.319467 usbus4.3 DONE-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 1 bytes flags 0x9 status 0xce021 12:03:50.552389 usbus4.3 SUBM-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=4,IVAL=0 frame[0] WRITE 1 bytes 0000 0D -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |. | flags 0x9 status 0xce023 12:03:50.553461 usbus4.3 DONE-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 1 bytes flags 0x9 status 0xee021 12:03:50.779360 usbus4.3 SUBM-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=4,IVAL=0 frame[0] WRITE 1 bytes 0000 0D -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |. | flags 0x9 status 0xee023 12:03:50.780465 usbus4.3 DONE-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 1 bytes flags 0x9 status 0xce021 12:03:58.786897 usbus4.3 SUBM-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=4,IVAL=0 frame[0] WRITE 1 bytes 0000 7E -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |~ | flags 0x9 status 0xce023 12:03:58.787329 usbus4.3 DONE-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 1 bytes flags 0x9 status 0xee021 12:03:59.049172 usbus4.3 SUBM-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=4,IVAL=0 frame[0] WRITE 1 bytes 0000 2E -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |. | flags 0x9 status 0xee023 12:03:59.049332 usbus4.3 DONE-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 1 bytes flags 0x9 status 0xce021 12:04:00.224458 usbus4.3 SUBM-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=4,IVAL=0 frame[0] WRITE 1 bytes 0000 0D -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |. | flags 0x9 status 0xce023 12:04:00.225314 usbus4.3 DONE-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 1 bytes flags 0x9 status 0xee021 12:04:01.464189 usbus4.3 SUBM-CTRL-EP=00000000,SPD=FULL,NFR=1,SLEN=8,IVAL=0 frame[0] WRITE 8 bytes 0000 21 22 02 00 00 00 00 00 -- -- -- -- -- -- -- -- |!"...... | flags 0x10 status 0xee1a3 12:04:01.466301 usbus4.3 DONE-CTRL-EP=00000000,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 8 bytes flags 0x10 status 0xce1a1 12:04:01.466346 usbus4.3 SUBM-CTRL-EP=00000000,SPD=FULL,NFR=1,SLEN=8,IVAL=0 frame[0] WRITE 8 bytes 0000 21 22 02 00 00 00 00 00 -- -- -- -- -- -- -- -- |!"...... | flags 0x10 status 0xce1a3 12:04:01.469281 usbus4.3 DONE-CTRL-EP=00000000,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 8 bytes flags 0x10 status 0xee1a1 12:04:01.472549 usbus4.3 DONE-BULK-EP=00000082,SPD=FULL,NFR=0,SLEN=0,IVAL=0,ERR=CANCELLED flags 0xa status 0xaf00c 12:04:01.472556 usbus4.3 DONE-INTR-EP=00000081,SPD=FULL,NFR=0,SLEN=0,IVAL=2,ERR=CANCELLED flags 0x8a status 0xaf00c ^C 42 packets captured 13020 packets received by filter 0 packets dropped by kernel