Author Topic: usb net/storage package  (Read 10162 times)

carpman

  • Newbie
  • *
  • Posts: 14
    • View Profile
usb net/storage package
« on: October 28, 2004, 04:27:52 pm »
Hey all. I almost have an ipkg for usb-storage on OZ. I've tested the module and it works on 3.5.1, it comes with a script called usbcontrol that lets you switch from net to usb, and get the current status. It should also save state over reboots. opie-sh front end too. I'll upload as soon as I get home from work.

Mickeyl

  • Hero Member
  • *****
  • Posts: 1495
    • View Profile
    • http://www.Vanille.de
usb net/storage package
« Reply #1 on: October 29, 2004, 06:15:06 am »
Very good. Please send the .oe file to oe@handhelds.org.
Cheers,

Michael 'Mickey' Lauer | Embedded Linux Freelancer | www.Vanille-Media.de
Consider donating, if you like the software I contribute to.

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
usb net/storage package
« Reply #2 on: October 29, 2004, 06:40:28 am »
Good work. Have you patched the kernel to make the modules (pxa_bi/sa_bi and storage_fd)?

Do you have troubles if you switch from net -> storage -> net? With the old modules I'm getting some problems when I try to go back to net (script never returns and once I suspend I can't switch back on without a reset).


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

carpman

  • Newbie
  • *
  • Posts: 14
    • View Profile
usb net/storage package
« Reply #3 on: October 30, 2004, 04:18:15 pm »
I haven't patched the kernel, haven't had time to install OE yet, thats on my list for today. I'm using the binaries from http://sgp.zaurii.net/binaries/. I just extracted the data.tar.gz and pulled the modules from it. I haven't noticed much oddness, I had one hiccup with insert/remove but I didn't go back to net in between. I'm guessing it was the windows xp machine I'm testing on. It has a know odd USB chipset.

carpman

  • Newbie
  • *
  • Posts: 14
    • View Profile
usb net/storage package
« Reply #4 on: October 30, 2004, 09:17:47 pm »
Ack! Theres the bug you were talking about. Not accepting device ID with error -71. I suppose I need to get OE running so I can build the modules and see if it happens there. Anyone know where to download the toolchain, btw, the link from the OE wiki is dead.

Mickeyl

  • Hero Member
  • *****
  • Posts: 1495
    • View Profile
    • http://www.Vanille.de
usb net/storage package
« Reply #5 on: October 31, 2004, 04:57:57 am »
You only need the 2.95.3 toolchain which is @ http://handhelds.org/download/toolchain/ar...-2.95.3.tar.bz2

All other toolchains are built by OE during the process.
Cheers,

Michael 'Mickey' Lauer | Embedded Linux Freelancer | www.Vanille-Media.de
Consider donating, if you like the software I contribute to.

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
usb net/storage package
« Reply #6 on: October 31, 2004, 06:52:21 am »
Quote
I'm using the binaries from http://sgp.zaurii.net/binaries/ .

I didn't realise my site was still up :-)

There are two long threads about getting this working (in the General Discussion part of the forum I think) and in one of them someone listed a patch to make mass storage work with the Collie machines.

I'm not quite sure what the rmmod'ing problem is, and have been a bit too busy to try to track it down. Can anyone think of any reasons (or a method to debug this) as it would be good to get it working.

The modules don't have any errors when insmod'ed (other than a taint warning), but then it falls over when I try to rmmod pxa_bi (to go back to net mode) - I'm told that it is busy (even though the mass strorage device has been umounted, etc.).


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

carpman

  • Newbie
  • *
  • Posts: 14
    • View Profile
usb net/storage package
« Reply #7 on: October 31, 2004, 02:02:09 pm »
Yes, I'm getting that same error on my collie. I'll get that kernel compile going soon, but now.. off to work.

panyo

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
    • http://
usb net/storage package
« Reply #8 on: December 28, 2004, 11:01:13 pm »
Has there been any progress on getting this to work on Collie? Has OZ 3.5.2 made things any better for getting the Z to work as a USB mass storage device? Not having to carry around a flash card reader would be nice. As far as I know, it is not possible to connect the Zaurus to, for example, a public lab computer and get internet access through USB, so mass storage mode would be very helpful in these contexts.

Please let me know if I am wrong and either of these things works:  USB mass storage, or USB internet w/o administrator privilages.
SL5500  OZ3.5.2 (Opie), Dvorak built in keyboard
Spectrum24 Ethernet
SanDisk 256 ext2 (AR0401RF China) SD
Lexar 256 VFAT (P/N 2260, Rev. A), Transcend 128 ext2 CF
Pismo, Cube, 8600, Gentoo PowerPC, YellowDog

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
usb net/storage package
« Reply #9 on: December 29, 2004, 09:14:47 am »
USB mass storage works (with occasional lock-ups), grab the sa1100_bi.o and storage_fd.o modules and use them with the start_storage.sh and start_net.sh scripts.

Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

panyo

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
    • http://
usb net/storage package
« Reply #10 on: December 29, 2004, 06:55:01 pm »
Ok,
I used
Code: [Select]
ar -xto extract the .ipkg file from :
http://students.bath.ac.uk/enpsgp/Zaurus/u...0_OZ_SA_arm.ipk
I copied the two modules you mentioned to the path in the two scripts
you mentioned posted at :
https://www.oesf.org/forums/inde...\.sh&st=45
Running the storage script, I get a couple of no licence warnings. Then I place the Z in the cradle.
When I tried to mount it, I got this error:
Code: [Select]
# mount /mnt/zaurus/
mount: wrong fs type, bad option, bad superblock on /dev/sda,
       or too many mounted file systems

I also tried mounting by hand with
Code: [Select]
# mount -t msdos /dev/sda /mnt/zauruswith the same result. Plugging in to an OSX machine did nothing-- no volume mounted.
Mounting a CF reader worked fine.

Any ideas?
SL5500  OZ3.5.2 (Opie), Dvorak built in keyboard
Spectrum24 Ethernet
SanDisk 256 ext2 (AR0401RF China) SD
Lexar 256 VFAT (P/N 2260, Rev. A), Transcend 128 ext2 CF
Pismo, Cube, 8600, Gentoo PowerPC, YellowDog

Greg2

  • Hero Member
  • *****
  • Posts: 790
    • View Profile
    • http://
usb net/storage package
« Reply #11 on: December 29, 2004, 07:19:10 pm »
Check your dmesg output, it could mount as any of these

/dev/sda
/dev/sda1
/dev/sdb
/dev/sdb1  

Greg
« Last Edit: December 29, 2004, 07:25:01 pm by Greg2 »

panyo

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
    • http://
usb net/storage package
« Reply #12 on: December 29, 2004, 08:50:14 pm »
Quote
Check your dmesg output, it could mount as any of these

/dev/sda
/dev/sda1
/dev/sdb
/dev/sdb1  

Greg
Greg2:
Thanks. It looks like it is trying to mount on sda, but there is a problem. I get more or lest this
message over and over in dmesg:

Code: [Select]
Device busy for revalidation (usage=1)
Device 08:00 not ready.
 I/O error: dev 08:00, sector 0
FAT: unable to read boot sector
Device not ready.  Make sure there is a disc in the drive.
sda: Unit Not Ready, sense:
Info fld=0xa00 (nonstd), Current 00:00: sns = 70  2
Raw sense data:0x70 0x00 0x02 0x00 0x00 0x0a 0x00 0x00
sda : READ CAPACITY failed.
sda : status = 1, message = 00, host = 0, driver = 08
Info fld=0xa00 (nonstd), Current sd00:00: sns = 70  2
Raw sense data:0x70 0x00 0x02 0x00 0x00 0x0a 0x00 0x00
sda : block size assumed to be 512 bytes, disk size 1GB.  
sda: test WP failed, assume Write Enabled
 /dev/scsi/host1/bus0/target0/lun0: I/O error: dev 08:00, sector 0
 I/O error: dev 08:00, sector 0
 unable to read partition table
Device not ready.  Make sure there is a disc in the drive.
SL5500  OZ3.5.2 (Opie), Dvorak built in keyboard
Spectrum24 Ethernet
SanDisk 256 ext2 (AR0401RF China) SD
Lexar 256 VFAT (P/N 2260, Rev. A), Transcend 128 ext2 CF
Pismo, Cube, 8600, Gentoo PowerPC, YellowDog

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
usb net/storage package
« Reply #13 on: December 30, 2004, 06:28:21 am »
Presumably you overwrote: /lib/modules/2.4.18-rmk7-pxa3-embedix/kernel/drivers/usb/device/bi/sa1100_bi.o

You should have anyway.

I'm not sure about your error; it looks very similar to the ones I was getting when I was trying to work out whether mass storage was in fact possible. You might go back and look at the original two threads where I (with help from others) kept beating my head against the brick wall until it eventually worked ;-)

Have you tried suspending, then plugging in? Or try re-running the storage script to see whether it'll wake up if the modules are re-loaded? Were there any errors about not being able to rmmod modules?


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

Greg2

  • Hero Member
  • *****
  • Posts: 790
    • View Profile
    • http://
usb net/storage package
« Reply #14 on: December 30, 2004, 10:42:52 am »
As lardman has already noted this was not easy at first.

What is your
cat /proc/version

This didn't seem to work properly until 2.4.22 >  and later?
Have you created the zaurus directory?
I don't have a lot of time right now but you can try this

$su
#dmesg -c

plug in the Z

#dmesg

If it still looks like sda and the right file system do

#mount /dev/sda /mnt/zaurus

if that doesn't work, try

#mount -t vfat /dev/sda /mnt/zaurus

If that doesn't work I would post your output on linuxquestions.org

You can make this work... but it will be a problem on a public pc w/o su... which is what you want to do.

Greg
« Last Edit: December 30, 2004, 10:45:50 am by Greg2 »