Author Topic: C3000 Usb Host: Auto Mount And Umount Usb Hdd  (Read 40094 times)

DreamTheater

  • Newbie
  • *
  • Posts: 44
    • View Profile
    • http://
C3000 Usb Host: Auto Mount And Umount Usb Hdd
« on: January 04, 2005, 08:21:13 am »
I tested this with C3000 (ROM 1.01 JP).  Use a USB mini-A cable to connect C3000 with your USB mass-storage device.

[Procedures]
1)
Code: [Select]
cd /mnt
mkdir usbhdd

2) Create a file /etc/hotplug/usb/usb-storage as follows.  chmod it as 755.
Code: [Select]
#!/bin/sh
. /etc/hotplug/hotplug.functions
if [ ! -L /var/run/usb/%proc%bus%usb%* ]; then
  mesg Try to Mount
  mount /mnt/usbhdd
  if [ $? = 0 ]; then
    ln -s /etc/hotplug/usb/usb-storage.off $REMOVER
    mesg make REMOVER in $REMOVER
  fi
fi

3) Create a file /etc/hotplug/usb/usb-storage.off as follows.  chmod it as 755.
Code: [Select]
#!/bin/sh
. /etc/hotplug/hotplug.functions
mesg Removing /mnt/usbhdd
umount /mnt/usbhdd
rmmod usb-storage

4) Add the following one line to /etc/fstab
Code: [Select]
/dev/sda1       /mnt/usbhdd     vfat    noauto,umask=000,noatime,iocharset=utf8,codepage=932    0  0
5) Connect your USB mass-storage device, you should be able to see it at /mnt/usbmem in a second you pluged the device.  This is also visible from Sharp's qtopia GUI File manager.
« Last Edit: January 04, 2005, 12:11:28 pm by DreamTheater »

orange

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
C3000 Usb Host: Auto Mount And Umount Usb Hdd
« Reply #1 on: January 04, 2005, 11:48:01 am »
hi DreamTheater

thx for your instructions but i cant get it running  

I followed the Procedure you described but nothing happens

are you sure that the fstab line is correct? cuz first we create /mnt/usbhdd but then you talk about /mnt/usbmem ?

but I tried both but none work for me (I use the same GoldX Cable)

thx
SL-C3000 / Cacko 3kb1
512MB SD/CF Kingston
DLink DCF-660W W-LAN
Socket Ethernet
Nokia DTL-1 Bluetooth
Pretec CF 56k Modem
I DON'T SYNC ;-)

DreamTheater

  • Newbie
  • *
  • Posts: 44
    • View Profile
    • http://
C3000 Usb Host: Auto Mount And Umount Usb Hdd
« Reply #2 on: January 04, 2005, 12:12:32 pm »
Oops sorry. just corrected.

orange

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
C3000 Usb Host: Auto Mount And Umount Usb Hdd
« Reply #3 on: January 06, 2005, 07:52:25 pm »
had a typo in one of the files it now works great!  

shame on sharp that they did not put that in by sock
SL-C3000 / Cacko 3kb1
512MB SD/CF Kingston
DLink DCF-660W W-LAN
Socket Ethernet
Nokia DTL-1 Bluetooth
Pretec CF 56k Modem
I DON'T SYNC ;-)

pierro78

  • Newbie
  • *
  • Posts: 26
    • View Profile
    • http://seattlefrancophone.info
C3000 Usb Host: Auto Mount And Umount Usb Hdd
« Reply #4 on: January 06, 2005, 10:01:02 pm »
sorry if I am a little off topic but can the C3000 USB port provide enough power to power a small 1.8" unpowered hard drive ? like the 6000 does for the (quite "cheap") 1.8" archos unpowered drives ? has anybody tried that ?

(I suppose it should if it has same specs as the 6000 USB port as everybody says but I'd like to be sure of that  )
(sorry if my english is not so good btw)

DreamTheater

  • Newbie
  • *
  • Posts: 44
    • View Profile
    • http://
C3000 Usb Host: Auto Mount And Umount Usb Hdd
« Reply #5 on: January 08, 2005, 03:03:02 am »
I once tried my friend's 2.5inch bus-power type hard drive, but my C3000 couldn't power it.  I am not sure how much current we can draw from C3000 USB host.  It could be smaller than that of 6000, because C3000's USB host functionality is inside Intel PXA270 chip.
It looks like Archos bus-powered 1.8 inch hard drive is using Hitachi's drive which typically requires 200 - 300 mA, where typical 2.5 inch drive requires 500mA range.

The other option is to use MP3 player type hard drives or to use battery powered USB hub.

http://www.cyberpowersystems.com/hub420mp.htm

This can be found at BestBuy.

spartan

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
C3000 Usb Host: Auto Mount And Umount Usb Hdd
« Reply #6 on: January 15, 2005, 12:53:46 pm »
I followed the scripts as-written. However, they do not work. The FSTAB line works correctly, as I can mount and umount a USB key and a camera. All files have /mnt/usbstorage instead of /mnt/usbhdd ; either way, the auto-mount doesn't work.

I cannot mount, however, an iPod, period. It is FAT32 formatted.

Any advice for either problem would be greatly appreciated.
C3000 with Tetsu v18d Special Kernel and Sharp 1.11JP ROM
1GB Lexmark SD, 2GB Mini SD, Socket Revision H Bluetooth, Ambicom Wi-Fi

tcv

  • Newbie
  • *
  • Posts: 18
    • View Profile
C3000 Usb Host: Auto Mount And Umount Usb Hdd
« Reply #7 on: January 15, 2005, 06:35:21 pm »
What have you tried to mount an iPod?

Does this offer any help?

http://people.csail.mit.edu/people/adonovan/hacks/ipod.html

Why not?
« Last Edit: January 15, 2005, 06:45:52 pm by tcv »

DreamTheater

  • Newbie
  • *
  • Posts: 44
    • View Profile
    • http://
C3000 Usb Host: Auto Mount And Umount Usb Hdd
« Reply #8 on: January 15, 2005, 07:51:03 pm »
spartan,

Those scripts above are only for automatic mount/umount.  Device driver should be loaded automatically without those scripts.
So, when you plug in your iPod, try lsmod command to see if usb-storage module is really loaded.   If it doesn't show usb-storage, it means iPod is not Linux usb-storage compliant.  Sorry, I don't have iPod myself, so don't know the detail.

If you can see usb-storage, then try the below to see what it shows.  Note that Linux treats USB mass storage as SCSI device.
Code: [Select]
# fdisk -l /dev/sda
If you can see the disk, then you may be able to manually mount it.
Code: [Select]
mount -t vfat -o umask=000,noatime,iocharset=utf8,codepage=932 /dev/sda1 /mnt/usbhdd

spartan

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
C3000 Usb Host: Auto Mount And Umount Usb Hdd
« Reply #9 on: January 16, 2005, 01:55:45 pm »
Thanks a lot for the help and links. Evidently, the partition the iPod actually uses for data is partition 2. In turn, via telnet:

Code: [Select]
bash-2.05# /sbin/lsmod
Module                  Size  Used by
usb-storage           103328   0  (unused)
usb_ohci_pxa27x        21696   0  (unused)
usbcore                63264   1  [usb-storage usb_ohci_pxa27x]
pxa_bi                 24912   0  (unused)
storage_fd            100336   0  (unused)
usbdcore               35504   0  [pxa_bi storage_fd]
usbdmonitor             5488   0
usb-monitor             6496   0
sharp_mmcsd_m          41008   1
prism2_cs              69584   1
p80211                 18864   1  [prism2_cs]
bash-2.05# /sbin/fdisk -l /dev/sda

Disk /dev/sda: 15.0 GB, 15000330240 bytes
255 heads, 63 sectors/track, 1823 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sda1   *         1         5     40131    0  Empty
/dev/sda2   *         6      1823  14603085    b  Win95 FAT32
/dev/sda3             1         1         0    0  Empty
Partition 3 does not end on cylinder boundary.
bash-2.05# mount -t vfat -o umask=000,noatime,iocharset=utf8,codepage=932 /dev/sda2 /mnt/usbstorage
bash-2.05#

Everything works fine. Thanks again. Now I can use it as a portable video player...
C3000 with Tetsu v18d Special Kernel and Sharp 1.11JP ROM
1GB Lexmark SD, 2GB Mini SD, Socket Revision H Bluetooth, Ambicom Wi-Fi

daXd

  • Newbie
  • *
  • Posts: 20
    • View Profile
C3000 Usb Host: Auto Mount And Umount Usb Hdd
« Reply #10 on: January 20, 2005, 12:22:44 pm »
I have two following problems with mounting SL-C3000 as a USB mass storage.

1) When I plug the cable into the Zaurus, "AlertUSBStarage" warning window is displayed. Then I have to click on "Yes" and "AlertUSBStorageConnection" warning is displayed. I click on "OK" and remove the cable. Than I plug the cable in again and Zaurus display "Comunicating..." screen and it is OK. But everytime I have to go through two warning windows and "plug in -> remove -> plug in cable again" way.

2) Sometimes is zaurus mounted as read-only. Well, it is not exactly mounted as read-only, mount command shows rw, but it is impossible to write to mounted Zaurus. I am not able to predicate when I could write to Zaurus and when not. And when Zaurus in "writable", Midnight Commander says "it is impossible to change file permissions" after every file.

One note for Fedora users. Zaurus is mounted as /dev/sda on my FC1 box.
SL-C3000, SHARP "ROM"

papercrane

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • http://reversefold.com
C3000 Usb Host: Auto Mount And Umount Usb Hdd
« Reply #11 on: February 07, 2005, 02:02:35 pm »
Thanks much, DreamTheater, works like a charm. Now I just need to get my USB HD Enclosure with a built-in battery. ;-)

papercrane

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • http://reversefold.com
C3000 Usb Host: Auto Mount And Umount Usb Hdd
« Reply #12 on: February 09, 2005, 01:18:44 pm »
Hmmm, one caveat, though. The Music player won't see my USB drive. Everything else sees it (even the Movie player sees it!), but the Music player won't. Any ideas?

See my other post

papercrane

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • http://reversefold.com
C3000 Usb Host: Auto Mount And Umount Usb Hdd
« Reply #13 on: February 16, 2005, 04:26:15 pm »
Quick update, symlinking the USB HD mount point to /mnt/card causes the Music Player to say an SD Card is inserted (which is actually the USB HD). All of the other apps still say "Storage /dev/sda1".

benplaut

  • Full Member
  • ***
  • Posts: 113
    • View Profile
C3000 Usb Host: Auto Mount And Umount Usb Hdd
« Reply #14 on: June 14, 2005, 12:12:42 am »
sorry to sound like such a n00b here (i'm used to Linux desktop systems, which readily give you root access, and let you actually see the filesystem)

How do i save to directories other than /home/[whatever name it has]/ ... that seems to be the only thing that the Z recognizes,,,

when i "cd" in the bash prompt, the prom[t remains the same, not indicating the new directory...

what am i doing wrong?  

<<edit>>

Tree!Explorer  

--

anyway... could i motify this for USB thumdrives for every time it says "usbhdd", replace it with "usbstorage"... that's what thumbdrives are mounted to

i think    
« Last Edit: June 14, 2005, 03:26:14 am by benplaut »