View previous topic :: View next topic |
Author |
Message |
fuzzythebear Guru


Joined: 28 Nov 2004 Posts: 317
|
Posted: Sun Dec 23, 2007 11:36 pm Post subject: how to predict a /dev/entry for a USB device .. |
|
|
Well there's Christmas and it's load of new devices..
I got a cute one .. from the boss .. it's a leash .. but i like the
photo function in this v385 motorola phone.
BUT .. im in KDE and cant figure out the /dev entry i need to use
to make it work with kmobiletools
lsusb -v shows this :
Bus 002 Device 005: ID 22b8:2b44 Motorola PCS
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 255 Vendor Specific Class
bDeviceSubClass 255 Vendor Specific Subclass
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x22b8 Motorola PCS
idProduct 0x2b44
bcdDevice 0.01
iManufacturer 1 Motorola Inc.
iProduct 2 Motorola W385
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 62
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 3 Motorola Communication Interface
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 128
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 3 Motorola Communication Interface
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
....
lsusb -t
Bus# 2
`-Dev# 1 Vendor 0x0000 Product 0x0000
`-Dev# 5 Vendor 0x22b8 Product 0x2b44
bus 2 device 5 .. ok what's the USB /dev/* device name then ?
Wild guesses ?
Sure fire ways to know ?
Help locating the device will be appreciated.
Merry Christmas to all. _________________ There's this once i thought i had made a mistake .. but i was wrong  |
|
Back to top |
|
 |
smiffy Apprentice


Joined: 28 Jun 2006 Posts: 259 Location: SA.AU.AP.EARTH
|
Posted: Sun Dec 23, 2007 11:59 pm Post subject: |
|
|
Haven't got time at the moment to work out a full answer for you, but I believe that all such stuff is handled by udev - configuration is in /etc/udev/rules.d.
Not sure if this applies to how KDE handles it, but I'd suggest reading up on udev if nobody else comes up with a more specific answer.
Hope this helps.
Cheers
M _________________ Matthew Smith |
|
Back to top |
|
 |
fuzzythebear Guru


Joined: 28 Nov 2004 Posts: 317
|
Posted: Mon Dec 24, 2007 1:04 am Post subject: |
|
|
yeah . it's part of the 50-udev.rules ... config file
you find stuff like :
KERNEL=="ttyUSB[0-9]*", NAME="%k", SYMLINK="tts/USB%n", GROUP="uucp", MODE="0660"
or
# usb devices
KERNEL=="hiddev*", NAME="usb/%k"
KERNEL=="auer*", NAME="usb/%k"
KERNEL=="legousbtower*", NAME="usb/%k", GROUP="usb"
KERNEL=="dabusb*", NAME="usb/%k"
KERNEL=="lp[0-9]*", SUBSYSTEM=="usb", NAME="usb/%k", GROUP="lp"
which helps me none..
all i want to do is use a simple cell phone
Fuzz _________________ There's this once i thought i had made a mistake .. but i was wrong  |
|
Back to top |
|
 |
smiffy Apprentice


Joined: 28 Jun 2006 Posts: 259 Location: SA.AU.AP.EARTH
|
Posted: Mon Dec 24, 2007 1:29 am Post subject: |
|
|
Here's something to try, guessing that you just want to be able to access your phone as a USB storage device (like I do with my Motorola V3i):
With phone disconnected:
ls -ltr /dev
Connect phone, wait a few seconds and:
ls -ltr /dev
...and look to see what the last (or nearly last) entry is. Here's what mine looks like before and after I connect a USB memory device:
Code: |
crw-rw---- 1 root root 252, 23 Dec 24 11:53 usbdev1.8_ep00
crw-rw---- 1 root root 252, 24 Dec 24 11:53 usbdev1.8_ep81
crw-rw---- 1 root root 252, 25 Dec 24 11:53 usbdev1.8_ep02
crw------- 1 root root 4, 12 Dec 24 11:53 tty12
crw-rw-rw- 1 root tty 5, 2 Dec 24 11:53 ptmx
|
And then:
Code: |
crw------- 1 root root 4, 1 Dec 23 13:09 tty1
crw------- 1 smith tty 4, 2 Dec 24 10:05 tty2
crw-rw---- 1 root root 252, 23 Dec 24 11:53 usbdev1.8_ep00
crw-rw---- 1 root root 252, 24 Dec 24 11:53 usbdev1.8_ep81
crw-rw---- 1 root root 252, 25 Dec 24 11:53 usbdev1.8_ep02
crw-rw---- 1 root root 21, 1 Dec 24 11:53 sg1
brw-rw---- 1 root disk 8, 16 Dec 24 11:53 sdb
brw-rw---- 1 root disk 8, 17 Dec 24 11:53 sdb1
crw------- 1 root root 4, 12 Dec 24 11:53 tty12
crw-rw-rw- 1 root tty 5, 2 Dec 24 11:53 ptmx
|
That shows me that the device is /dev/sdb with a partition that I can mount being /dev/sdb1. You might get something else, just note what pops up.
Here's the entry from my /etc/fstab:
Code: |
/dev/sdb1 /mnt/usb auto noauto,user 0 0
|
Note that /mnt/usb is a directory that I have already created myself.
I then just need to do:
mount /mnt/usb
This only works if you've only got one USB storage device plugged in at a time, otherwise the device in /dev may be different. At this point you really DO need to read up on udev, as you can specify what you want the /dev bit created as by the USB device ID, if I remember correctly. _________________ Matthew Smith |
|
Back to top |
|
 |
fuzzythebear Guru


Joined: 28 Nov 2004 Posts: 317
|
Posted: Mon Dec 24, 2007 2:18 am Post subject: |
|
|
following your tip .. i did the command .. this is what changes
crw-rw---- 1 root root 253, 10 Dec 23 21:15 usbdev2.4_ep00
crw-rw---- 1 root root 253, 15 Dec 23 21:15 usbdev2.4_ep04
crw-rw---- 1 root root 253, 14 Dec 23 21:15 usbdev2.4_ep84
crw-rw---- 1 root root 253, 13 Dec 23 21:15 usbdev2.4_ep02
crw-rw---- 1 root root 253, 12 Dec 23 21:15 usbdev2.4_ep82
crw-rw---- 1 root root 253, 11 Dec 23 21:15 usbdev2.4_ep81
unfortunately .. i dont see the sdb entries .. or similar .. or sg for that matter ..
i seem to be missing something .. but i dont know what .. thanks for the help dude
very appreciated.. ill pick this up in the morning.
After all .. it's Christmas's eve .. kind of  _________________ There's this once i thought i had made a mistake .. but i was wrong  |
|
Back to top |
|
 |
smiffy Apprentice


Joined: 28 Jun 2006 Posts: 259 Location: SA.AU.AP.EARTH
|
Posted: Mon Dec 24, 2007 2:39 am Post subject: |
|
|
That doesn't look right. *Something* should appear at the end of a /dev listing when you plug it in.
OK, what's next? Have you got any other USB storage devices (like a USB flash drive) that works?
If you do, make sure that your phone is configured to be available as a USB storage device.
If not, try this:
grep USB_STORAGE /usr/src/linux/.config
You should see, at very least:
Code: |
CONFIG_USB_STORAGE=y
|
The 'y' might be an 'm' if it's built as a module. If it is, do an lsmod to make sure that usb_storage is loaded.
If you see #CONFIG_USB_STORAGE is not set, there's your problem. Without the kernel module, you won't get very far at all
Cheers, have a good one. _________________ Matthew Smith |
|
Back to top |
|
 |
PaulBredbury Watchman


Joined: 14 Jul 2005 Posts: 7310
|
Posted: Mon Dec 24, 2007 8:13 am Post subject: |
|
|
Leash - heh, gotta love the Swimming with Sharks connection.
Anyway, configure udev properly - "udevinfo" is your friend. Use a symlink, and no guessing is required.
Code: | udevinfo -a --name /dev/sdd1 |
Code: | SUBSYSTEMS=="usb", ATTRS{serial}=="47107650blah", NAME="%k", SYMLINK+="myblah%n" |
|
|
Back to top |
|
 |
fuzzythebear Guru


Joined: 28 Nov 2004 Posts: 317
|
Posted: Mon Dec 24, 2007 11:09 am Post subject: |
|
|
hmm here's the modules loaded :
cdc_acm 16096 0
sl811_hcd 17216 0
usbhid 30656 0
ohci_hcd 35396 0
uhci_hcd 34384 0
usb_storage 97232 0
libusual 17296 1 usb_storage
ehci_hcd 45516 0
usbcore 147160 9 cdc_acm,sl811_hcd,usbhid,ohci_hcd,uhci_hcd,usb_storage,libusual,ehci_hcd
as soon as i plug in my USB key i get these entries :
brw-rw---- 1 root disk 8, 0 Dec 24 06:07 sda
crw-rw---- 1 root root 21, 0 Dec 24 06:07 sg0
brw-rw---- 1 root disk 8, 1 Dec 24 06:07 sda1
so .. is it the phone that's wrongly configured ? or that
simply dosen't work in a way that i can use it like this ?
im a bit lost
Paul .. i would deerly like to know what you mean , but i dont ..
Ii'll have a tub of coffee and reread that again ..
Thanks guys for your patience.
Ric _________________ There's this once i thought i had made a mistake .. but i was wrong  |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|