Questions tagged [usbserial]

This tag is used for software related questions about using USB-to-serial Bridges and Adapters. Hardware adapters attach a peripheral with a DB-9 or DB-25 connector to a USB connector on a PC or other host. Software or virtual adapters are drivers in the host which create a COM port interface to a USB connection allowing software to open the virtual COM port to a device attached to the USB connector.

USB-to-serial bridges/adapters were originally developed as a way to connect a USB device to a PC or host without USB ports. These adapters were an alternative to the legacy DB-9, RS-232 COM ports (usually referred to as simply a COM port), which were standard on older PCs when USB was first becoming available.

More recently, the COM port interface is being phased out of the PC industry in favor of USB. These adapters allow a user to connect a device requiring the legacy COM port to a desktop computer or laptop via one of its USB ports.

When connected the adapter appears on the computer as a Communications Device Class (CDC) USB device, more commonly known as a virtual COM port.

Some software applications designed to communicate with devices through a COM port may require a software virtual COM port driver to allow use with a USB connected device. In some cases such drivers must be installed and in some cases the operating system already has the drivers and when the device is connected, a virtual COM port will automatically be created.

An example of such an application is the Arduino IDE which is used to create a sketch for an Arduino or ESP32 microcontroller. The microcontroller is attached to the host with a USB cable which provides power to the device as well as a communications path. The user selects the virtual COM port created when the device is physically connected in order to download a program.

Generally speaking, a USB-to-serial bridge more specifically refers to the embedded technology, or microchip, within the hardware adapter that performs the actual logic and protocol translations between USB and generic asynchronous serial communication (UART or SCI).

475 questions
52
votes
6 answers

How to sniff a USB port under Windows?

From time to time, I need to dump USB traffic under Windows, mostly to support hardware under Linux, so my primary goal is to produce dump files for protocol analysis. For USB traffic, it seems that SniffUsb is the clear winner... It works under…
dpavlin
  • 1,372
  • 2
  • 9
  • 18
39
votes
13 answers

bypass android usb host permission confirmation dialog

I want to use android in industry, I can connect to Profilic and Ftdi USB to Serial chips with slickdevlabs.com library without any problem. The application has a service and it starts on boot,connect to the usb serial port and do the other…
AliRezza
  • 1,267
  • 3
  • 15
  • 26
38
votes
14 answers

How to programmatically unplug & replug an arbitrary USB device?

I'm trying to fix a non-responsive USB device that's masquerading as a virtual COM port. Manual replugging works, but there may be up to 12 of these units. Is there an API command to do the programmatic equivalent of the unplug/replug cycle?
Dean
35
votes
7 answers

"The semaphore timeout period has expired" error for USB connection

I'm getting this error... The semaphore timeout period has expired. On this line... ThePorts.ActivePort1.Open(); ...but I only get it from time to time. When it happens, it happens over and over again. Then the problem goes away, for hours or…
User.1
  • 2,562
  • 3
  • 33
  • 40
26
votes
3 answers

How to find out which USB-RS232 device is on which tty?

I have two different USB devices based on the same USB-RS232 chips. When I plug those in the USB they are mounted to /dev/ttyUSB0...3 My problem is how, inside a script, I can find out which one is on what tty? Using lsusb I can differentiate…
gabriel_agm
  • 513
  • 1
  • 4
  • 14
24
votes
1 answer

How to identify UNIQUELY a USB Device?

Is it possible to identify a USB device by a unique identifier like an Operating system has Mac-ID, Harddisk ID, Ethernet card ID has unique identifiers? I know one can easily change the volume serial number of USB partition or it could be changed…
highlander141
  • 1,683
  • 3
  • 23
  • 48
16
votes
3 answers

Retrieving buffer/packet/payload sizes for USB serial write transfer in userspace Linux C code

Apologies in advance I won't be able to accept an answer here immediately - just thought I'd like to jot this down, while I have the problem... In brief: I can observe three different buffer sizes, when I initiate a write to an usb-serial port using…
sdaau
  • 36,975
  • 46
  • 198
  • 278
14
votes
3 answers

SerialPort.BaseStream.ReadAsync drops or scrambles bytes when reading from a USB Serial Port

Edit: I've added the sending code and an example of the received output I'm getting. I am reading data from a USB "virtual" serial port connected to an embedded system. I have written two methods for receiving the data, one synchronous and one…
Craig.Feied
  • 2,617
  • 2
  • 16
  • 25
14
votes
3 answers

'screen /dev/ttyUSB0' with different options such as databit, parity, etc

I am trying to use screen /dev/ttyUSB0 to connect to a old computer(s) through a USB-serial interface. I have not figured out to put the correct options in my command line to get a non-gibberish feedback from my computer (the text received is all…
14
votes
2 answers

Unable to send input from USB to serially connected hardware using Minicom

I'm trying to communicate with my hardware board from a Ubuntu installed PC. I've used a USB to serial cable, and the serial cable is connected to the hardware and the USB is connected to the USB port of my desktop. I used minicom and it works well…
iMSivam
  • 151
  • 1
  • 1
  • 10
12
votes
3 answers

How to control a serial device on Android?

I want to develop an application whitch control the serial device over usb, on Linux Android. An Android OS is 3.1 that supports USB host. Q1: Please let me know how to get which port the serial device is mounted . I got likely USB device…
Kate G
  • 121
  • 1
  • 1
  • 4
12
votes
2 answers

Cannot set baud rate on USB serial port for Ubuntu 12.04

I just upgraded from Ubuntu 10.04 on a project that connects an embedded device through a USB serial port at 115,200 baud. After upgrading this, it did not work, but I rebooted and was able to connect. Since shutting down and restarting my system I…
user1835090
  • 161
  • 1
  • 1
  • 6
11
votes
2 answers

Android: RS232 Serial Communication with android device

I have a MR400s taximeter hardware. I want to communicate with this taximeter using RS232 cable and I have already achieved this connection and communication in windows. But I wanted to make connection using android device. How can I achieve…
ishan jain
  • 681
  • 3
  • 10
  • 27
10
votes
4 answers

USB Communication with Android/Arduino

I am working on this Android application that needs to communicate over USB. I have an Archos 101 Tablet (specifications here: http://www.archos.com/products/ta/archos_101it/specs.html?country=us&lang=en). It has a full USB host port. I can put a…
Spencer Lynn
  • 101
  • 1
  • 1
  • 3
10
votes
8 answers

How to get stable COM-ports for USB serial dongles in Windows XP?

I develop embedded systems and need serial ports for communication. In Windows XP the numbers for USB serial port dongles keep moving around, which makes it hard to use in scripts or makefiles (for example for flash programming NXP controllers via…
starblue
  • 55,348
  • 14
  • 97
  • 151
1
2 3
31 32