From nobody Tue Apr 18 19:11:33 2023 X-Original-To: freebsd-questions@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 4Q1D6z0fN9z45XQ3 for ; Tue, 18 Apr 2023 19:11:39 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Received: from nightmare.dreamchaser.org (ns.dreamchaser.org [66.109.141.57]) (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 RSA-PSS (2048 bits) client-digest SHA256) (Client CN "discoveriesinwood.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q1D6y1k5Gz419J for ; Tue, 18 Apr 2023 19:11:38 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Authentication-Results: mx1.freebsd.org; none Received: from [192.168.151.122] (breakaway [192.168.151.122]) by nightmare.dreamchaser.org (8.16.1/8.16.1) with ESMTP id 33IJBXeN008034; Tue, 18 Apr 2023 13:11:34 -0600 (MDT) (envelope-from freebsd@dreamchaser.org) Message-ID: <675fd143-24b1-c1d6-a871-5ae54ab238f4@dreamchaser.org> Date: Tue, 18 Apr 2023 12:11:33 -0700 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0 Reply-To: freebsd@dreamchaser.org Subject: Re: serial from usb port, cu using /dev/cuau0 Content-Language: en-US To: Souji Thenria , FreeBSD Mailing List References: <2a149c85-7aa3-c92c-0518-219d52971453@dreamchaser.org> From: Gary Aitken Cc: markmoellering@psyberation.com In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.4 (nightmare.dreamchaser.org [192.168.151.101]); Tue, 18 Apr 2023 13:11:34 -0600 (MDT) X-Rspamd-Queue-Id: 4Q1D6y1k5Gz419J X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:21947, ipnet:66.109.128.0/19, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4/18/23 07:05, Souji Thenria wrote: > On 4/18/23 14:32, Gary Aitken wrote: >> Assuming that actually happened, how does the system know which usb >> / serial port to use? >> > > Not sure if I understand your question correctly. But you specify the > serial device in your command in this part, '-l /dev/cuau0', and the > device ('/dev/cuau0) is created when you connect the USB-serial > converter. So, you are telling 'cu' what device to use for your > serial connection. A more careful inspection shows that cuau0 always exists for the fixed serial port on the mobo: # ls -lt /dev/cua* crw-rw---- 1 uucp dialer 0x45 Apr 18 08:19 /dev/cuau0 crw-rw---- 1 uucp dialer 0x46 Mar 25 08:27 /dev/cuau0.init crw-rw---- 1 uucp dialer 0x47 Mar 25 08:27 /dev/cuau0.lock And the generated one uses a capital 'U' instead of lowercase 'u': # ls -lt /dev/cua* crwxrwx--- 1 uucp operator 0xd7 Apr 18 12:55 /dev/cuaU0.lock crwxrwx--- 1 uucp operator 0xd6 Apr 18 12:55 /dev/cuaU0.init crwxrwx--- 1 uucp operator 0xd5 Apr 18 12:55 /dev/cuaU0 crw-rw---- 1 uucp dialer 0x45 Apr 18 08:19 /dev/cuau0 crw-rw---- 1 uucp dialer 0x46 Mar 25 08:27 /dev/cuau0.init crw-rw---- 1 uucp dialer 0x47 Mar 25 08:27 /dev/cuau0.lock At least *some* of the time I was doing the cu command before plugging in the cable; since cuau0 was the only one visible at that time, that's the only one I could use and what I tried to connect to. So I got a connection, but not to the cuaU0 created after plugging the cable in. On 4/18/23 08:41, Mark Moellering wrote: > I connect via serial to a firewall, and I discovered that it usually > comes up with a blank screen. > > The command I use is: cu -l cuaU0 -s 115200 > > If I hit enter, then the login prompt appears but otherwise, I , like > you, often see "connected", with an otherwise black screen and no > prompt. hope this helps. Thanks. If nothing is plugged in to the USB port and I use cuaU0, I get: # cu -h -t -s 9600 -l /dev/cuaU0 /dev/cuaU0: No such file or directory link down You sure you're not using cuau0 when that happens and have an on-board serial as well? Gary