OESF Portables Forum

Everything Else => Zaurus Distro Support and Discussion => Distros, Development, and Model Specific Forums => Archived Forums => Angstrom & OpenZaurus => Topic started by: carpman on October 28, 2004, 04:27:52 pm

Title: usb net/storage package
Post by: carpman 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.
Title: usb net/storage package
Post by: Mickeyl on October 29, 2004, 06:15:06 am
Very good. Please send the .oe file to oe@handhelds.org.
Title: usb net/storage package
Post by: lardman 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
Title: usb net/storage package
Post by: carpman 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/ (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.
Title: usb net/storage package
Post by: carpman 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.
Title: usb net/storage package
Post by: Mickeyl 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 (http://handhelds.org/download/toolchain/archive/cross-2.95.3.tar.bz2)

All other toolchains are built by OE during the process.
Title: usb net/storage package
Post by: lardman on October 31, 2004, 06:52:21 am
Quote
I'm using the binaries from http://sgp.zaurii.net/binaries/ (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
Title: usb net/storage package
Post by: carpman 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.
Title: usb net/storage package
Post by: panyo 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.
Title: usb net/storage package
Post by: lardman 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
Title: usb net/storage package
Post by: panyo 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 (http://students.bath.ac.uk/enpsgp/Zaurus/usb-storage_1.0.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 (https://www.oesf.org/forums/index.php?showtopic=1485&hl=start_storage\.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?
Title: usb net/storage package
Post by: Greg2 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
Title: usb net/storage package
Post by: panyo 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.
Title: usb net/storage package
Post by: lardman 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
Title: usb net/storage package
Post by: Greg2 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
Title: usb net/storage package
Post by: panyo on December 30, 2004, 01:10:51 pm
Quote
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?
Ok! That worked.
I was using 2.4.22.
I switched to kernel version 2.6.7 and could see the Z in the vendor information of dmesg. After initial failures saying no medium was found it worked. Immediately before, I had tried running the storage script twice before replacing the Z in the cradle. Then I saw the following and was able to mount and see my CF card.
Code: [Select]
ohci_hcd 0001:01:18.0: remote wakeup
usb 1-1: new full speed USB device using address 10
scsi1 : SCSI emulation for USB Mass Storage devices
  Vendor: Sharp     Model: SL-5500           Rev: 1.00
  Type:   Direct-Access                      ANSI SCSI revision: 02
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
USB Mass Storage device found at 10
After unmounting and removing the Zaurus in an attempt to replicate my success,  it is no longer seen. But at least I have one shot per reboot, which will do for the lab computers, assuming OSX and Windows will also see the usb device.

A curious thing I have noticed in trying to read dmesg is that it is rapidly (a line or two per second) being filled with lines like these:
Code: [Select]
evbug.c: Event. Dev: adb2:2.c3/input, Type: 1, Code: 28, Value: 0
evbug.c: Event. Dev: adb2:2.c3/input, Type: 0, Code: 0, Value: 0
Only the cradle was plugged in.

Looking at dmesg also helped me figure out why my media bay drive was not working (the device letter changed from hde to hdc across kernels!)
Title: usb net/storage package
Post by: CoreDump on December 30, 2004, 01:19:21 pm
I don't want to sound rude, but the time it took you all to rip an .ipk, hack it,
install scripts etc is probably longer than it would have taken someone to port the USB storage driver
to the Z5x00 kernel and thus include it in OE / the official feeds.
Title: usb net/storage package
Post by: Greg2 on December 30, 2004, 01:31:29 pm
@panyo

Is this the Yellow Dog in your sig?

I've never used it... but would be curios as to what usbview on terminal or gui says with just the cradle attached?

Maybe if you unplug the cradle after removing the Z you won't have to reboot to mount it again?

@CoreDump

This is my plan in a couple of months when I have access to dsl. In early spring I will have OE setup in my home to help out.

Greg
Title: usb net/storage package
Post by: lardman on December 30, 2004, 01:36:31 pm
I would hzve put it in myself but I'm not sure where to make the alterations to get the storage_fd module to be built, plus I've broken my wrist so Z development has taken a bit of a back seat to just trying to do normal stuff.


Si
Title: usb net/storage package
Post by: CoreDump on December 30, 2004, 01:56:16 pm
Hey, I didn't want to accuse anyone of anything  
It is just a little bit frustrating to see such threads where people spend hours upon
hours to "fix" a binary .ipk (which is in the end kinda pointless)

And guess what? In 3.5.3 the threads will probably start all over again.

The time would be so much better invested in OE.
Porting the driver to Z5x00 should be trivial for a developer. The code is already
in the C7x0 / c8x0 kernel IIRC.

Bleh, what's the correct plural of "kernel"?

If anyone wants to have a go at it, I'll happily provide C7x0 and Z5x00 kernel source archives as they are used for OZ (ie including all patches).
Title: usb net/storage package
Post by: panyo on December 30, 2004, 03:24:19 pm
Quote
@panyo

Is this the Yellow Dog in your sig?

I've never used it... but would be curios as to what usbview on terminal or gui says with just the cradle attached?

Maybe if you unplug the cradle after removing the Z you won't have to reboot to mount it again?

Greg
Greg2,
Now the Z mounted in my
Linux version 2.4.22-ben2 (Gentoo, my YDL machine is dormant atm).
Then when I tried to re-insert after unmounting it, I think this was the key error:
Code: [Select]
usb-storage: host_reset() requested but not implementedSubsequent attempts to re-insert gave
Code: [Select]
bash-2.05b# dmesg -c
usb.c: USB disconnect on device 10:19.0-1 address 5
hub.c: new USB device 10:19.0-1, assigned address 6
emi26_probe start<7>WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 6
In usbview, the cradle alone does not appear, and the Z does appear when inserted
with , among others,
Code: [Select]
    Interface Number: 0
  Name: usb-storage
  Alternate Number: 0
  Class: 08(stor.)
  Sub Class: 6
  Protocol: 50
  Number of Endpoints: 2
Trying to mount (after un/replugging the cradle) gives this:
Code: [Select]
#mount /mnt/zaurus/
mount: /dev/sda is not a valid block device
and
Code: [Select]
# mount -t vfat /dev/sdb /mnt/zaurus
mount: wrong fs type, bad option, bad superblock on /dev/sdb,
       or too many mounted file systems

Building a new 2.6.9 kernel to support my ext3 volumes now, so this may be of only historical
interest after I re-boot, but here it is for completeness while I wait (and for my reference in case I develop the skills to work on this in the near future).
Title: usb net/storage package
Post by: lardman on December 30, 2004, 05:43:48 pm
@Coredump:

It's easier than that. The storage_fd.o module can be built 'out of the box' for the Cxxx machines (it comes with the C860, and is in the source, just needs to be enabled somehow). For the 5500, sa1100_bi needs (well, actually it works with the original actually, but someone provided a kernel patch in one of the original threads) to be patched, and storage_fd.o needs to be added (as I don't think the appropriate source is in the 5500 kernel source tree).

What it will need is a GUI app to select the connection method, and a patch to the hotplug scripts to load the appropriate drivers, depending on the user's choice. Maslovsky did these things for cacko in short order after it was proven to work and I don't think it'd be that hard for OE (assuming someone knows how to alter what modules are built with the kernel).

If someone wants to produce a GUI app and add it that would be useful as I've not done any GUI programming.


Si

P.S. The lock-up thing happens with my C750 too (part of my reason for not pushing to get it added), I've no idea why, as it was fine with 3.3.6pre1 on both the C750 & sl5500 (except that perhaps the kernel modules need to be rebuilt as we're using ones for 3.3.6pre1...?).
Title: usb net/storage package
Post by: panyo on January 04, 2005, 04:06:23 am
Running Linux version 2.6.10-rc3 everything works fine.
To get the Zaurus to show up after unplugging, I just have to re-run the
start_storage.sh script

Just plugging it in makes it show up in dmesg, but it stops at
Code: [Select]
usb-storage: waiting for device to settle before scanning.
Runnig the script makes it show up again in dmesg, as if I plugged it in again,
but this time it settles.

Can't wait to try it on a lab computer and remove the card reader from my wallet!
Title: usb net/storage package
Post by: panyo on January 24, 2005, 10:57:18 pm
Quote
Can't wait to try it on a lab computer and remove the card reader from my wallet!
[div align=\"right\"][a href=\"index.php?act=findpost&pid=60488\"][{POST_SNAPBACK}][/a][/div]
Ok, I tried it on a lab mac and saw nothing. I tried it on a lab PC, and it shows up as a removable disk. but when I open it, it contains nothing.  These are public machines on which I cannot install things. I am out of luck?
Title: usb net/storage package
Post by: lardman on January 25, 2005, 05:33:04 am
It should work without anything needing to be installed on XP/2k.

When I was working out how to get it all working in the first place I had the same problem as you do now - the drive shows up, but there's nothing there (I think it asked me to format when I tried to open the drive, that or it complained).

Take a look at the original thread and see if there's anything relevant there that I've forgotten.

I'll dig out my collie this evening and see if I can come up with any suggestions.


Si
Title: usb net/storage package
Post by: panyo on January 25, 2005, 03:35:45 pm
Quote
It should work without anything needing to be installed on XP/2k.

When I was working out how to get it all working in the first place I had the same problem as you do now - the drive shows up, but there's nothing there (I think it asked me to format when I tried to open the drive, that or it complained).

Take a look at the original thread and see if there's anything relevant there that I've forgotten.

I'll dig out my collie this evening and see if I can come up with any suggestions.


Si
[div align=\"right\"][a href=\"index.php?act=findpost&pid=63849\"][{POST_SNAPBACK}][/a][/div]
Thanks Lardman, I had a look.
The thread in which you posted your scripts started with you and Maslovsky having a problem that appeared similar to mine. You seemed to solve it by loading the modules, then suspending and waking up again before plugging in. I have just tried that sequence. On a PC I get that the USB device is malfunctioning and see an empty USB device listed. On a Mac I see the following in dmesg:
Code: [Select]
USBF:   2907.190        AppleUSBHubPort: Error 0xe00002ed: set feature (resetting port)
USBF:   2907.988        AppleUSBOHCI[0x1c7e800]::MakeDevice error setting address. err=0xe00002ed device=0x2747f00 - releasing device
USBF:   2908.788        AppleUSBOHCI[0x1c7e800]::MakeDevice error setting address. err=0xe00002ed device=0x1f8bc00 - releasing device
USBF:   2909.588        AppleUSBOHCI[0x1c7e800]::MakeDevice error setting address. err=0xe00002ed device=0x1f8bc00 - releasing device
This SL-5500 works fine in both network and USB mode in Linux where I mount it by hand as I do my card readers. (and my flash cards are fine on all computers with a reader).
Title: usb net/storage package
Post by: chrisl on August 30, 2006, 03:53:35 pm
Quote
Quote
It should work without anything needing to be installed on XP/2k.

When I was working out how to get it all working in the first place I had the same problem as you do now - the drive shows up, but there's nothing there (I think it asked me to format when I tried to open the drive, that or it complained).

Take a look at the original thread and see if there's anything relevant there that I've forgotten.

I'll dig out my collie this evening and see if I can come up with any suggestions.


Si
[div align=\"right\"][a href=\"index.php?act=findpost&pid=63849\"][{POST_SNAPBACK}][/a][/div]
Thanks Lardman, I had a look.
The thread in which you posted your scripts started with you and Maslovsky having a problem that appeared similar to mine. You seemed to solve it by loading the modules, then suspending and waking up again before plugging in. I have just tried that sequence. On a PC I get that the USB device is malfunctioning and see an empty USB device listed. On a Mac I see the following in dmesg:
Code: [Select]
USBF:   2907.190        AppleUSBHubPort: Error 0xe00002ed: set feature (resetting port)
USBF:   2907.988        AppleUSBOHCI[0x1c7e800]::MakeDevice error setting address. err=0xe00002ed device=0x2747f00 - releasing device
USBF:   2908.788        AppleUSBOHCI[0x1c7e800]::MakeDevice error setting address. err=0xe00002ed device=0x1f8bc00 - releasing device
USBF:   2909.588        AppleUSBOHCI[0x1c7e800]::MakeDevice error setting address. err=0xe00002ed device=0x1f8bc00 - releasing device
This SL-5500 works fine in both network and USB mode in Linux where I mount it by hand as I do my card readers. (and my flash cards are fine on all computers with a reader).
[div align=\"right\"][a href=\"index.php?act=findpost&pid=63908\"][{POST_SNAPBACK}][/a][/div]

I realize this is an old thread, but usb accessibility is important to me. I have used the usb-storage package mentioned on this thread on Cacko. I also know there is one created for OZ, but apparently for a much older version. I have tried to install that OZ version, but it refuses to install for me, even with --force depends. It gives me a warning about qpe-base 1.5 and then later aborts. Is there a way to make it install? Or is there another version of usb-storage out there that works on OZ and a Collie?
Title: usb net/storage package
Post by: lardman on September 01, 2006, 09:48:20 am
For Collie, I think the fd_storage.o module should now be compiled and install as standard. Is this not the case?

Si
Title: usb net/storage package
Post by: chrisl on September 04, 2006, 11:28:26 pm
Quote
For Collie, I think the fd_storage.o module should now be compiled and install as standard. Is this not the case?

Si
[div align=\"right\"][a href=\"index.php?act=findpost&pid=140460\"][{POST_SNAPBACK}][/a][/div]


Not sure, but never the less, it does not work. GPE has a piece of software for usb mass storage that also does not work. Its kinda of strange that an ancient kernel like the Cacko/Crow does have usb storage that works. Oh well, sigh...

Chris--
Title: usb net/storage package
Post by: lardman on September 05, 2006, 05:28:39 am
I'll take a look at it.

Si
Title: usb net/storage package
Post by: chrisl on September 09, 2006, 01:02:51 pm
Quote
I'll take a look at it.

Si
[div align=\"right\"][a href=\"index.php?act=findpost&pid=140742\"][{POST_SNAPBACK}][/a][/div]

I would appreciate it very much. While the Cacko/Crow ROM is fairly stable, it is slow and the user interface is somewhat crude, being based on QTopia 1.5.4. I used the Hentges ROM for almost two month, but my wife took away the digital camera I was using as a card reader to transfer data.

Chris--
Title: usb net/storage package
Post by: lardman on October 12, 2006, 07:17:30 am
I forgot (been busy)! I'll take a look this evening, sorry!


Si