Red Hat General - usbmodules ?

This is Interesting: Free IT Magazines  
Home > Archive > Red Hat General > January 2004 > usbmodules ?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author usbmodules ?
citizenxxx

2004-01-23, 7:03 pm

Thanks in advance for any response...

I would like to know how to unplug/disable the usbdevice from redhat9
without physically unpluging it. The purpose of the is so my usb device,
which is a scanner, can be seen by vmware.

Is there a command that will do this?

The usbmodules command only has these args... Usage: usbmodules [--help]
[--device /proc/bus/usb/NNN/NNN] [--check module]
[--mapfile pathname] [--version]
Lists kernel modules corresponding to USB devices currently plugged into
the computer.
When I run ./usbmodules --device /proc/bus/usb/001/002 I get ... "scanner"
as the result.

The lsusb usage is the following...
usage: lsusb [-v] [-x] [-p <procpath>] [-s [<bus>:][<devnum>]] [-d
[<vendor>]:[<device>]]

here is a copy of my lsusb command... Bus 001 Device 002: ID 03f0:0405
Hewlett-Packard ScanJet 3400cse Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.00
bDeviceClass 0 Interface
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x03f0 Hewlett-Packard idProduct 0x0405
ScanJet 3400cse bcdDevice 0.00
iManufacturer 10 Hewlett-Packard iProduct 11
Hewlett-Packard ScanJet 3400C iSerial 12 CN08L1D0KVTG
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 39
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x40
Self Powered
MaxPower 48mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 16
bInterfaceSubClass 1
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type none
wMaxPacketSize 64
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type none
wMaxPacketSize 64
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type none
wMaxPacketSize 1
bInterval 8
Language IDs: (length=4)
0409 English(US)
Alexander Dalloz

2004-01-23, 7:03 pm

citizenxxx <nandrico@carolina.rr.com> wrote:
quote:

> Thanks in advance for any response...
>
> I would like to know how to unplug/disable the usbdevice from redhat9
> without physically unpluging it. The purpose of the is so my usb device,
> which is a scanner, can be seen by vmware.
>
> Is there a command that will do this?



[ snip ]

You can't do what you want. The USB standard does not support this
behaviour.

Alexander


--
Alexander Dalloz | Enger, Germany
PGP key valid: made 13.07.1999
PGP fingerprint: 2307 88FD 2D41 038E 7416 14CD E197 6E88 ED69 5653
Alexander Dalloz

2004-01-23, 7:03 pm

citizenxxx <nandrico@carolina.rr.com> wrote:
quote:

> Thanks in advance for any response...
>
> I would like to know how to unplug/disable the usbdevice from redhat9
> without physically unpluging it. The purpose of the is so my usb device,
> which is a scanner, can be seen by vmware.
>
> Is there a command that will do this?



[ snip ]

You can't do what you want. The USB standard does not support this
behaviour.

Alexander


--
Alexander Dalloz | Enger, Germany
PGP key valid: made 13.07.1999
PGP fingerprint: 2307 88FD 2D41 038E 7416 14CD E197 6E88 ED69 5653
SG

2004-01-23, 7:03 pm

On Wed, 1 Oct 2003, citizenxxx wrote:
quote:

> Thanks in advance for any response...
>
> I would like to know how to unplug/disable the usbdevice from redhat9
> without physically unpluging it. The purpose of the is so my usb device,
> which is a scanner, can be seen by vmware.
>
> Is there a command that will do this?
>


[snip]

Try the following:

as root: /sbin/rmmod scanner

Then select the usb device under "Device" in the vmware window.

HTH

SG.

citizenxxx

2004-01-23, 7:03 pm

On Wed, 01 Oct 2003 17:11:58 +0100, SG wrote:

Thanks SG it worked! perfectly!

Thanks again.

WOW

I'll pass this on to a few others that had this same problem.


quote:

> On Wed, 1 Oct 2003, citizenxxx wrote:
>
> [snip]
>
> Try the following:
>
> as root: /sbin/rmmod scanner
>
> Then select the usb device under "Device" in the vmware window.
>
> HTH
>
> SG.


SG

2004-01-23, 7:03 pm

On Wed, 1 Oct 2003, citizenxxx wrote:
quote:

> On Wed, 01 Oct 2003 17:11:58 +0100, SG wrote:
>
> Thanks SG it worked! perfectly!
>
> Thanks again.
>
> WOW
>
> I'll pass this on to a few others that had this same problem.
>
>
>
>
>


Glad that it worked. If you want to do the opposite, then just disconnect
from the vmware window (under "Device by selecting "none") and type

as root: /sbin/insmod scanner

and you should get control of the scanner in linux then.

HTH

SG.

citizenxxx

2004-01-23, 7:03 pm

> Glad that it worked. If you want to do the opposite, then just
quote:

> disconnect from the vmware window (under "Device by selecting "none")
> and type
>
> as root: /sbin/insmod scanner
>
> and you should get control of the scanner in linux then.
>
> HTH
>
> SG.


Thanks for the additional info. It's a win only hp scanner so I probably
won't need to ever give it back to linux.

But would this also work for usb hard drives or firewire hard drives?

Thanks
SG

2004-01-23, 7:03 pm

On Wed, 1 Oct 2003, citizenxxx wrote:
quote:

> Thanks in advance for any response...
>
> I would like to know how to unplug/disable the usbdevice from redhat9
> without physically unpluging it. The purpose of the is so my usb device,
> which is a scanner, can be seen by vmware.
>
> Is there a command that will do this?
>


[snip]

Try the following:

as root: /sbin/rmmod scanner

Then select the usb device under "Device" in the vmware window.

HTH

SG.

citizenxxx

2004-01-23, 7:03 pm

On Wed, 01 Oct 2003 17:11:58 +0100, SG wrote:

Thanks SG it worked! perfectly!

Thanks again.

WOW

I'll pass this on to a few others that had this same problem.


quote:

> On Wed, 1 Oct 2003, citizenxxx wrote:
>
> [snip]
>
> Try the following:
>
> as root: /sbin/rmmod scanner
>
> Then select the usb device under "Device" in the vmware window.
>
> HTH
>
> SG.


SG

2004-01-23, 7:03 pm

On Wed, 1 Oct 2003, citizenxxx wrote:
quote:

> On Wed, 01 Oct 2003 17:11:58 +0100, SG wrote:
>
> Thanks SG it worked! perfectly!
>
> Thanks again.
>
> WOW
>
> I'll pass this on to a few others that had this same problem.
>
>
>
>
>


Glad that it worked. If you want to do the opposite, then just disconnect
from the vmware window (under "Device by selecting "none") and type

as root: /sbin/insmod scanner

and you should get control of the scanner in linux then.

HTH

SG.

Lenard

2004-01-23, 7:03 pm

On Wed, 01 Oct 2003 18:01:21 +0000, citizenxxx typed:
quote:

> But would this also work for usb hard drives or firewire hard drives?



Most of the usb hard drives are seen as scsi devices in Linux. I'm not
sure about firewire hard drives, sorry.

So as root, figure out how the drive is seen with; cat /proc/scsi/scsi

Got this from one of the IBM Linux support pages a while ago. I don't
remember the URL, but here's the text that I grabbed.

One of the most useful things to learn as a system administrator is how to
add more disk space if you have hot-swap drives available to you, without
rebooting the system. Without using /proc, you could insert your drive,
but you would then have to reboot in order to get the system to recognize
the new disk. Here, you can get the system to recognize the new drive with
the following command:

echo "scsi add-single-device w x y z" > /proc/scsi/scsi

For this command to work properly, you must get the parameter values w, x,
y, and z correct, as follows:

* w is the host adapter ID, where the first adapter is zero (0)

* x is the SCSI channel on the host adaptor, where the first channel
is zero (0)

* y is the SCSI ID of the device

* z is the LUN number, where the first LUN is zero (0)

Once your disk has been added to the system, you can mount any previously
formatted filesystems or you can start formatting it, and so on. If you
are not sure about what device the disk will be, or you want to check any
pre-existing partitions, for example, you can use a command such as fdisk
-l, which will report this information back to you.

Conversely, the command to remove a device from your system without a
reboot would be:

echo "scsi remove-single-device w x y z" > /proc/scsi/scsi


--
SCO + RICO Act = Justice

citizenxxx

2004-01-23, 7:03 pm

> Glad that it worked. If you want to do the opposite, then just
quote:

> disconnect from the vmware window (under "Device by selecting "none")
> and type
>
> as root: /sbin/insmod scanner
>
> and you should get control of the scanner in linux then.
>
> HTH
>
> SG.


Thanks for the additional info. It's a win only hp scanner so I probably
won't need to ever give it back to linux.

But would this also work for usb hard drives or firewire hard drives?

Thanks
SG

2004-01-23, 7:03 pm

On Wed, 1 Oct 2003, citizenxxx wrote:
quote:

> But would this also work for usb hard drives or firewire hard drives?
>



TBH, I dont have much experience in using vmware, but AFAIR usb hard
drives and zip drives should work, provided you remove the appropriate
module...so for a usb drive it should be "usb-storage".

The last time I checked vmware, it didnt have firewire support, so I
am unable to help you there. Instead of working with vmware, I found it a
lot easier to network and run two separate PCs.

cheers

SG.

Lenard

2004-01-23, 7:03 pm

On Wed, 01 Oct 2003 18:01:21 +0000, citizenxxx typed:
quote:

> But would this also work for usb hard drives or firewire hard drives?



Most of the usb hard drives are seen as scsi devices in Linux. I'm not
sure about firewire hard drives, sorry.

So as root, figure out how the drive is seen with; cat /proc/scsi/scsi

Got this from one of the IBM Linux support pages a while ago. I don't
remember the URL, but here's the text that I grabbed.

One of the most useful things to learn as a system administrator is how to
add more disk space if you have hot-swap drives available to you, without
rebooting the system. Without using /proc, you could insert your drive,
but you would then have to reboot in order to get the system to recognize
the new disk. Here, you can get the system to recognize the new drive with
the following command:

echo "scsi add-single-device w x y z" > /proc/scsi/scsi

For this command to work properly, you must get the parameter values w, x,
y, and z correct, as follows:

* w is the host adapter ID, where the first adapter is zero (0)

* x is the SCSI channel on the host adaptor, where the first channel
is zero (0)

* y is the SCSI ID of the device

* z is the LUN number, where the first LUN is zero (0)

Once your disk has been added to the system, you can mount any previously
formatted filesystems or you can start formatting it, and so on. If you
are not sure about what device the disk will be, or you want to check any
pre-existing partitions, for example, you can use a command such as fdisk
-l, which will report this information back to you.

Conversely, the command to remove a device from your system without a
reboot would be:

echo "scsi remove-single-device w x y z" > /proc/scsi/scsi


--
SCO + RICO Act = Justice

SG

2004-01-23, 7:03 pm

On Wed, 1 Oct 2003, citizenxxx wrote:
quote:

> But would this also work for usb hard drives or firewire hard drives?
>



TBH, I dont have much experience in using vmware, but AFAIR usb hard
drives and zip drives should work, provided you remove the appropriate
module...so for a usb drive it should be "usb-storage".

The last time I checked vmware, it didnt have firewire support, so I
am unable to help you there. Instead of working with vmware, I found it a
lot easier to network and run two separate PCs.

cheers

SG.

Alexander Dalloz

2004-01-23, 7:06 pm

citizenxxx <nandrico@carolina.rr.com> wrote:
quote:

> Thanks in advance for any response...
>
> I would like to know how to unplug/disable the usbdevice from redhat9
> without physically unpluging it. The purpose of the is so my usb device,
> which is a scanner, can be seen by vmware.
>
> Is there a command that will do this?



[ snip ]

You can't do what you want. The USB standard does not support this
behaviour.

Alexander


--
Alexander Dalloz | Enger, Germany
PGP key valid: made 13.07.1999
PGP fingerprint: 2307 88FD 2D41 038E 7416 14CD E197 6E88 ED69 5653
citizenxxx

2004-01-23, 7:06 pm

On Wed, 01 Oct 2003 17:11:58 +0100, SG wrote:

Thanks SG it worked! perfectly!

Thanks again.

WOW

I'll pass this on to a few others that had this same problem.


quote:

> On Wed, 1 Oct 2003, citizenxxx wrote:
>
> [snip]
>
> Try the following:
>
> as root: /sbin/rmmod scanner
>
> Then select the usb device under "Device" in the vmware window.
>
> HTH
>
> SG.


SG

2004-01-23, 7:06 pm

On Wed, 1 Oct 2003, citizenxxx wrote:
quote:

> On Wed, 01 Oct 2003 17:11:58 +0100, SG wrote:
>
> Thanks SG it worked! perfectly!
>
> Thanks again.
>
> WOW
>
> I'll pass this on to a few others that had this same problem.
>
>
>
>
>


Glad that it worked. If you want to do the opposite, then just disconnect
from the vmware window (under "Device by selecting "none") and type

as root: /sbin/insmod scanner

and you should get control of the scanner in linux then.

HTH

SG.

Lenard

2004-01-23, 7:06 pm

On Wed, 01 Oct 2003 18:01:21 +0000, citizenxxx typed:
quote:

> But would this also work for usb hard drives or firewire hard drives?



Most of the usb hard drives are seen as scsi devices in Linux. I'm not
sure about firewire hard drives, sorry.

So as root, figure out how the drive is seen with; cat /proc/scsi/scsi

Got this from one of the IBM Linux support pages a while ago. I don't
remember the URL, but here's the text that I grabbed.

One of the most useful things to learn as a system administrator is how to
add more disk space if you have hot-swap drives available to you, without
rebooting the system. Without using /proc, you could insert your drive,
but you would then have to reboot in order to get the system to recognize
the new disk. Here, you can get the system to recognize the new drive with
the following command:

echo "scsi add-single-device w x y z" > /proc/scsi/scsi

For this command to work properly, you must get the parameter values w, x,
y, and z correct, as follows:

* w is the host adapter ID, where the first adapter is zero (0)

* x is the SCSI channel on the host adaptor, where the first channel
is zero (0)

* y is the SCSI ID of the device

* z is the LUN number, where the first LUN is zero (0)

Once your disk has been added to the system, you can mount any previously
formatted filesystems or you can start formatting it, and so on. If you
are not sure about what device the disk will be, or you want to check any
pre-existing partitions, for example, you can use a command such as fdisk
-l, which will report this information back to you.

Conversely, the command to remove a device from your system without a
reboot would be:

echo "scsi remove-single-device w x y z" > /proc/scsi/scsi


--
SCO + RICO Act = Justice

SG

2004-01-23, 7:06 pm

On Wed, 1 Oct 2003, citizenxxx wrote:
quote:

> But would this also work for usb hard drives or firewire hard drives?
>



TBH, I dont have much experience in using vmware, but AFAIR usb hard
drives and zip drives should work, provided you remove the appropriate
module...so for a usb drive it should be "usb-storage".

The last time I checked vmware, it didnt have firewire support, so I
am unable to help you there. Instead of working with vmware, I found it a
lot easier to network and run two separate PCs.

cheers

SG.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com