Help mounting camera

When I plug in my camera via USB, dmesg shows…

40.097034] usb 1-5: new high speed USB device using ehci_hcd and address 2
40.214007] usb 1-5: New USB device found, idVendor=04a9, idProduct=31f4
40.214031] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
40.214037] usb 1-5: Product: Canon Digital Camera
40.214042] usb 1-5: Manufacturer: Canon Inc.
40.214046] usb 1-5: SerialNumber: CC0362AD2685494C8592E9DD6BE09D1F
160.439061] usb 1-5: USB disconnect, address 2

and lsusb reports…

Bus 001 Device 004: ID 04a9:31f4 Canon, Inc.

How can I manually mount (via CLI) this device with the information I have?

Thanks.

I wonder if this might have to do with your camera mode with respect to usb connectivity. IIRC, you may need to make sure it is in MTP/PTP mode first. (There is also MSC mode with some cameras, but someone more familiar with Canon cameras may have to clarify further here). Is libgphoto2 installed? It is the library responsible for handling the various this PTP protocols.

Is it recognised by digikam or gphoto?

ionmich wrote:
> When I plug in my camera via USB

when i plug in my Cannon camera there pops up in the middle of the
screen a dialog which ask what i wanna do with the just detected new
USB device…are you saying that that does not happen on your system?

if so, then i have to wonder why…are you having other problems?

what operating system, version, desktop environment and update status?

did this camera work ok on this system earlier and suddenly it stopped
working?

has it worked with earlier versions of openSUSE, but not the one you
are using now?

has it, or does it, still work with any other operating system or
computer?

> dmesg shows…
> [snip]
> 160.439061] usb 1-5: USB disconnect, address 2

does it show as disconnected immediately? that is, you plug it in and
in a blink of an eye it shows the information i snipped away AND
“disconnect” ??

if so, then i guess it can’t pop-up that dialog asking what you wanna
do with a now disconnected camera…

what might cause that? bad wire? bad USB controller? bad camera? bad
software? bad set-up? etc etc etc (all of the preceding questions
might help us learn which and why–the first steps in solution)


DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]

On 2010-12-15 11:31, DenverD wrote:
> what operating system, version, desktop environment and update status?

He said “CLI”. >:-)

Thus, no popups.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

Thank you for your speedy response. But it doesn’t really answer the question “How can I manually mount (via CLI) this device with the information I have?” Does it?

Carlos E. R. wrote:
> On 2010-12-15 11:31, DenverD wrote:
>> what operating system, version, desktop environment and update status?
>
> He said “CLI”. >:-)

oh!
i don’t know…but, i think you will find the device in or near


/dev/bus/001/005

i say that because i just plugged in my cannon which dmesg calls “usb
3-8 … at address 4” and i find a new device entry timed just about
now which is /dev/bus/usb/003/004

so, if your device entry is as i guess, then the mount command
might go something like:


md /media/CanonCamera
mount /dev/bus/001/005 /media/CanonCamera

if it balks and ask for a file system type try


mount -t [fs type] /dev/bus/001/005 /media/CanonCamera

as for the value to use in place of [fs type] i guess it may be one
of these, and i would try the following, in this order, one at a time
of course

auto
vfat
usbfs
msdos
umsdos

see man mount…

but, listen closely: i am doing a lot of guessing for you…since
this is pretty standard, straight Linux stuff (not tied to any
particular distro) i’d point you to any generic Linux how-to you might
find on the net, and say it will probably do what you wish…


DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]
I feel annoyed that I can’t put my wide range of languages on stupid
Facebook. For example, I speak Sarcasm, fluently spoken and written,
and Various Forms of Geek…

On 2010-12-15 16:19, DenverD wrote:
> Carlos E. R. wrote:
>> On 2010-12-15 11:31, DenverD wrote:
>>> what operating system, version, desktop environment and update status?
>>
>> He said “CLI”. >:-)
>
> oh!
> i don’t know…but, i think you will find the device in or near
>
>


> /dev/bus/001/005
> 

>
> i say that because i just plugged in my cannon which dmesg calls “usb
> 3-8 … at address 4” and i find a new device entry timed just about
> now which is /dev/bus/usb/003/004

Let me see.

I just plugged a sub stick, which said:

<0.6> 2010-12-15 16:44:35 Telcontar kernel - - - [332117.259017] usb 1-6:
new high speed USB device using ehci_hcd and address 2

and "/dev/bus/usb/001/006 does not exist. Doing a “ls -ltr
/dev/bus/usb/00*/*” the last one is:

crw-rw-r-- 1 root root 189, 1 Dec 15 16:44 /dev/bus/usb/001/002

And it is not mountable:

Telcontar:~ # file -s /dev/bus/usb/001/002
/dev/bus/usb/001/002: data

Doing a “ls -ltr /dev/sd* | tail” reveals that the device node is:

brw-rw---- 1 root disk 8, 48 Dec 15 16:44 /dev/sdd
brw-rw---- 1 root disk 8, 49 Dec 15 16:44 /dev/sdd1

which do reveal as disks or partitions:

Telcontar:~ # file -s /dev/sdd /dev/sdd1
/dev/sdd: x86 boot sector; partition 1: ID=0xb, starthead 0, startsector
44, 15679396 sectors, extended partition table (last)\011, code offset 0x0

/dev/sdd1: x86 boot sector, code offset 0x0, OEM-ID " ",
sectors/cluster 64, Media descriptor 0xf8, heads 255, hidden sectors 44,
sectors 15679396 (volumes > 32 MB) , FAT (32 bit), sectors/FAT 1914, serial
number 0xyyyyxxxx, label: "SANDISK_2 "

What I do is watch the log when I plug a device - something like this is
printed:

usb-storage: device scan complete
sd 12:0:0:0: [sdd] Attached SCSI removable disk
sd 12:0:0:0: [sdd] 15695871 512-byte logical blocks: (8.03 GB/7.48 GiB)
sd 12:0:0:0: [sdd] Assuming drive cache: write through
sd 12:0:0:0: [sdd] Assuming drive cache: write through
sdd: sdd1

which reveal the device name. If these entries do not appear, then the
device was not recognised as a disk. Some devices have two modes of
operations, one as a disk, another as something else that needs a special
program to connect to them. This happens to the the TomTom, to Nokia
phones, etc. A camera can behave in a similar way, I assume. Something has
to be done in the device to tell it to behave as a disk. Or a special
software used - if it exists for Linux.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

Carlos E. R. wrote:
> What I do is watch the log when I plug a device - something like this is
> printed:
>
> usb-storage: device scan complete
> sd 12:0:0:0: [sdd] Attached SCSI removable disk

i love learning (even from Spaniards :wink: but i need to know when you
say above “the log” which log do you mean? (i ask after checking
messages and Ctrl+Alt+F10 and then ran out of ideas!)


DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]
I feel annoyed that I can’t put my wide range of languages on stupid
Facebook. For example, I speak Sarcasm, fluently spoken and written,
and Various Forms of Geek…

No.

if so, then i have to wonder why…are you having other problems?

No.

what operating system, version, desktop environment and update status?

Suse 11.3 64 bit- KDE 4.4.4

did this camera work ok on this system earlier and suddenly it stopped
working?

No. New camera.

has it worked with earlier versions of openSUSE, but not the one you
are using now?

No.

has it, or does it, still work with any other operating system or
computer?

Good question. I installed Ubuntu and was unable to mount the camera. However it did show in my file browser and I was able to display photos. When I invoked “mount” it did not show up. So…the answer is it did “work” BUT I was unable to mount it via my CLI. That’s my objective.

> dmesg shows…
> [snip]
> 160.439061] usb 1-5: USB disconnect, address 2

does it show as disconnected immediately? that is, you plug it in and
in a blink of an eye it shows the information i snipped away AND
“disconnect” ??

By the time I invoke dmesg, it shows “disconnected”


DenverD
CAVEAT: C A V E A T [posted via NNTP w/openSUSE 10.3][/QUOTE]

Thank you for reading my request carefully.

Hi ionmich

Was that your complete dmesg output associated with your camera? If so, that would indicate that the kernel does not recognise your camera as a storgae device. Of course, this could be verified with ‘fdisk -l’ to show no new volumes present. (BTW, I still wonder if your camera needs to be in a certain mode first).

FWIW, gphoto2 is a CLI utility that MAY work with your camera. You can check if its supported with a query as follows

gphoto2 --auto-detect

The following command will download photos to your current working directory

gphoto2 --get-all-files

Download digital camera photos with gphoto2 | WiredRevolution.com

About all I can offer. Good luck. :slight_smile:

I am 90% sure that you are correct. However the camera and tiny manual are in a language outside my polyglottic range. Swedish. Attempts to find (Google) the manual in a language I understand are on-going.

Here is what I have learned. The camera reports itself as a “USB imaging device”. From it’s own firmware, I assume. Because if I remove the memory, plug it into my Vivitar camera and plug that into the USB slot it mounts as a vfat file system as I would expect.

I guess I should thank Canon for making my life easier.

Thanks for the help. If I manage to reconfigure the camera I will let you know if your suggestion works.

On 2010-12-15 17:19, DenverD wrote:
> Carlos E. R. wrote:
>> What I do is watch the log when I plug a device - something like this is
>> printed:
>>
>> usb-storage: device scan complete
>> sd 12:0:0:0: [sdd] Attached SCSI removable disk
>
> i love learning (even from Spaniards :wink: but i need to know when you
> say above “the log” which log do you mean? (i ask after checking
> messages and Ctrl+Alt+F10 and then ran out of ideas!)

Well, /the/ log, where else? :stuck_out_tongue:

In /var/log/messages, of course. The main log. Or the end of dmesg.

To be fastidious :stuck_out_tongue: only you know where those messages go, if they go, as
the Lord and Master of your system :stuck_out_tongue:

I mean, the destination depends on syslog configuration. They are kernel
messages, so I usually send them to /var/log/kernel. Also, kernel verbosity
can be controlled. Default is 4, I set it to 7, the maximum. It helps
sometimes.

Ah, where do I do that, you say? :wink:
In /etc/sysconfig/syslog.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

On 2010-12-15 18:06, ionmich wrote:

>> what operating system, version, desktop environment and update status?
> Suse 11.3 64 bit- KDE 4.4.4

If you are using KDE, why do you want to do it via CLI?


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

But in my case it does not show anything besides my internal hard drive. (sda) And the reason for this is (I believe) the camera reports itself as a “USB imaging device” not a drive with a vfat filing system on it.

I’ve manged to get the photos off the camera. There is no urgency involved in finding a solution. I just want to write a simple script that identifies the camera, mounts it and moves everything to a specific directory.

Thanks for all the thought you put into your responses.

I just want to write a simple script that identifies the camera, mounts it and moves everything to a specific directory.

Thats why I wondered the gphoto command may work for you to achieve the same end - but it does depend on camera model. (Part of libgphoto2).

Carlos E. R. wrote:
> Default is 4, I set it to 7, the maximum. It helps

well, what you are seeing is not what i was seeing in messages…so,
i’ve also set verbosity to 7 (it was set to one), we’ll see if i get
what you get…


DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]
I feel annoyed that I can’t put my wide range of languages on stupid
Facebook. For example, I speak Sarcasm, fluently spoken and written,
and Various Forms of Geek…

On 12/15/2010 07:19 AM, DenverD wrote:
> Carlos E. R. wrote:
>> What I do is watch the log when I plug a device - something like this is
>> printed:
>>
>> usb-storage: device scan complete
>> sd 12:0:0:0: [sdd] Attached SCSI removable disk
>
> i love learning (even from Spaniards :wink: but i need to know when you
> say above “the log” which log do you mean? (i ask after checking
> messages and Ctrl+Alt+F10 and then ran out of ideas!)
>
Not sure which Carlos was looking at, but I just did the following on my
Debian system:

mis-mkm-lnx:~# cd /var/log
mis-mkm-lnx:/var/log# grep ‘device scan complete’ *
debug.1:Dec 6 15:43:50 localhost kernel: [26414.204616] usb-storage:
device scan complete
kern.log.1:Dec 6 15:43:50 localhost kernel: [26414.204616] usb-storage:
device scan complete

Outta be similar on openSUSE…


Kevin Miller
Juneau, Alaska
http://www.alaska.net/~atftb
In a recent poll, seven out of ten hard drives preferred Linux.

On 2010-12-15 21:06, ionmich wrote:
>
> robin_listas;2266281 Wrote:
>>
>>
>> Doing a “ls -ltr /dev/sd* | tail” reveals that the device node is:
>>
>> brw-rw---- 1 root disk 8, 48 Dec 15 16:44 /dev/sdd
>> brw-rw---- 1 root disk 8, 49 Dec 15 16:44 /dev/sdd1
>>
>> which do reveal as disks or partitions:
>>
>
> But in my case it does not show anything besides my internal hard
> drive. (sda) And the reason for this is (I believe) the camera reports
> itself as a “USB imaging device” not a drive with a vfat filing system
> on it.

Which I mentioned as a possibility. Some devices have a dual mode, you have
to do something in the camera to switch mode, or in the software they
provide for windows.

I don’t own a digital camera (besides the cellular phone), but with a
friend’s camera I had that problem; the solution was to extract the card
from the camera and plug it into a reader.

> I’ve manged to get the photos off the camera. There is no urgency
> involved in finding a solution. I just want to write a simple script
> that identifies the camera, mounts it and moves everything to a specific
> directory.

What about using camera software like digikam?


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

Some cameras don’t support the storage device interface but support PTP. Digikam and such should do the right thing. I don’t know if there is a scriptable CLI program but I’m sure that it is possible to build something on top of libgphoto, if it hasn’t already been done.