LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-07-2010, 07:11 PM   #1
devdol
Member
 
Registered: Dec 2005
Distribution: debian (testing/unstable)
Posts: 68

Rep: Reputation: 17
Question Retrofitting a Device File for a Mass Storage Device?


Dear usb driver experts,

here we have an older digicam (Jenoptik/Exakta Model "DC 22", if someone might want to know) that can be switched between some "PC Camera mode" and "Mass storage mode". Unfortunately, if attached to USB, it is always recognized as
Code:
UDEV  [1262910483.475886] add      /class/video4linux/video0 (video4linux)
lsusb tells:
Code:
Bus 005 Device 008: ID 0d64:3108 DXG Technology Corp. Digicam Mass Storage Device
Hence, there is no way to save the remaining pictures that reside on the internal memory. Using 'hwinfo --usb', i found out:
Code:
  Model: "DXG DIGITAL CAMERA USB"
  Hotplug: USB
  Vendor: usb 0x0d64 "DXG Technology Corp."
  Device: usb 0x3108 "DIGITAL CAMERA USB"
  Revision: "1.00"
  Driver: "zr364xx"
  Driver Modules: "zr364xx"
  Speed: 12 Mbps
  Module Alias: "usb:v0D64p3108d0100dc00dsc00dp00ic08isc05ip00"
  Driver Info #0:
    Driver Status: zr364xx is active
    Driver Activation Cmd: "modprobe zr364xx"
  Driver Info #1:
    Driver Status: usb_storage is active
    Driver Activation Cmd: "modprobe usb_storage"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #6 (Hub)
The first thing to try was an "rmmod zr364xx". Next try was to temporarily remove '/lib/modules/.../zr364xx.ko' in order to prevent it from being loaded. As expected, the result is:
Code:
  Driver Info #0:
    Driver Status: zr364xx is not active
    Driver Activation Cmd: "modprobe zr364xx"
  Driver Info #1:
    Driver Status: usb_storage is active
    Driver Activation Cmd: "modprobe usb_storage"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #6 (Hub)
However, what we still miss is a device file that could be mounted (to get access to the files). So the remaining questions is:
How can one manually recreate it, or: Can udev's recognition be changed in order to "find" something like '/class/scsi_disk/' instead of
'/class/video4linux/video0' only?

It still seems quite promising, but out of ideas now we would appreciate any advice.
 
Old 01-07-2010, 07:19 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
the message seems to be saying that your camera can act as a webcam as well as ums.
udev will usually put a ums device in /media - have you looked?

before adding the camera do

dmesg > before.log

after adding camera do

dmesg > after.log

diff before after > changes.log

look at the changes.log file. It should tell you what is going on.
 
Old 01-07-2010, 07:54 PM   #3
devdol
Member
 
Registered: Dec 2005
Distribution: debian (testing/unstable)
Posts: 68

Original Poster
Rep: Reputation: 17
Smile

Hello Simon,
thanks for your quick reply!
Well, diff before.log after.log gives us:
Code:
> ap: 60000000:9ec00000)
650a630,651
> usb 5-2: new full speed USB device using uhci_hcd and address 10
> usb 5-2: configuration #1 chosen from 1 choice
> scsi3 : SCSI emulation for USB Mass Storage devices
> usb 5-2: New USB device found, idVendor=0d64, idProduct=3108
> usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> usb 5-2: Product: DIGITAL CAMERA USB
> usb 5-2: Manufacturer: DSC
> usb-storage: device found at 10
> usb-storage: waiting for device to settle before scanning
> usb-storage: device scan complete
> scsi 3:0:0:0: Direct-Access     IDIGAT L ACEMAR           .100 PQ: 0 ANSI: 0 CCS
> sd 3:0:0:0: [sdb] 32000 512-byte hardware sectors (16 MB)
> sd 3:0:0:0: [sdb] Write Protect is off
> sd 3:0:0:0: [sdb] Mode Sense: 00 06 00 00
> sd 3:0:0:0: [sdb] Assuming drive cache: write through
> sd 3:0:0:0: [sdb] 32000 512-byte hardware sectors (16 MB)
> sd 3:0:0:0: [sdb] Write Protect is off
> sd 3:0:0:0: [sdb] Mode Sense: 00 06 00 00
> sd 3:0:0:0: [sdb] Assuming drive cache: write through
>  sdb: sdb1
> sd 3:0:0:0: [sdb] Attached SCSI removable disk
> sd 3:0:0:0: Attached scsi generic sg2 type 0
And, the strange thing with it is: I did not change anything since my posting above besides leaving the PC for about half an hour. Continuing session, no reboot - but now it workes! What happenes on hotplug is the long awaited normal behaviour: Automount in /media and desktop's device notification. And, as I would have expected (but constantly missed till then), also a device file:
Code:
brw-rw---- 1 root floppy 8, 17  8. Jan 02:28 /dev/sdb1
is there.

Bottom line: _ s t r a n g e _ ... (but all right for us ,-) )
 
Old 01-07-2010, 09:59 PM   #4
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Well done - now you have a powerful new trick.
 
Old 07-10-2010, 02:22 PM   #5
devdol
Member
 
Registered: Dec 2005
Distribution: debian (testing/unstable)
Posts: 68

Original Poster
Rep: Reputation: 17
Solution for missing mass storage devices

Just to summarize: if you have a digital camera recognized as video for linux device and miss it as mass storage device, just unload/remove its v4l driver.
 
  


Reply

Tags
camera, mass, recognition, storage, udev, usb


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to get the device ID of a USB mass storage device ebinjose Linux - Embedded & Single-board computer 1 10-30-2008 05:58 AM
usb - mass storage device d1l2w3 Mandriva 7 01-10-2005 10:10 PM
Assign one USB-storage device to one device file Misel Linux - Hardware 1 08-28-2004 03:52 AM
USB mass storage device file system shariqali Linux - Hardware 1 02-19-2004 10:31 AM
Usb mass storage device laguna Linux - Hardware 4 08-12-2002 02:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration