Author Topic: Write My Own Usb Driver  (Read 6168 times)

markluk41

  • Newbie
  • *
  • Posts: 3
    • View Profile
Write My Own Usb Driver
« on: July 03, 2006, 05:30:39 pm »
I have a Zaurus SL-6000, running the factory Sharp ROM. I need to write my own usb device driver or modify the exisiting one. If it turns out that its not possible to do it with the Sharp ROM, I have installed OZ in the past and I don't mind doing it strictly for this purpose. Sorry if this question doesn't really belong in this forum. I wasn't sure where else to post it.  We don't have a "gerneal kernel hacking forum," which would have been the most appropriate one for this post.


Basically, I need to write a small piece of code at the kernel device level, so that the Zaurus can send and receive messages from a computer via the USB interface. Do anyone have any pointers on where I can get started with that?

There is a small usb interface on the Sharp Zaurus docking station, which can be used to transfer files. I was hoping that this should allow me to communicate with the computer.

I went on the Zaurus itself and looked at any modules that deals
with the USB.  There seems to be a couple.

# lsmod | grep usb
prism2_usb             68032   1
p80211                 18880   1  [prism2_usb]
usbdcore               34544   0  [pxa_bi net_fd]
usbdmonitor             5248   0
usb_ohci_tc6393        24544   0
usbcore                52048   1  [prism2_usb usb_ohci_tc6393]
#


My initial reaction was to get the corresponding source code, and then modify it, compile it, and reload the module. Does this seem like to be the correct direction?

Thanks

Mark

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Write My Own Usb Driver
« Reply #1 on: July 03, 2006, 09:27:56 pm »
Quote
I have a Zaurus SL-6000, running the factory Sharp ROM. I need to write my own usb device driver or modify the exisiting one. If it turns out that its not possible to do it with the Sharp ROM, I have installed OZ in the past and I don't mind doing it strictly for this purpose. Sorry if this question doesn't really belong in this forum. I wasn't sure where else to post it.  We don't have a "gerneal kernel hacking forum," which would have been the most appropriate one for this post.


Basically, I need to write a small piece of code at the kernel device level, so that the Zaurus can send and receive messages from a computer via the USB interface. Do anyone have any pointers on where I can get started with that?

There is a small usb interface on the Sharp Zaurus docking station, which can be used to transfer files. I was hoping that this should allow me to communicate with the computer.

I went on the Zaurus itself and looked at any modules that deals
with the USB.  There seems to be a couple.

# lsmod | grep usb
prism2_usb             68032   1
p80211                 18880   1  [prism2_usb]
usbdcore               34544   0  [pxa_bi net_fd]
usbdmonitor             5248   0
usb_ohci_tc6393        24544   0
usbcore                52048   1  [prism2_usb usb_ohci_tc6393]
#


My initial reaction was to get the corresponding source code, and then modify it, compile it, and reload the module. Does this seem like to be the correct direction?

Thanks

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


just grab the kernel code and take the usb ethernet modules as a template and hack away
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Write My Own Usb Driver
« Reply #2 on: July 04, 2006, 07:32:03 am »
What are you trying to achieve?

Could you not use the usb host mode (I think the tosa has this...?)


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