How to detect USB device name without using any additional tools ?

Hi all,

Can anyone suggest a way to detect USB device name without using any additional packages. (I'm running a minimal kernel 2.4 & 2.6)

Awaiting for your replies

Thanks and Regards Sudhakar V

Reply to
Sudhakar Velusamy
Loading thread data ...

Is 'cat' considered a package? cat /proc/bus/usb/devices works fine for me.

regards,

-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Damion de Soto - Software Engineer email: snipped-for-privacy@snapgear.com SnapGear - A CyberGuard Company --- ph: +61 7 3435 2809 | Custom Embedded Solutions fax: +61 7 3891 3630 | and Security Appliances web:

formatting link
--- Free Embedded Linux Distro at
formatting link
---

Reply to
Damion de Soto

Hi Sato,

If I do a cat /proc/bus/usb/devices I get the following dump.

linux:~ # cat /proc/bus/usb/devices T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2 B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0 D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=0000 ProdID=0000 Rev= 0.00 C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=ffff ProdID=1300 Rev= 0.02 S: Manufacturer= S: Product=USB DISK Pro S: SerialNumber=574C1A000FE5 C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=200mA I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms

How to identify the device name from this.?

Whether it is /dev/sdb* or /dev/sda* or specifically sda1 or sda2 etc.

Regards Sudhakar V

Reply to
Sudhakar Velusamy

You can put a dmesg as soon as u put the USB device. and find out the device name.... mostly it would sda1 or so... checkout... the dmesg sudhakar :-).

Reply to
sivam
******************dmesg*****************************************************

Initializing USB Mass Storage driver... scsi0 : SCSI emulation for USB Mass Storage devices usbcore: registered new driver usb-storage USB Mass Storage support registered. usb-storage: device found at 3 usb-storage: waiting for device to settle before scanning Vendor: Generic Model: 2.0 Reader -0 Rev: 1.00 Type: Direct-Access ANSI SCSI revision: 00 usb-storage: device scan complete SCSI device sda: 990976 512-byte hdwr sectors (507 MB) sda: Write Protect is off sda: Mode Sense: 03 00 00 00 sda: assuming drive cache: write through SCSI device sda: 990976 512-byte hdwr sectors (507 MB) sda: Write Protect is off sda: Mode Sense: 03 00 00 00 sda: assuming drive cache: write through sda: sda1 Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0 FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!

*******************************dmesg********************************************

In this dmesg u cld see the device name and here in this case the device is sda1. Hope this helps u.

Reply to
sivam

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.