LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices



Reply
 
Search this Thread
Old 07-01-2010, 03:06 PM   #1
scmbg
Member
 
Registered: Oct 2008
Location: Mexico City
Distribution: Fedora
Posts: 65

Rep: Reputation: 15
How simulate unplug an re-plug of USB devices?


Hi.

After some tests I found that some USB Bluetooth Dongles errors, only are recoverable if the USB is unplugged an then plugged again.

Is there some way to simulate that a USB device is unplugged and re-plugged?

Thanks!
 
Old 07-01-2010, 03:24 PM   #2
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 248Reputation: 248Reputation: 248
As root, you could run
Code:
start_udev
This will "rediscover" the devices attached, but it may not reset the device itself.
 
Old 07-01-2010, 03:44 PM   #3
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,571
Blog Entries: 13

Rep: Reputation: 182Reputation: 182
If you find the solution, let me know... but I don't think it is a Linux problem per se, as I've observed the occasional need to physically unplug the device under Windows XP as well.
 
Old 07-01-2010, 05:32 PM   #4
scmbg
Member
 
Registered: Oct 2008
Location: Mexico City
Distribution: Fedora
Posts: 65

Original Poster
Rep: Reputation: 15
Yes, I also suspect that the problem is not Linux only, but the next test is try the simulation of un-plug and re-plug.

Thanks!

Let's try with udev.
 
Old 07-01-2010, 08:37 PM   #5
jefro
Guru
 
Registered: Mar 2008
Posts: 12,087

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
I think it is part to usb tools. I am not sure that is the correct package but there is a usb tool kit that I think includes what you'd need.
 
Old 07-02-2010, 11:20 AM   #6
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,616

Rep: Reputation: 585Reputation: 585Reputation: 585Reputation: 585Reputation: 585Reputation: 585
You won't accurately simulate an unplug - ever imho, because the chip will still see the impedance.
This became an issue for me when I had a box (around kernel2.6.19) which gave copious usb2 log spam. Someone on via hardware wrote a kernel patch that threw out what the usb controller chip was thinking. The (via) usb chip behaved differently if it had a device plugged in or not. This was my contribution to kernel development - required because I had the dodgiest box on the planet :-/. The end result was an option for ehci_hcd
ignore_oc=1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Detect USB and Printer Plug / Unplug C/C++ source haseit Linux - Newbie 1 01-19-2009 07:59 PM
USB errors durring boot. have to unplug keyboard, plug back in to use it to sign on agentc0re Slackware 5 03-17-2008 09:02 PM
USB plug & unplug JrLz Slackware 6 12-09-2004 09:07 AM
USB mouse works only if i unplug then re-plug it allelopath Linux - Hardware 3 11-20-2004 01:48 PM
usb wlan works but only after i unplug and plug triagladad Linux - Wireless Networking 0 09-21-2004 07:45 AM


All times are GMT -5. The time now is 06:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration