Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I managed to get my USB digital camera (Sony DSC-V1) to work using Digikam when logged in as root. Although it only ever auto-detects it as an F707 despite the V1 also being in the default list of devices, it works the same with either setting. This is in PTP mode (haven't had any joy using USB mass storage mode).
When I log in under my normal username it produces an error along the lines of 'cannot access the device' or 'cannot read the device'. I'm sure this is just a basic permissions issue or similar but since I'm a Linux dunce I don't know where to start in rectifying it.
I'm running SuSE 9.2 as a single user on a Vaio laptop.
A lot of this work will already be done but just verify that everything is the way it should be. I have a DSC-P52 and personally I'd much rather use it as a mass storage device, support for which has vastly improved with more recent kernels.
Thanks for all the suggestions, but they don't really get me anywhere. Regarding the second reply and the adding of 'users' to fstab, I'm not entirely sure how to go about this, but I did modify the file at the line:
usbfs /proc/bus/usb usbfs defaults 0 0
so that it now reads
(I also tried defaults,user because I noticed everything else in that file is singular and I don't know what difference it makes)
That didn't change anything. Having switched the camera on and run dmesg, I see hundreds of entries saying:
usb 4-3: new high speed USB device using address 2
So I don't know how to progress with the first response in this case. As for the third response, to me as a complete newbie it all seems rather hairy having read that link. It assumes my more advanced knowledge of too many things which don't make sense to me. However, I've tried to work my way through and have found that I only have a file 'devices' in my /proc/bus/usb directory, not one called 'drivers'. I then stumble at the point where it tells me to modprobe usb-ohci and usb-uhci, because both produce 'FATAL: Module usb_*hci not found.'
When I plug in or switch on the camera as root, nothing happens, but the PTP mode will work in Digikam. As a user, a box launches stating a new camera was detected, and asking if I want to open with: kfmclient openURL camera:/ ?
If I click yes, the directory contains two subdirectories, one for the Sony DSC-F707V and one for the Sony DSC-V1 (both PTP mode). If I open either of them, after a few seconds I get an error saying:
Could not read file Could not claim the USB device.
Well the first two responses were dealing with the camera as a UMS (USB Mass Storage) device and since you're using PTP mode they're not really relevent.
The error messages in your dmesg output suggest that you don't have your secondary master device set up properly, so you should definitely look into that.
The modprobe errors you got indicate that either you have the usb drivers compiled into the kernel or they don't exist. Assuming they're in the kernel you may be able to continue with the instructions anyway.
The camera does offer both USB and PTP modes, so I switched it to USB. The only difference is now I can't access it at all. In Digikam as root, if I select USB Mass Storage device, it fails. I checked the system information in YaST and found that I have EHCI USB drivers, as opposed to OCHI or UHCI. However, if I try modprobe usb-ehci, I get the same fatal error.
I then typed dmesg again with it as a USB mass storage device, and noticed the following output:
usb 4-3: new high speed device using address 3
scsi1 : SCSI emulation for USB Mass Storage devices
Vendor: Sony Model: Sony DSC Rev: 4.50
Type: Direct-Access ANSI SCSI revision: 02
SCSI device sda: 63424 512-byte hdwr sectors (32 MB)
sda: test WP failed, assume Write Enabled
sda: assuming drive cache: write through
Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi1, channel 0, id 0, lun 0, type 0
USB Mass Storage device found at 3
Following this are several more of the hdc packet command errors previously described. I don't understand what any of this means and what the relevance of SCSI is. Can anyone see an obvious problem and magic solution here?
PS If I now try ls -l /dev/sda, I get:
brw-rw---- 1 root disk 8, 0 Oct
SCSI is the protocol that UMS uses to transfer the data. It's the same protocol that was emulated to enable cd burning in older kernels until the ATAPI protocol was ironed out. Your dmesg output with the camera as the scsi device indicates that it's attached to sda1, which is normal if you only ever attach one USB device.
Now the easiest thing for you to do would be to create a mount point - in your case I would use /mnt/dsc-v1 or you could use /mnt/camera or whatever. Assuming the first, then you would want to add the following line to /etc/fstab:
/dev/sda1 /mnt/dsc-v1 vfat noauto,users 0 0
Then when you plug the camera in, you would be able to, as a regular user:
and use it like you would any mounted device (floppy, etc). When you're done just umount it and everything's ok.
I like to use midnight commander (mc) to transfer the files (because it's quick, doesn't load thumbnails that drain the camera battery, etal). I have a menu command like so (where my mount point is /mnt/dsc-p52):
mount /mnt/dsc-p52 ; sleep 2 ; xterm -geometry 96x60 -e mc /mnt/dsc-p52 /home/share/pictures ; umount /mnt/dsc-p52
This opens mc and umounts the camera when it's done. The only problem is that sometimes the camera doesn't mount on the first try - I'm not sure why.
As for the hdc packet command errors, they're not related to the camera but you should definitely think about posting another question concerning them...
I'm still having problems with this. I've done as specified and entered the line in fstab. (Again, I'm confused as to the difference between 'user' and 'users', because all the other entries in that file only say 'user'). Anyway, it gives me the error 'Mount point /mnt/cam does not exist'.
I ran dmesg again and found that the output was similar but it shows
and elsewhere where it previously said scsi1 it now has scsi0
I haven't unplugged the device or put it in another USB port. Does this mean it is still on sda1 or something else? I tried changing the line in fstab to sda or sda0 just at a guess, but no difference. The dmesg output is slightly different also in that it shows
'Initializing USB Mass Storage driver...'
at the start, which it didn't previously, and at the end it adds
'usbcore: registered new driver usb-storage
USB Mass Storage support registered'
I do want the device to work under root as well as my normal user account. Thanks for your help so far. I'm sure this is do-able but this laptop has never made things simple since I bought it.
It looks like you haven't created the mount point /mnt/cam yet - you need to
The only real difference between "user" and "users" is that "user" is somewhat more restrictive - once mounted, only the user who mounted and root can unmount a fs, whereas "users" allows anyone to unmount a mounted fs. You can use "user" if you like (although I think there was a reason why I use "users" vs "user" even though there's only one account used on this machine).
The different dmesg messages indicate that the kernel simply used a different scsi device for some reason, it should still be accessible under /dev/sda1 (my understanding is that the camera is now "registered" to use sda1 each time, but I could be wrong). The "Initializing" messages are just indicating that you're using UMS vs PTP mode now, in PTP mode it didn't use scsi emulation.
Excellent! That's cracked it, I'm finally up and running. It works fine now as root or user. Thanks a lot for your help and perseverance. I shall have to come back to this forum again with all my other queries!