Vtech Kidizoom camera USB doesn't mount

Bug #500398 reported by earthforce_1 on 2009-12-25
80
This bug affects 14 people
Affects Status Importance Assigned to Milestone
util-linux (Ubuntu)
Low
Unassigned

Bug Description

Binary package hint: gvfs

lsusb reports the device is connected:

Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 006: ID 06a3:075c Saitek PLC X52 Flight Controller
Bus 002 Device 005: ID 046d:c046 Logitech, Inc. RX1000 Laser Mouse
Bus 002 Device 003: ID 04e8:2004 Samsung Electronics Co., Ltd
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 002: ID 046d:08b0 Logitech, Inc. QuickCam 3000 Pro [pwc]
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 0f88:042d VTech Holdings, Ltd <- This is the device
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 002: ID 046d:c318 Logitech, Inc.
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 0409:005a NEC Corp. HighSpeed Hub
Bus 001 Device 002: ID 1b1c:0ab1
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

But it does not mount automatically as it should. Very disappointed daughter on Christmas day. :(

ProblemType: Bug
Architecture: amd64
Date: Fri Dec 25 14:03:56 2009
DistroRelease: Ubuntu 9.10
HotplugNewDevices: /dev/sde1 /dev/sde
HotplugNewMounts:

NonfreeKernelModules: fglrx
Package: gvfs 1.4.1-0ubuntu1
ProcEnviron:
 LANG=en_CA.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-16.53-generic
SourcePackage: gvfs
Symptom: storage
Uname: Linux 2.6.31-16-generic x86_64
XsessionErrors:
 (gnome-settings-daemon:2829): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (polkit-gnome-authentication-agent-1:2974): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
 (nautilus:2890): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
 (/usr/lib/beagle/Beagle.Search.exe:2959): GLib-WARNING **: g_set_prgname() called multiple times
 (firefox:5026): GLib-WARNING **: g_set_prgname() called multiple times

earthforce_1 (earthforce1) wrote :
Changed in gvfs (Ubuntu):
importance: Undecided → Low
Didi26 (touring-chello) wrote :

Hi!

This bug affects me too.
Here is the result of my lsusb:

Bus 001 Device 011: ID 0f88:042e VTech Holdings, Ltd
Bus 001 Device 006: ID 050d:0271 Belkin Components
Bus 001 Device 005: ID 1307:0330 Transcend Information, Inc.
Bus 001 Device 004: ID 046d:c526 Logitech, Inc.
Bus 001 Device 003: ID 0424:2504 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 003: ID 045e:0732 Microsoft Corp.
Bus 003 Device 002: ID 0451:2046 Texas Instruments, Inc. TUSB2046 Hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 058f:6377 Alcor Micro Corp. Multimedia Card Reader
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

kind regards

schilcha (rainer-grohmann) wrote :

Hi there too!

I have the same (?) problem here too.

More specifically, only the SD-card inserted into the camera is mounted automatically and readily shows up on my desktop. However, the internal memory of the Kidizoom camera is not mounted automatically. Moreover, I cannot even mount it manually -- mount requests to provide a file-system type (which actually should be FAT I guess).

Unfortunately, udev is a closed book to me, but what seems odd to me is that the output from usb_id is significantly different between the two drives the camera provides.

syslog-portion of the usb_id-part for the internal memory (the one that can*not* be mounted) provides less output from usb_id (see line 17ff in the attached logfile):
ID_VENDOR=VTech
ID_VENDOR_ENC=VTech
ID_VENDOR_ID=0f88
ID_MODEL=Kidizoom
ID_MODEL_ENC=Kidizoom
ID_MODEL_ID=042e
ID_REVISION=0100
ID_SERIAL=VTech_Kidizoom_123456789ABCDEF
ID_SERIAL_SHORT=123456789ABCDEF
ID_BUS=usb
ID_USB_INTERFACES=:080650:

while the syslog-portion of the usb_id-part for the SD card (the one that *is* mounted automatically) provides additional information on this being an usb-storage device (see line 332ff in the attached logfile):
ID_VENDOR=VTech
ID_VENDOR_ENC=VTech\x20\x20\x20
ID_VENDOR_ID=0f88
ID_MODEL=Kidizoom
ID_MODEL_ENC=Kidizoom\x20\x20\x20\x20\x20\x20\x20\x20
ID_MODEL_ID=042e
ID_REVISION=1.11
ID_SERIAL=VTech_Kidizoom_123456789ABCDEF-0:0
ID_SERIAL_SHORT=123456789ABCDEF
ID_TYPE=disk <<--- additional information
ID_INSTANCE=0:0 <<--- additional information
ID_BUS=usb
ID_USB_INTERFACES=:080650:
ID_USB_INTERFACE_NUM=00 <<--- additional information
ID_USB_DRIVER=usb-storage <<--- additional information

Any help (esp. bug-fixes ;) is greatly appreciated.

schilcha (rainer-grohmann) wrote :

BTW, here's my current dmesg, if you miss some information on my system...

It works if you mount it manually.

Use the following command:

sudo mount -t vfat /dev/sdb /mnt
(replace sdb with the device that ist created for your kidizoom)

after that the content is available in /mnt

Hope that helps Christian

earthforce_1 (earthforce1) wrote :

Let's hope your workaround functions in Lucid - I just upgraded because of problems with my GPU.

Better yet - I hope it works properly under Linux.

earthforce_1 (earthforce1) wrote :

Same problem under Lucid :(

Was able to manually mount it:
sudo mount -t vfat /dev/sdg1 /mnt

The ubuntu disk utility identifies it as as USB storage device formatted as a FAT16 partition with 48MB capacity

Maybe that is why it has trouble automounting - this is a very old file system.

FiX (fix-kowalski) wrote :

Behavior with Maverick:

1) without an SD card, nothing shows up on the USB bus

2) with an SD card (manufacturer mentionned 2GB max) formatted with a single FAT32 partition, both the internal memory & the SD-card properly auto-mount. ALINE is the volume name of the SD card.

% sudo mount
[...]
/dev/sdb1 on /media/ALINE type vfat (rw,nosuid,nodev,uhelper=udisks,uid=1001,gid=1001,shortname=mixed,dmask=0077,utf8=1,showexec,flush)
/dev/sdc1 on /media/VTech 773 type vfat (rw,nosuid,nodev,uhelper=udisks,uid=1001,gid=1001,shortname=mixed,dmask=0077,utf8=1,showexec,flush)

rcspam (rcspam) wrote :

here is a solution to fix it:

create 2 rules in a /etc/udev/rules.d/90-kidizoom.rules with this:

KERNEL=="sd?1", SUBSYSTEMS=="scsi", ACTION=="add", ATTRS{vendor}=="VTech ", ATTRS{model}=="Kidizoom ", SYMLINK+="kidizoom", RUN+="/path/to/mount-script %k"
KERNEL=="sd?1", SUBSYSTEMS=="scsi", ACTION=="remove", ENV{ID_VENDOR}=="VTech*", RUN+="/path/to/umount-script %k"

Dont forget to reload udev: "sudo service udev restart"

Write the mount-script:

#!/bin/bash

mk() {
 pumount /dev/$1
 sleep 1
 pmount -t vfat /dev/kidizoom KIDIZOOM
 xhost local:$2
 nautilus /media/KIDIZOOM
}

user=`who | grep :0\) | cut -f 1 -d ' '`
export DISPLAY=:0.0
export -f mk
su $user -c "mk $1 $user"

And the umount-script:

#!/bin/bash

umk() {
 pumount /dev/$1
 sleep 1
 xhost local:$2
 zenity --info --text "Kidizoom is unmount"
}

user=`who | grep :0\) | cut -f 1 -d ' '`
export -f umk
export DISPLAY=:0.0
su $user -c "umk $1 $user"

It works for me (maverick)

rcspam (rcspam) wrote :

Just to specify to not forget to install pmount.
"sudo apt-get install pmount"

rcspam (rcspam) wrote :

While waiting the correction you can find the solution here: http://rcspamsblog.blogspot.com

Fabio (koetjeboeh) wrote :

Hi Rapha,

Thanks, I can confirm your fix works, at least on my system(10.10). Attached the device without an SD card, and could access all files and folders.

rcspam (rcspam) wrote :

@ Fabio,

Let the children will be happy... ;)
Thanx for the test

rcspam (rcspam) wrote :

here is the rcspam's blog with a solution in english http://rcspamsblogen.blogspot.com

Nick Holloway (nwholloway) wrote :

I have found the cause for this defect, and a workaround.

The cause is that the FAT16 superblock on the camera does not set the number of heads, and so the partition type is not detected correctly. You get no output from the following command:

    # blkid -p /dev/disk/by-id/usb-VTech_Kidizoom_123456789ABCDEF-0:0-part1

The kernel is able to mount the partition when mounted manually in the workaround above because it does not enforce the non-zero heads requirement. In "fat/inode.c" there is the following comment:

        /*
         * Earlier we checked here that b->secs_track and b->head are nonzero,
         * but it turns out valid FAT filesystems can have zero there.
         */

This means that I suspect the defect is in util-linux. In superblocks/vfat.c it will discount a superblock with a zero value for heads:

  if (ms->ms_heads == 0)
   return 0;

I was able to confirm this, and provide a workaround by setting the number of heads in the superblock to be 63:

    echo -n "?" | dd of=/dev/disk/by-id/usb-VTech_Kidizoom_123456789ABCDEF-0:0-part1 seek=26 bs=1 count=1 conv=notrunc

Now the partition is detected successfully by blkid.

    # blkid -p /dev/disk/by-id/usb-VTech_Kidizoom_123456789ABCDEF-0\:0-part1
    /dev/disk/by-id/usb-VTech_Kidizoom_123456789ABCDEF-0:0-part1: SEC_TYPE="msdos" LABEL="VTech 1070" UUID="2004-1014" VERSION="FAT16" TYPE="vfat" USAGE="filesystem"

The next time the camera is plugged in it becomes available as "VTech 1070".

madbiologist (me-again) wrote :

This is fixed in the Lucid 2.6.32-30.59 kernel:

* USB: Storage: Add unusual_devs entry for VTech Kidizoom

From the upstream 2.6.32.29 kernel release notes:

5d8a03932c2692a64d11f3c8b57409d3
Author: Nick Holloway
Date: Wed Jan 26 21:47:43 2011 +0000

    USB: Storage: Add unusual_devs entry for VTech Kidizoom

    commit c25f6b1591b158f7ae3b9132367d0fa6d632e70e upstream.

    This device suffers from the off-by-one error when reporting the capacity,
    so add entry with US_FL_FIX_CAPACITY.

    Signed-off-by: Nick Holloway
    Signed-off-by: Greg Kroah-Hartman

Changed in gvfs (Ubuntu):
status: New → Fix Released
Nick Holloway (nwholloway) wrote :

The kernel change is not a fix for the real problem. All the kernel patch above does is correctly identify the correct storage capacity (and not spit out error messages as it attempts to access beyond the end of the device).

The real problem is that the identification of the partition fails due to the number of heads not being set in the FAT superblock (see #15).

I don't seem to be able to change the status. Can somebody please change the status back to "New". I believe the affected package should be "libblkid".

madbiologist (me-again) wrote :

OK, thanks.

Changed in gvfs (Ubuntu):
status: Fix Released → New
Nick Holloway (nwholloway) wrote :

I have had a patch accepted upstream to util-linux which means that blkid will recognize the filesystem correctly, and it will then mount.

http://git.kernel.org/?p=utils/util-linux/util-linux.git;a=commit;h=20f5be46ec57af3f21913c487000d69fb8857e18

ID_FS_LABEL=VTech_1070
ID_FS_LABEL_ENC=VTech\x201070
ID_FS_SEC_TYPE=msdos
ID_FS_TYPE=vfat
ID_FS_USAGE=filesystem
ID_FS_UUID=2004-1014
ID_FS_UUID_ENC=2004-1014
ID_FS_VERSION=FAT16

affects: gvfs (Ubuntu) → util-linux (Ubuntu)
Nick Holloway (nwholloway) wrote :

This fix is included upstream in util-linux 2.19.1, so will be fixed with the release of Oneric.

Changed in util-linux (Ubuntu):
status: New → Fix Released
To post a comment you must log in.