Sponsored Content
Full Discussion: USB port events linstening
Top Forums Shell Programming and Scripting USB port events linstening Post 302964768 by manuhexadec on Tuesday 19th of January 2016 03:18:03 AM
Old 01-19-2016
USB port events linstening

Hi everybody! Smilie

I am a complete newbie. Smilie Is it possible to write a script (shell or python) to listen to usb port event and to notify me every time an usb storage key is plugged or ejected? I want it to echo the device to mount (eg. /dev/sdb).

I wrote an udev rule wich runs a script after usb plugging but I don't know how to get the right device interface(eg. /dev/sdb) attached to my usb device. Smilie

The second problem is, how to get the right device interface if I plugged two or more usb devices? I'm lost. Smilie Please, help me.

I'm working on a raspberry pi (without monitor).

Thanks.
 

10 More Discussions You Might Find Interesting

1. Solaris

network on solaris 10, through usb port...(urgent)

hi all, I have been trying to setup network on solaris10 from a long time but am unable to do so.. I tried it with the ethernet card i have(dfe -520tx) but since i was not able to find drivers for that particular device, i thought of using the usb mode to run network.. However am not able... (0 Replies)
Discussion started by: wrapster
0 Replies

2. AIX

How to connect PC's USB port to pSeries system?

Hello AIX Group Members, I have two systems: (1) IBM pSeries 640, 7026-B80. (2) A 5-month old HP laptop with Windows Vista. It has no serial port and only has USB ports on it. My question are: How can I use the laptop as the p640's terminal? How can I make the connection? What type of cable... (4 Replies)
Discussion started by: aixlover
4 Replies

3. UNIX for Dummies Questions & Answers

USB port is disabled using BIOS, I want to enable it

Hi, I have PC with Linux OS RHEL3 and USB port is disabled from BIOS. BIOS access is protected using password. But, I have root access. Now, how can I enable USB port using root access? Is there any trick that I can do using root access that can enable USB port once my PC has booted up? (3 Replies)
Discussion started by: gydave
3 Replies

4. UNIX for Advanced & Expert Users

how to watch the usb port

I want to watch the USB ports. If any device is connected to the USB port I want to take the name of the device and I want to log the device name. how to watch all the USB ports. How to find the device is connected in which usb port. (1 Reply)
Discussion started by: ungalnanban
1 Replies

5. Ubuntu

driver for external drive case on usb port

Hi I have to buy my selfe external case for hdd but I don't know whether my ubuntu linux, needs some driver to be able to work with this device or it has inside of itselfe this driver ? rhx for help. (1 Reply)
Discussion started by: presul
1 Replies

6. Hardware

Wireless router with USB port/longest battery life?

I'm looking for a router that has a USB port for my 3G internet card (which is USB) so that several cell phones can connect to the router for wifi internet during a trip with no power outlets except the occasional stop where I will be able to recharge once every 8-10 hours or so. Obviously I'm... (1 Reply)
Discussion started by: Emiles
1 Replies

7. UNIX for Dummies Questions & Answers

Restarting/Resetting a USB Port?

Hello All, So I have been running into an issue with a USB Modem where if someone ends their dialin connection abruptly from the other side the modem gets stuck and I found that the only way to fix it is to either unplug the USB Modem and plug it back in, or just reboot. I'd rather not reboot... (5 Replies)
Discussion started by: mrm5102
5 Replies

8. Solaris

Cabling and adapters to communicate to service processor serial port from Windows PC with USB port.

Hello, I have an unloaded T5140 machine and want to access the ILOM for the first time and subsequently the network port after that., and then load Solaris 10 the final January 2011 build. The first part is what confuses me -the cabling. I am coming from a Windows machine (w/appropriate... (5 Replies)
Discussion started by: joboy
5 Replies

9. Solaris

Solaris 11.2 does not assign serial port to 3g usb modem?

In ubuntu etopic i create this udev rules for prolink 3g usb modem: SUBSYSTEM=="block", SUBSYSTEM=="scsi", ATTRS{idVendor}=="1e0e", ATTRS{idProduct}=="f000", ACTION=="add", RUN+="/sbin/modprobe usbserial Vendor=0X1e0e Product=0Xf000" After plugging the usb modem, ubuntu assigns the ports... (4 Replies)
Discussion started by: shamsat
4 Replies

10. Linux

Connect from USB to serial port of switch

I have someone wanting to connect to the serial management port of a switch from a PC running CentOS6. The management port on the switch is apparently baud 9600, 8 data bits, 1 stop bit & no parity They have plugged in a cable to connect and the output from lsusb is:-Bus 001 Device 001: ID... (7 Replies)
Discussion started by: rbatte1
7 Replies
EHCI(4) 						   BSD Kernel Interfaces Manual 						   EHCI(4)

NAME
ehci -- USB Enhanced Host Controller driver SYNOPSIS
ehci* at cardbus? function ? ehci* at pci? dev ? function ? usb* at ehci? DESCRIPTION
The ehci driver provides support for the USB Enhanced Host Controller Interface, which is used by USB 2.0 controllers. EHCI controllers are peculiar in that they can only handle the USB 2.0 protocol. This means that they normally have one or more companion controllers (i.e., ohci(4) or uhci(4)) handling USB 1.x devices. Consequently each USB connector is electrically connected to two USB con- trollers. The handling of this is totally automatic, but can be noticed since USB 1.x and USB 2.0 devices plugged in to the same connector appear to connect to different USB busses. SEE ALSO
cardbus(4), ohci(4), pci(4), uhci(4), usb(4) HISTORY
The ehci driver appeared in NetBSD 1.6. BUGS
The support for hubs that are connected with high speed upstream and low or full speed downstream (i.e., for transaction translators) is lim- ited. BSD
Aug 10, 2008 BSD
All times are GMT -4. The time now is 02:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy