Questions tagged [usb]

HARDWARE QUESTIONS ARE OFF-TOPIC. Consider https://superuser.com if you need USB hardware help. USB is an acronym for Universal Serial Bus, a standard for a serial host-to-device protocol defined by the USB Implementors Forum.

This tag should only be used for programming-related questions involving USB, and not hardware-related questions.

USB is an acronym for Universal Serial Bus, a standard for a serial host-to-device protocol defined by the USB Implementors Forum. Today, it is the most commonly used method for connecting computers to peripherals such as keyboards, printers, phones, and data storage devices.


Versions

  • USB 1 (Full Speed) -- Released in January 1996, USB 1 specified data rates of 1.5 Mbit/s (Low-Bandwidth) and 12 Mbit/s (Full-Bandwidth).
  • USB 2 (High Speed) -- USB 2.0: Released in April 2000. Added higher maximum signaling rate of 480 Mbit/s (effective throughput up to 35 MB/s or 280 Mbit/s) (now called "Hi-Speed").
  • USB 3 (Super Speed) -- USB 3.0 was released in November 2008. The standard claims a theoretical "maximum" transmission speed of up to 5 Gbit/s (625 MB/s).
  • USB 3.1 (Super Speed Plus) -- USB 3.1 was released in July 2013. The standard claims a theoretical "maximum" transmission speed of up to 10 Gbps
  • USB 3.2 (Dual lane Super Speed Plus) -- USB 3.2 was released in September 2017. The standard mainly adds dual lane support on top of USB 3.1. Dual lane can give up to 20 Gbps of speed i.e. 2x of USB 3.1

References


7960 questions
50
votes
11 answers

Working with USB devices in .NET

Using .Net (C#), how can you work with USB devices? How can you detect USB events (connections/disconnections) and how do you communicate with devices (read/write). Is there a native .Net solution to do this?
David Thibault
  • 8,638
  • 3
  • 37
  • 51
50
votes
1 answer

Linux (Ubuntu): safely remove a USB flash disk via the command line

It would just be cool if your shell script helps you to safely remove your flash disk after finishing its job. The solution is expected to meet the following needs: Suppose the flash disk is mounted as /media/A together with many other flash disks…
user1539634
47
votes
7 answers

Simple way to query connected USB devices info in Python?

How can we query connected USB devices info in Python? I want to get UID Device Name (ex: SonyEricsson W660), path to device (ex: /dev/ttyACM0) And also what would be the best Parameter out of above info to be used as identifying the device whenever…
DivinesLight
  • 2,398
  • 2
  • 24
  • 30
45
votes
3 answers

Multichannel USB recording with Java Sound API?

I'm trying to record/process some audio from three usb microphones with Java Sound on Snow Leopard (but can switch to Windows if it fixes things). Problem is, when I try to use the mixer that corresponds to the usb mic, Java Sound tells me that the…
Tom
  • 593
  • 4
  • 6
44
votes
2 answers

How to emulate USB devices?

The rest of my team will make for my application a simple non-standard USB microphone, but until they finish it I will have to emulate it, for integration testing purposes. Is there any risk in a physical loopback? Yes there is Will a physical…
Jader Dias
  • 88,211
  • 155
  • 421
  • 625
42
votes
4 answers

USB bulkTransfer between Android tablet and camera

I would like to exchange data/commands between a camera and an Android tablet device using the bulkTransfer function. I wrote this Activity, but the method bulkTransfer returns -1 (error status). Why does it return the error? public class…
cdr89
  • 958
  • 9
  • 18
40
votes
4 answers

Android USB Host - bulkTransfer() is losing data

I'm trying to receive data from a custom device based on an FTDI 2232H chip. I am using a simple Async FIFO mode, and the incoming data rate is 3.2MB/sec. Everything works perfectly with test code on my PC, but I'm having problems receiving data on…
Greg
  • 839
  • 8
  • 8
40
votes
3 answers

Can I control the architecture (32bit vs 64bit) when building a pyinstaller executable?

Short Question Is there any way to control / guarantee the architecture (32bit vs 64bit) when building a pyinstaller executable? Background I migrated from py2exe to pyinstaller because of the lack of 64bit support along with a host of small…
Adam Lewis
  • 7,017
  • 7
  • 44
  • 62
39
votes
3 answers

Android 3.1 USB-Host - BroadcastReceiver does not receive USB_DEVICE_ATTACHED

I worked through the description and samples for USB host at developer.android.com to detect attached and detached USB-devices. If I use an intent-filter in the manifest file to start my application when a device is attached, it works perfectly…
miffi
  • 391
  • 1
  • 3
  • 3
39
votes
2 answers

What's the difference between "COM", "USB", "Serial Port"?

I am confused about the these 3 concepts. My understanding is, Serial Port usually means RS-232 compatible port (RS = Recommended Standard). USB stands for Universal Serial Bus. So its name contains serial port, does it support RS-232? What does the…
smwikipedia
  • 61,609
  • 92
  • 309
  • 482
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
4 answers

How can I listen for 'usb device inserted' events in Linux, in Python?

I'd like to write a Python script for Amarok in Linux to automatically copy the stackoverflow podcast to my player. When I plug in the player, it would mount the drive, copy any pending podcasts, and eject the player. How can I listen for the…
joeforker
  • 40,459
  • 37
  • 151
  • 246
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
37
votes
4 answers

Connect USB device to Android Emulator?

We've been looking into Android 3.1+ and its ability to read/write to USB devices connected to the OTG/Host port. I've found some code examples that allow me to detect and read/write to a USB HID device, but at the moment, I simply don't have a…
Gavin
  • 6,284
  • 5
  • 30
  • 38
37
votes
1 answer

Android USB host mode "soft-mode" drivers for standard class-compliant USB devices

Now that the Android APIs support working directly with USB devices (since 3.1), I am curious if there has been any work to create "soft-mode" drivers for some of the more popular class-compliant devices (such as audio or HID). In other words, are…
Brad
  • 159,648
  • 54
  • 349
  • 530