Date: Mon, 01 Jun 2020 09:28:25 -0600 From: Ian Lepore <ian@freebsd.org> To: Tomasz CEDRO <tomek@cedro.info>, Hans Petter Selasky <hps@selasky.org> Cc: "freebsd-usb@FreeBSD.org" <freebsd-usb@freebsd.org> Subject: Re: arduino usb/com port issue Message-ID: <351ed893885670e21e2cf66c2afc8b637f1c517a.camel@freebsd.org> In-Reply-To: <CAM8r67Cx9DJ8EHGYmWiZVG_UOBdeyzJWdNKfxz-z_2pzbaAbmA@mail.gmail.com> References: <59da59d9-f0f0-0b30-f112-1c0af5f5399f@dreamchaser.org> <e17b8319-69c1-de73-678e-b7c9572da927@selasky.org> <CAM8r67Cx9DJ8EHGYmWiZVG_UOBdeyzJWdNKfxz-z_2pzbaAbmA@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
On Sun, 2020-05-31 at 22:11 +0200, Tomasz CEDRO wrote: > On Sun, May 31, 2020 at 7:54 PM Hans Petter Selasky wrote: > > > > [...] > > I use MINICOM as the Terminal emulator. Type Ctrl+A then Z for command > menu. Note that you will have to create a configuration for a given > port in the first place (as root type `minicom -s /dev/cuaU0` set > valid port name and parameters then save as the default configuration > for that port). > You can use cu(1) from the base system for that. To connect to the first usb-serial at speed 115,200 use: cu -l cuaU0 -s 115200 To disconnect, use the key sequence <CR> ~ ^D > In general on FreeBSD COM port over USB (aka Virtual-COM-Port) is > handled by `ucom` kernel module (type `kldstat` to list loaded kernel > modules), also it may use `umodem` or even `u3g` module. Those modules > are loaded by `devd` system daemon based on USB descriptors when you > plug a device. I just found a bug in pyOCD (Python module for ARM CPU > debug) that prevents running GDB Server when `ucom` module is loaded > for the VCP port on that board. pyOCD tries to unload the kernel > module by default to gain access to the VCP using LibUSB There should be no need to unload ucom to access the low-level usb device via libusb. I typically have anywhere from 5-8 usb-serial adapters connected at once, it would be crazy to unload ucom and lose access to all of them just to use one of them with libusb. It is important, however, to avoid accessing /dev/cuaU# or /dev/ttyU# at the same time that some application is using libusb (or libftdi) to access that same device. That would cause ucom and the work being done via libusb to conflict with each other. -- Ianhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?351ed893885670e21e2cf66c2afc8b637f1c517a.camel>
