LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   usb phone problems (https://www.linuxquestions.org/questions/linux-software-2/usb-phone-problems-691285/)

ninja master 12-17-2008 01:31 PM

usb phone problems
 
my phone does not release the usb device it previously had. so it joins as usb 2:1 and everytime i connect and disconnect it it goes up, right now im up to usb 2:30...

my dmesg looks like a hurricane, does anyone have any ideas whats going on?

lazlow 12-17-2008 02:07 PM

Are you unmounting the phone before you disconnect it?

ninja master 12-17-2008 02:26 PM

no, do i have to?

lazlow 12-17-2008 03:39 PM

Assuming that it is being mounted as a file system (most usb stuff is) then, yes. If you do not the OS still thinks that the device is there, thus the 2:X. Unmounting also assures that all communication between the two is complete before you disconnect (often lazy writes are used and if you disconnect before unmounting all the data may not be written). This is not just a Linux issue. Windows also give you an icon(usually in lower tray) to confirm that it is safe to remove the device.

ninja master 12-21-2008 03:29 AM

ok when the camera is plugged in i run a df and i see no device to be unmounted.

Shadow_7 12-21-2008 09:27 AM

There's various communication protocols for cameras/phones. It may be setup for PTP (peer to peer) or USB Mass Storage. With PTP cameras, you use something like gphoto2 to download/upload images. With USB Storage devices you mount them and cp from a filesystem.

If it's a usb-storage devices, when you connect the phone it should add a device in /proc/partitions. On my system, this location varies depending on a) if it's connected when I boot, b) if it's connected after I boot, c) which usb port I plug it into, d) what other USB Mass Storage devices I have plugged in. I almost always have to check /proc/partitions to see where it showed up. But I'm not running dbus, autofs, or any of that other stuff.

If you mount the device and write something to the device, you could damage the filesystem if you disconnect it before unmounting it. This is less likely if you only read from the device then disconnect without unmounting. However you may screw up your ability to remount it later without a reboot.

You might try mount by itself which should list mounted devices in /etc/mtab. You may not be allowed to unmount them if they're no longer valid devices. This is why I still do it old school. It mounts when I give a mount command. And therefor I remember to unmount it when the time comes. If you can unmount all Usb-Storage devices, you could also rmmod the usb-storage kernel module, then modprobe it back and that might clear up your USB allocations. Although you may also need to restart udev.

# modprobe -r usb-storage
# modprobe usb-storage
# /etc/init.d/udev restart

HTH

ninja master 12-21-2008 12:37 PM

trying to mount the phone results in "/proc/bus/usb is not a block device"

gah im also having problems with my camera in gphoto2 =(


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