Author Topic: USB Storage ported to 5xxx ROM\'s ?  (Read 25402 times)

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
USB Storage ported to 5xxx ROM\'s ?
« Reply #15 on: February 20, 2004, 07:57:53 am »
I\'ve had a look to see what code 10 means and the answer is both not alot and quite alot. Basically it can mean almost anything, a couple of which are that the driver is non-conformant to the Windows driver, or that the driver has a problem. No luck there then, I\'ll take a look in the system logs and see whether there\'s anymore info there (but I doubt it).

I presume that Linux will provide more info? I\'ll have a go mounting it this evening and report back.


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

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
USB Storage ported to 5xxx ROM\'s ?
« Reply #16 on: February 20, 2004, 08:56:05 am »
Foxdie has kindly presented me with what /proc/usb-storage should look like (on hos C860). Here\'s a copy:

Code: [Select]
Protocol status:STORAGE_IDLE

USB status:USB_CONNECT

Media status:MEDIA_INSERT

Media chage:MEDIA_CHANGE_OFF

Device name:/dev/hda1

Device file descriptor:0xc3183940

Device size:0x64471040

Device block size:0x512

Device write protect:WR_PROTECT_OFF

Bulk in max size:4096

Bulk out max size:0

device write error:0

device read error:0

device flush error:0

write data bulk out timout:0

device write max time:0 msec

Schedule task max num:0x512

Schedule task use num:0x0

Schedule task max use num:0x2


It looks like the differences are:

USB status:USB_CONNECT - this is connected now
Media chage:MEDIA_CHANGE_OFF - this says off rather than on - ??
Device file descriptor:0xc3183940
Device size:0x64471040 - these display something now
Bulk in max size:4096 - again this is !=0


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

Stubear

  • Hero Member
  • *****
  • Posts: 1164
    • View Profile
    • http://
USB Storage ported to 5xxx ROM\'s ?
« Reply #17 on: February 20, 2004, 09:16:05 am »
Quote
Cheers, I\'ve grabbed the files.

Quote

Quote
On a side not, can the cards be ext2 formatted?

Yes, but Windows will not read it.

In the standard case in a card reader, etc. but is this also true when using the Z as a mass storage device. I was wondering whether it would be okay as the Z\'s kernel is still being used to transfer the data back and forth.


Si

It\'s still true, the kernel isn\'t actually transfering the data - the usb storage module is - basically it turns your Z into a card reader - you can only choose CF or SD, not the main memory.

It doesn\'t translate ext2 into windoze readable format - although you could possibly use explore2fs or similair program to read the ext2 card.

Stu
SL-C1000, Hand converted to English with Japanese Input
Running X apps via X/Qt
iRiver USB host cable; Diatec P-Cord usb power cable (extendable); Acro's Reel Cable USB (A to A, B, Mini-B,  & Mini-B 8pin); GreenHouse 1Gb PicoDrive+; 2x256Mb Hagiwara SD cards; 128Mb Transcend CF card; 512Mb PQI CF card; AmbiCom WL1100C-CF 11B WLAN card

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
USB Storage ported to 5xxx ROM\'s ?
« Reply #18 on: February 20, 2004, 09:26:57 am »
Ah, fair enough, I was just wondering. In any case I have been testing with a FAT16 CF card so that can\'t be the problem.


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

Stubear

  • Hero Member
  • *****
  • Posts: 1164
    • View Profile
    • http://
USB Storage ported to 5xxx ROM\'s ?
« Reply #19 on: February 20, 2004, 09:31:02 am »
When my Z was working, I would get a \"USB error\" if I tried to change from net to storage using qtsamba (C860 NAND on C760) if the Z was already connected to my desktop, had to unplog the cable to get it to change then plug it in again to be mounted as usb-storage.

Not sure if the same thing applies to the 5xxx Zs but it might be worth a try.

Stu
SL-C1000, Hand converted to English with Japanese Input
Running X apps via X/Qt
iRiver USB host cable; Diatec P-Cord usb power cable (extendable); Acro's Reel Cable USB (A to A, B, Mini-B,  & Mini-B 8pin); GreenHouse 1Gb PicoDrive+; 2x256Mb Hagiwara SD cards; 128Mb Transcend CF card; 512Mb PQI CF card; AmbiCom WL1100C-CF 11B WLAN card

maslovsky

  • Hero Member
  • *****
  • Posts: 1426
    • View Profile
    • http://my-zaurus.narod.ru
USB Storage ported to 5xxx ROM\'s ?
« Reply #20 on: February 20, 2004, 09:42:21 am »
Simon,

I\'m afraid that the problem is in the sa1100_bi  driver  - that\'s the only difference USB modules between C7x0 and 5500 devices. I think pxa_bi driver has been updated to support storage functions, while sa1100_bi is still the same as for stock 5500 ROM.

I\'m not sure usb storage will work untill sa1100_bi  driver is patched...

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
USB Storage ported to 5xxx ROM\'s ?
« Reply #21 on: February 20, 2004, 09:53:56 am »
Yep, I tend to a agree with you. Once I get a Linux box up on the net I\'ll download the kernel and have a look see. I would have thought that there\'d be some errors somewhere though? I had a look for a klogd binary but no luck, however from reading the man page it looks as though /proc/kmsg is where the messages are placed. That said I don\'t know whether this will work or not. I\'ll have a look at it.

In any case, it\'s been an interesting diversion.


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

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
USB Storage ported to 5xxx ROM\'s ?
« Reply #22 on: February 20, 2004, 09:58:26 am »
That\'s funny, I just went to look at the web site for the iPAQ storage module which I downloaded this morning (the iPAQ he was using is also an SA machine so I thought I\'d do a diff on the sa1100_bi or equivalent sources that the iPAQ and Z use) and it looks like the guy has taken all of the usb-storage info down. I have a copy though if anyone\'s interested.

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

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
USB Storage ported to 5xxx ROM\'s ?
« Reply #23 on: February 22, 2004, 11:06:06 am »
Has anyone with a 5600 tried what we\'ve been doing?

I\'d be interested to know whether it works and am hopeful it won\'t because then I can compare the differences between your kernel and the c860 one (they should be closer than the sl5500 and c860 kernels) and try to work out what needs to be added to the sl5500 (and sl5600) to make it work.

If anyone\'s willing, it should take about 10min (once you\'ve got the files on your Z), post here if you need any more instructions, etc.

Thanks,


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

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
USB Storage ported to 5xxx ROM\'s ?
« Reply #24 on: February 26, 2004, 05:23:34 am »
I compiled storage_fd (not as part of the kernel, but by hand - a bit of a pain) and now I get a new G: drive in \"My Computer\", unfortunately when I click on it Windows tells me to \"insert a disk into drive G:\".

Progress of a sort (for me at least), I\'ve just downloaded the USB spec to see if I can work out any more.


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

Mitch

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://
USB Storage ported to 5xxx ROM\'s ?
« Reply #25 on: February 26, 2004, 07:08:13 am »
Can I ask the question of why?
Why not just use samba, then map the folders as network drives?

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
USB Storage ported to 5xxx ROM\'s ?
« Reply #26 on: February 26, 2004, 07:12:29 am »
Because to use samba you either need drivers (for Windows) or to perform some setup (Linux) on the host machine. With usb-storage you just plug and go.


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

Mitch

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://
USB Storage ported to 5xxx ROM\'s ?
« Reply #27 on: February 26, 2004, 07:52:52 am »
I was able to do it on Win98 and XP Pro with only the supplied drivers for my Zaurus.
After setting the communication to TCP/IP advanced I was able to map the network drives.

maslovsky

  • Hero Member
  • *****
  • Posts: 1426
    • View Profile
    • http://my-zaurus.narod.ru
USB Storage ported to 5xxx ROM\'s ?
« Reply #28 on: February 26, 2004, 08:47:26 am »
Quote
I compiled storage_fd (not as part of the kernel, but by hand - a bit of a pain) and now I get a new G: drive in \"My Computer\", unfortunately when I click on it Windows tells me to \"insert a disk into drive G:\".

Progress of a sort (for me at least), I\'ve just downloaded the USB spec to see if I can work out any more.


Si

That\'s where I stopped

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
USB Storage ported to 5xxx ROM\'s ?
« Reply #29 on: February 26, 2004, 09:25:04 am »
Yes I realise that, I was trying to use the c860 binary and I didn\'t even get that far. After compiling the code I\'ve at least got a disk drive showing, and looking at the source I\'ve not actually changed anything in particular (ie the defines all seem to give the same numbers) so I was hopeful that I might be able to get further once I work out what I did actually change.

How did you get the module to compile? Did you compile the C860 kernel source after making alterations to the defconfig (or whatever menuconfig produces) file? I was trying to import the module into the OE (Openzaurus build system) kernel but it refuses to be compiled. In the end I had to look at the compile log when I built the OZ kernel and copy the arm-linux-gcc calls for building net_fd.o and adapt paths, etc.

It\'s a bit difficult to compare the differences between the c860 source and the 5500 source as all of the extra pxa stuff is in there. I\'ve got a quick test script which I\'ll ask someone with a 5600 to run. I hope that it won\'t work, then I can compare the 5600 kernel with the c860 kernel (which should be closer) and see whether I can work out the differences. I\'ll post that in a separate thread though with a more descriptive title.


Si

P.S. @mitch:
Quote
with only the supplied drivers for my Zaurus
- exactly, with usb mass storage you don\'t need any drivers, you just plug in and WinXP/2K and Linux will automagically recognise the device and allow you to read/write to it. This means that you don\'t have to carry around a CD with the drivers on it, etc.
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