Questions tagged [usb]

Universal Serial Bus (USB) establishes a connection between devices and a host computer.

Filter by
Sorted by
Tagged with
67
votes
5answers
407k views

command to determine ports of a device (like /dev/ttyUSB0)

I have a question regarding the ports in Linux. If I connect my device via USB and want to check its port I can't do it using the command lsusb, which only specifies bus number and device number on ...
61
votes
8answers
96k views

How to reconnect a logically disconnected USB device?

It is possible for a USB storage device to become logically disconnected: the device is still plugged in, but is invisible from the operating system (e.g. it's not listed under /proc/bus/usb). Maybe ...
58
votes
7answers
124k views

How to bind USB device under a static name?

I have an Arduino which sometimes gets bound to /dev/ttyUSB0 and other times to /dev/ttyUSB1, making my script fail. I do not want to enumerate all the possibilities of where my device could be, but ...
45
votes
3answers
101k views

How to disable USB autosuspend on kernel 3.7.10 or above?

I've updated my HTPC from kernel 3.7.10 to 3.10.7 and it seems CONFIG_USB_SUSPEND is now gone from the kernel options and included in PM. The main problem I'm facing is that I have an external HDD ...
44
votes
2answers
102k views

How to run custom scripts upon USB device plug-in?

What is the state-of-the-art method for automatically executing custom scripts upon USB device plug-in under current Linux distributions like Debian/CentOS/Fedora? For example if you want to ...
42
votes
3answers
152k views

How to automatically mount an USB device on plugin-time on an already running system?

I know how to use /etc/fstab to automatically mount devices on boot or when doing sudo mount -a, which works perfectly fine. For example, here is my current line for my device UUID=B864-497A /media/...
41
votes
1answer
175k views

How to read/write to tty* device?

I have a device that sends information over USB to my computer. Arch Linux sets up this device by creating a file named ttyUSB0 in /dev/. I have been using GTKterm to receive this incoming information ...
41
votes
4answers
137k views

How can I enable access to USB devices within VirtualBox guests?

I cannot see any USB devices within my VirtualBox guest VMs from my host. How do I enable access for my guest VMs?               &...
40
votes
3answers
39k views

Gnome, nautilus copy files to USB stops at 100% or near

I had similar issues before but i don't remember how i solved it. When i try to copy something to USB stick, with FAT, it stops near the end, sometimes at 100%. And of course, when i transfer the ...
38
votes
5answers
43k views

Get power consumption of a USB device

Is there a way to check how much power a USB device requires? Why do I need this? I need to connect an LTE USB stick to my Raspberry Pi, and don't know how much power it needs. We got it quite ...
37
votes
18answers
155k views

How do I transfer files between Android and Linux over USB?

I want to copy some movie files from Linux to my HTC One SV Android phone (not rooted). In Windows, my phone mount its internal and SD-card volumes automatically when I plug it in, allowing me to ...
36
votes
3answers
102k views

Turning off power to usb port. Or turn off power to entire usb subsystem

I have a usb lamp which I specifically bought in order to turn it off programmatically at a certain time, thus I need to remove the power to its usb port. I believe I have a usb-hub at usb6. The lamp ...
34
votes
8answers
141k views

Why is USB not working in Linux when it works in UEFI/BIOS?

For background I have just built a new machine with modern hardware including: AMD FX-8350 Gigabyte GA-990FXA-UD3 motherboard 16GB RAM NVidia GTX 650 Ti Kingston SSD Given that, I tried to install ...
34
votes
1answer
49k views

How to assign USB driver to device

This question is two-fold: First, how do you manually detach a driver from a USB device and attach a different one? For example, I have a device that when connected automatically uses the usb-...
30
votes
6answers
26k views

Is USB-to-USB data transfer between two Linux OSes possible?

I want to create a USB-to-USB data transfer system in Linux (preferably Ubuntu). For this I want to use no external hardware or switch (except this cable). It's going to be like mounting a USB drive ...
30
votes
4answers
56k views

Installing Grub 2 on a USB flash drive

MultiBootISOs is a tool that let you install Grub on a USB flash drive. I really like it because it lets me boot from ISO files and let me put a bunch of ISOs on my USB and choose which one to boot. ...
29
votes
6answers
60k views

Make a computer act as a virtual USB device for other equipments

Some applications simulate a virtual USB or CD Rom drive as if a USB drive is attached to the computer. Is there any configuration or application that provides a virtual USB drive, not for the the ...
29
votes
1answer
43k views

How to use Linux kernel driver bind/unbind interface for USB-HID devices?

First background. I am developing a driver for Logitech game-panel devices. It's a keyboard with a screen on it. The driver is working nicely but by default the device is handled by HID. In order to ...
28
votes
3answers
29k views

How to re-mount a USB stick after unmounting from Nautilus without disconnecting it?

I find that in order to re-mount a USB stick, I have to physically disconnect it, and then re-connect it. How can I do this without such tiring physical action?
26
votes
3answers
3k views

How to safely insert USB stick/device to Linux computer?

When inserting a USB stick or device to computer, there is always the risk that the device is malicious, will act as an HID and potentially do some damage on the computer. How can I prevent this ...
26
votes
3answers
38k views

Connection problem with USB3 external storage on Linux (UAS driver problem)

On Ubuntu 15.10, when I want to format using the NTFS file system an external 4TO disk connected by USB3 (on a StarTech USB/eSATA hard disk dock), I have a lot of I/O errors, and the format fails. I ...
25
votes
5answers
87k views

How to match a ttyUSBX device to a usb serial device

option driver correctly matched USB ID and loads driver for this device. For example # lsusb Bus 001 Device 002: ID 19d2:0031 ONDA Communication S.p.A. ZTE MF636 Bus 001 Device 003: ID 12d1:14ac ...
24
votes
3answers
52k views

Mounting USB drive that is not recognized

Using Arch Linux / XFCE, I frequently have problems with USB drives that are not properly mounted. Sometimes they automatically show up in Thunar and I can mount them with one click. However, at other ...
23
votes
1answer
20k views

How USB bus number and device number been assigned?

When using lsusb, I realize that the bus number and device number of a USB device can change from time to time. From what I understand, the bus number can change on every reboot. The device number ...
23
votes
2answers
17k views

What happens when a USB drive is plugged in?

What is the flow of USB events from kernel space to user space? I get a popup on my desktop when I plug in a USB drive -- what is the sequence of events that leads from detecting the new USB drive to ...
22
votes
3answers
36k views

How to interpret the output of 'lsusb' — What are all these Linux Foundation root hubs?

I recently found out about the lsusb command while troubleshooting a headset issue.. My laptop runs debian and doesn't have anything plugged into USB currently, but when I run the "lsusb" command, I ...
22
votes
3answers
40k views

Disconnect and reconnect USB port via cli

I have a mouse that will stop working randomly. The solution is easy, unplug and replug. Is there a way I can do this via the command line though? Doing via command line has a few advantages. Doesn't ...
21
votes
3answers
37k views

Attaching USB-Serial device with custom PID to ttyUSB0 on embedded

I'm attempting to get an FTDI USB-Serial device with a custom PID to automatically (or even manually) attach to ttyUSB%n, without much success. The device's normal VID/PID is 0403/6001. When ...
20
votes
2answers
37k views

Which USB slot is 2.0 or 3.0? How do I know?

I would like to know if my desktop computer supports USB 3.0, but from the output below this seems unlikely. I get the following output from lspci: root@liv-HP-Compaq-dc7900:/home/liv# lspci -v | ...
20
votes
6answers
26k views

USB performance/traffic monitor?

First of all, I found a similar question but it doesn't really solve my problem. I am trying to discover if the USB bus for a device I am using is the bottleneck in my program. How can I monitor a ...
20
votes
3answers
16k views

Best practice to backup a LUKS encrypted device

What's the fastest method to backup and restore a luks encrypted device (e.g. a full encrypted usb-device to a image-file). The usb-device can be decrypted/accessed. I'm looking for a solution to ...
19
votes
1answer
42k views

How to get UUID for a USB drive?

I want to mount my USB to a mount point which holds the UUID name. But I don't know how to express this in a command line! Can someone help me how to do it? I have searched and found that I have to ...
18
votes
2answers
6k views

How to auto mount / permanently mount external devices on NixOS

I have a USB stick and an NTFS hard drive partition that I'd want to use in NixOS. On some other distribution, I'd mount it using ntfs-3g in /mnt. But on NixOS, the directory doesn't exist; I suppose ...
18
votes
3answers
4k views

How should I configure grub for booting linux kernel from a USB hard drive?

I have a laptop hard drive in an external enclosure which I use as a large pendrive. For an added twist, I have installed Linux on it, so I can boot any machine with my distribution of choice (e.g. ...
18
votes
5answers
50k views

minicom showing offline

I am trying to use minicom in Ubuntu. To do this I first connect my USB to DB9 converter, then I type this command on terminal dmesg | grep tty to check if my USB to DB9 converter is connected ...
16
votes
2answers
51k views

Qemu USB passthrough (windows guest)

I have a USB ADC/DAC and a HASP protected proprietary data acquisition system for it, both of which do not work in linux. I am trying to make it work in Windows virtual machine using qemu. Here are ...
16
votes
2answers
12k views

How to distinguish input from different keyboards?

I want to write an application in Python that you can use with your default keyboard and a specially designed one for the application. I will design it simply by using a small numerical keyboard with ...
15
votes
2answers
13k views

Is it possible for a daemon (i.e. background) process to look for key-presses from a USB keyboard?

I'm working on an embedded Linux project where I will be developing a program that will run automatically on bootup and interact with the user via a character display and some sort of button array. ...
15
votes
3answers
23k views

how to disable USB devices based on vendor id in Linux environment?

I want to disable usb devices based on vendor id in Linux environment. I want to allow only specific USB devices, based on vendor id.
15
votes
1answer
31k views

Can I pass through a USB Port via qemu Command Line?

I'm launching a VM using qemu-system-x86_64. I know two ways to pass through a USB device. Say for example, I had a mouse that showed up in lsusb like Bus 003 Device 011: ID 6ade:9582 Amazing Mouse ...
15
votes
5answers
24k views

When installing linux on USB Drive, which filesystem should I use to format for best performance?

I'm planning on installing Linux on a USB drive, and I was wondering which filesystem I should use to format the drive for best performance (overall responsiveness), and life of the drive?
15
votes
4answers
14k views

Media changed: please insert the disk labeled 'Debian GNU/Linux

I installed Debian 7 using a USB flash drive "burned" from the first DVD ISO of the Debian installation CD/DVD. I did a very minimal install without Debian desktop environment, Print server and ...
14
votes
5answers
52k views

Why does “cat ttyUSB0” not produce output?

I connected an infrared receiver to a USB port ... (the last line of dmesg tells device file) $ dmesg [10496.596063] usb 7-2: new full-speed USB device number 2 using uhci_hcd [10496.751112] usb 7-2: ...
13
votes
3answers
28k views

Is my USB 2.0 device running at full speed?

How can I tell if my USB flash drive is running at full USB 2.0 speed? Currently I'd just like to verify that the drive is plugged into a 480 Mbps port, but in the past I've been unsure if a given ...
13
votes
3answers
32k views

How to make bootable Debian USB on mac?

Their approach https://wiki.debian.org/InstallingDebianOn/Apple/MacBookAir/3-2 does not work(everything goes fine but usb does not become bootable). It also seems seems several years old and outdated....
13
votes
3answers
33k views

USB to VGA on Linux

I've been offered a Macbook Pro mid-2012. Although it wouldn't have been my first choice it's still a great piece of hardware, only problem for me is that it only has a single Thunderbolt port ...
13
votes
4answers
6k views

If I connect a physical device, how can I ever know which device file belongs to it?

Say I plug in several USB drives which don't get automatically mounted. How can I find out which device file belongs to which physical device, so I can mount it for example? I'm running Mac OS X but ...
13
votes
5answers
60k views

How to install Debian from USB? (Using full size image not netinstall)

I learned of a way to install Debian from USB using the netinstall image, which is fine. However it means I have to spend hours and hours downloading packages to do the install. Is there a way I can ...
13
votes
3answers
23k views

bluetooth mouse disconnects

I'm using Debian Jessie (testing). I have a bluetooth mouse (Microsoft Sculpt Comfort) and I can pair it and use it ok, but after some time of inactivity (around 10 minutes) it stops working, I have ...
13
votes
2answers
20k views

Why doesn't this udev rule trigger upon removal of the device?

I have two mice, one which has an issue where the middle mouse button and button6 get triggered simultaneously. So I configured my ~/.Xmodmap to disable this button. At the same time, however, I ...

1
2 3 4 5
36