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
1
vote
1 answer

How to read data from usb device on Android?

I have a device which I need to connect via usb to my android phone. I simply want to read some data this device is sending and present it on my app screen. I've tried some API's such https://github.com/felHR85/UsbSerial and…
1
vote
2 answers

How to install linux usbserial kernel driver manually?

I have a ubuntu 16.04 LTS with kernel 4.4.0-148-generic host machine. I don't have serial dictionary in /lib/modules/4.4.0-148-generic/kernel/drivers/usb So i need to install it manually, but i can't find the source code and build document. Thanks…
Obsessive
  • 69
  • 2
  • 9
1
vote
0 answers

Why is the Serial communication via BLE failing on the first run of the code but working fine for consecutive runs?

I'm trying to communicate with the STM32 microcontroller via serial communication. Before I was using the USB cable and the communication worked flawlessly. However when I switched the same serial mode from USB to BLE (HM-10), the microcontroller…
1
vote
0 answers

Concat bytes array in vb.net

I am receiving data from serial port RS232 like [00000] continuously per 100 ms, but if i use usb to serial converter data is splitting into multiple parts if i append that in a text box i am getting output like [00000][00000][00000][00000][00000],…
1
vote
0 answers

Second read on serial port returns new line character in canonical mode

I am understanding Canonical Mode for serial port, read will only return until a new line character is met by the input queue. I connected two PL2303 USB to serial device (TX -> RX, RX->TX) Wrote two C Codes one for Receiving from /dev/ttyUSB0 and…
md.jamal
  • 4,067
  • 8
  • 45
  • 108
1
vote
1 answer

Is it possible to access a Chromebook via ssh through USB?

My employer has asked me to prepare for testing several thousand Chromebooks (mix of models/manufacturers) to refurb/flip. This may be a recurring thing. Most or all of these will be old enough that CCD will not be available. I'd like to connect a…
Crash Gordon
  • 159
  • 7
1
vote
1 answer

why it is costing longer than the first time to open USB2Serial port

I am testing the time cost of opening a USB2Serial port n Centos 7.4. But I found it cost about 7ms for the first time. But it cost much more time in the next opening. If I increase the sleep time, run again, it costs more time except for the first…
sqiang.bi
  • 11
  • 2
1
vote
2 answers

Store values greater than 127 in a byte array

I'm currently rewriting this python library for Dmx in Java. The python library creates a 518 array of values. DMXOPEN = chr(126) DMXCLOSE = chr(231) DMXINTENSITY = chr(6)+chr(1)+chr(2) DMXINIT1 =…
1
vote
1 answer

which function is responsible to receive data in linux "usbserial" driver?

I went through usb-serial.c, which is a source file in the usbserial module in the Linux kernel. I would like to implement some customization in this driver, e.g., blinking LED when a communication (Tx/Rx) happens. However, I am having trouble…
md.jamal
  • 4,067
  • 8
  • 45
  • 108
1
vote
1 answer

Reading RFID chip with python - getting the whole line at once

I'm trying to set up a program that reads an RFID chip with a RFID reader through a USB serial connection. With the following code, I can read the tag, but the result is returned as a single character on each line. import serial ser =…
Hjalte
  • 376
  • 5
  • 17
1
vote
0 answers

Failed to sequentially send command/response (in bytes) from android app to arduino (and vice versa) via USB-OTG

I want to make a project/android app that can transfer command to arduino and receives response from it via USB-OTG. The specifications are as follows : android app sends a command (in array of bytes) to arduino, arduino receives, and the command…
1
vote
1 answer

How to set Android USB in CDC mode as a device programatically?

I've implemented a USB Host CDC protocol structure on STM32L4 controller which I want to connect to an Android Phone. I want Android to run in Device Mode (Not in Host mode which UsbSerial library uses!) CDC class so that it's USB protocol Class…
1
vote
0 answers

Raspberry pi USB serial transmission

I have problem with to the raspberry's usb serial tx direction. I use npm's serialport software with node.js. If I plug the usb cable (max232) with windows to serialmonitor, I can see the hex code (what I send from raspberry). But when I plug the…
Jdoe
  • 21
  • 2
1
vote
0 answers

USB host mode. UsbDevice is always in status attached even when I dettached it

I'm making an application that communicate with a UsbDevice in USB host mode. I used the BroadcastReceiver to detect the connection, so when device attached, the communication begins and my app gets data from this UsbDevice, then it stops when…
Phạm Lam
  • 378
  • 1
  • 3
  • 14
1
vote
0 answers

Change characteristics of USB host mode programatically in android?

I'm working in serial communication project using USB in host mode device won't charge, found some unsafe solutions for this is like Type-c USB cord or OTG-Y connector. Another solution is rooting mobile and setting rp.usb_host = 0 what would…
Tigris
  • 86
  • 1
  • 10