# Connect to a Sony DSC-P50 digital camera through USB - HELP!

## Roxxor

Hi!

I would like to connect to my digital camera, a Sony DSC-P50 through USB.

I have gphoto and gtkam.

But gtkam cannot detect any cameras. 

I read somewhere that I should mount the USB device as an usually disk.

How do I do that?

I have tried this:

```

bash-2.05b# mount -t usbfs vfat /dev/sda/

mount: mount point /dev/sda/ is not a directory

bash-2.05b# 

```

And when I run dmesg I get this (this is the end of the output, the USB devices section):

```

hub 1-0:1.0: new USB device on port 1, assigned address 3

scsi0 : SCSI emulation for USB Mass Storage devices

  Vendor: Sony      Model: Sony DSC          Rev: 3.28

  Type:   Direct-Access                      ANSI SCSI revision: 02

SCSI device sda: 63424 512-byte hdwr sectors (32 MB)

sda: Write Protect is off

sda: Mode Sense: 00 32 00 00

sda: assuming drive cache: write through

SCSI device (ioctl) reports ILLEGAL REQUEST.

SCSI device sda: 63424 512-byte hdwr sectors (32 MB)

sda: Write Protect is off

sda: Mode Sense: 00 32 00 00

sda: assuming drive cache: write through

SCSI device sda: 63424 512-byte hdwr sectors (32 MB)

sda: Write Protect is off

sda: Mode Sense: 00 32 00 00

sda: assuming drive cache: write through

 /dev/scsi/host0/bus0/target0/lun0:<3>Buffer I/O error on device sda, logical block 0

Buffer I/O error on device sda, logical block 0

 unable to read partition table

 /dev/scsi/host0/bus0/target0/lun0:<3>Buffer I/O error on device sda, logical block 0

 unable to read partition table

Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0

Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0

WARNING: USB Mass Storage data integrity not assured

USB Mass Storage device found at 3

usb 1-1: USB disconnect, address 3

hub 1-0:1.0: new USB device on port 1, assigned address 4

scsi1 : SCSI emulation for USB Mass Storage devices

  Vendor: Sony      Model: Sony DSC          Rev: 3.28

  Type:   Direct-Access                      ANSI SCSI revision: 02

SCSI device sda: 63424 512-byte hdwr sectors (32 MB)

sda: Write Protect is off

sda: Mode Sense: 00 32 00 00

sda: assuming drive cache: write through

SCSI device (ioctl) reports ILLEGAL REQUEST.

SCSI device sda: 63424 512-byte hdwr sectors (32 MB)

sda: Write Protect is off

sda: Mode Sense: 00 32 00 00

sda: assuming drive cache: write through

SCSI device sda: 63424 512-byte hdwr sectors (32 MB)

sda: Write Protect is off

sda: Mode Sense: 00 32 00 00

sda: assuming drive cache: write through

 /dev/scsi/host1/bus0/target0/lun0:<3>Buffer I/O error on device sda, logical block 0

Buffer I/O error on device sda, logical block 0

 unable to read partition table

 /dev/scsi/host1/bus0/target0/lun0:<3>Buffer I/O error on device sda, logical block 0

 unable to read partition table

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

WARNING: USB Mass Storage data integrity not assured

USB Mass Storage device found at 4 

```

I also ran this:

```

bash-2.05b# cdrecord --scanbus

Cdrecord-Clone 2.01a19 (i686-pc-linux-gnu) Copyright (C) 1995-2003 Jörg Schilling

Linux sg driver version: 3.5.29

Using libscg version 'schily-0.7'

scsibus2:

        2,0,0   200) 'Sony    ' 'Sony DSC        ' '3.28' Removable Disk

        2,1,0   201) *

        2,2,0   202) *

        2,3,0   203) *

        2,4,0   204) *

        2,5,0   205) *

        2,6,0   206) *

        2,7,0   207) *

bash-2.05b#

```

How do I connect to my camera?

----------

## NeddySeagoon

Roxxor,

 *Quote:*   

> I have tried this:
> 
> Code:
> 
> bash-2.05b# mount -t usbfs vfat /dev/sda/
> ...

 

Close but no cigar.

Make mount point say 

```
mkdir /mnt/camera

```

Then do 

```
mount -t vfat /dev/sda1 /mnt/camera
```

You need to mount the first partition, of the vfat filesystem, not the drive.

You can put a line in /etc/fstab too if you wish.

You need gphoto2 for USB cameras, if you want to go that way.

----------

## Roxxor

I have created a folder in /mnt called camera with the commando: "mkdir /mnt/camera"

/dev/sda1

```

bash-2.05b# mount -t vfat /dev/sda1 /mnt/camera/

mount: special device /dev/sda1 does not exist

```

/dev/sda

```

bash-2.05b# mount -t vfat /dev/sda /mnt/camera/

mount: /dev/sda: can't read superblock

```

----------

## NeddySeagoon

Roxxor,

I should have spotted that from your first post where it says it can't read the partition table.

Cameras often have two modes - Mass Storage Device and PTP?

They will only work in the selected mode.

There is two things you can try - gphoto2 or checking the camera to make sure its in Mass Storage Device mode.

You do have usb-storage available to the kernel?

----------

## Roxxor

Yes, I have USB Storage compiled into kernel. 

I have  

* support for usb

* usb device filesystem

* ohci hcd

* uhci hcd 

* usb mass storage device

* scsi device support

* scsi disk support 

compiled into kernel and NOT as modules.

But it still doesn't work.

I have tested Gphoto2 and gtkam.

None can find any cameras.

I have tried:

gphoto2 --auto-detect without any results and

gphoto2 --list-ports without any results.

I have tested many things now without results.    :Sad: 

I just get 

```

bash-2.05b# mount /dev/sda /mnt/camera

/dev/sda: Input/output error

mount: /dev/sda: can't read superblock

```

each time i try to mount /dev/sda

sda1 does not exist.

----------

## NeddySeagoon

Roxxor,

Having both  *Quote:*   

> * ohci hcd
> 
> * uhci hcd 

  built in is bad news. Find out what sort of USB hubs you have and include only the right driver.

dmesg | grep USB will show you.

To make matters worse there are two different drivers for the uhci hubs and some people report that only one works for them.

If you have ohci root hubs its a clear cut case, otherwise build the two drivers as modules and load and unload them with modprobe in turn to find out which is better for you.

Lastly, add the module name to /etc/modules.autoload so it gets loaded at boot.

----------

## Roxxor

```

bash-2.05b# dmesg | grep USB

usb 1-2: USB disconnect, address 4

hub 1-0:1.0: new USB device on port 2, assigned address 5

scsi2 : SCSI emulation for USB Mass Storage devices

WARNING: USB Mass Storage data integrity not assured

USB Mass Storage device found at 5

bash-2.05b#
```

Is it uhci hcd I shall compile as module and NOT ohci hcd???

----------

## NeddySeagoon

Roxxor,

dmesg shows the last 4kb of kernel messages and what I was grepping for isn't there any more. I get

 *Quote:*   

> dmesg | grep USB
> 
> usb-ohci.c: USB OHCI at membase 0xf8ac3000, IRQ 11

 

You will need to reboot or look in the kernel log file, which will be in /var/log somewhere.

----------

## Roxxor

Thank you!

I have fixed it now. I didn't know that I could change to PTP mode in the camrea. So now it works prefectly with Gphoto2.

One thing, do you know how I can get it working with gtkam?

It says it can't list folders in /*

and it also says it can't initialize camera.

It works in Gphoto2, but not in gtkam.

How to fix that?

----------

