Hello.
I need to write a driver for my device (FTDI-chip based), which is external
to
PocketPC-2002 ARM PDA, having USB host.
I think it have to be stream interface driver simulating
serial I/O (Com port). Where to start, please suggest?
I mean what sample codes from the PlatBuilder shall I consider to learn
first?
Any other suggestions (or links) are greately appreciated too.
TIA.
Serge.

Re: newbie's to USB driver question: where to start. by Rui

Rui
Sun Oct 19 00:09:17 CDT 2003

Is your device belongs to a standard class or a vendor specific one?
If it is a standard device, like printer, HID, then you may possibly don't
need to bother writing the class driver on the PDA by yourself. It may
possibley be already provided in the OS (I don't know which PPC2002 model
has usb host, but if you got one, then it makes nosense if no class driver
is shipped with it).
If the device is a vendor specific device, then I guess you need to write
both driver and application on the PDA for it. (otherwise if the app is
already there, then the interface is actually decided by the app). Then you
really have the freedom to do whatever you want. You could make it a stream
interfaced or native driver. Of course an easy way is to make it a stream
interface driver, but you don't have to make it as a "COM" port driver.
Again, you have the full control to define the interface between your own
app and driver.

Rui Tang
Centrality Communications Inc




"Serge" <sv@me_ga_signal.com> wrote in message
news:efk4gtTlDHA.2436@TK2MSFTNGP09.phx.gbl...
> Hello.
> I need to write a driver for my device (FTDI-chip based), which is
external
> to
> PocketPC-2002 ARM PDA, having USB host.
> I think it have to be stream interface driver simulating
> serial I/O (Com port). Where to start, please suggest?
> I mean what sample codes from the PlatBuilder shall I consider to learn
> first?
> Any other suggestions (or links) are greately appreciated too.
> TIA.
> Serge.
>
>



Re: newbie's to USB driver question: where to start. by Serge

Serge
Sun Oct 19 01:21:22 CDT 2003

Thank you, Riu Tang for the reply.

> Is your device belongs to a standard class or a vendor specific one?
Actually *my* device is very simple: it is a bridge to industrial network
(BitBus).
Just one function: SendPacket. (Everything else USB-specific - enumeration,
vendor information, etc is inside USB slave chip FTDI245). Therefore I think
it (device)
is not HID, or Printer-like. But it it strongly resemble COM-port. Is it
standard class?
I am not sure.

> If it is a standard device, like printer, HID, then you may possibly
don't
> need to bother writing the class driver on the PDA by yourself. It may
> possibley be already provided in the OS (I don't know which PPC2002 model
> has usb host, but if you got one, then it makes nosense if no class driver
> is shipped with it).
There is OHCI driver on PDA. And client drivers: mass-storage -- USBMSC.DLL,
USBDISK6.DLL and HID -- USBHID.DLL, USBmouse.DLL.

> If the device is a vendor specific device, then I guess you need to
write
> both driver and application on the PDA for it.
Right. I need to write (simple) driver so that to permit developing
applications
accessing the indistrial network.

> Of course an easy way is to make it a stream interface driver,
> but you don't have to make it as a "COM" port driver. You have the full
control
> to define the interface between your own app and driver.

I thought that COM-port simulation is most simple, because all API functions
are there and app-writers know it good enough.
And I would be happy if somwhere I could find sample code for the driver
exporting minimum entry points so that the result looks like COM-port.
I have Platform builder. But I am just not sure about the right way to
start.
Is there a sample code good to start learning from?

I am sorry I'm not yet quite confident in terminology "standard class"
"vendor specific", "class driver". (But I will).

Thank you very much.
Serge.





Re: newbie's to USB driver question: where to start. by Jorge

Jorge
Wed Oct 22 08:00:51 CDT 2003

Hello,

Start with the serial port driver and change the pdd layer to USB (You will
need the devicedescriptors from FTDI and the Vendor specific commands...).
It works...I know since i wrote the driver for TietoEnator (the one that is
mentioned on FTDI's homepage). But I don't work there anymore =).

Best Regards

Jorge Råström
Software Engineer, Embedded systems (mostly WinCE..)
Prevas AB
jorge.rastrom@prevas.se
www.prevas.se

"Serge" <sv@me_ga_signal.com> wrote in message
news:efk4gtTlDHA.2436@TK2MSFTNGP09.phx.gbl...
> Hello.
> I need to write a driver for my device (FTDI-chip based), which is
external
> to
> PocketPC-2002 ARM PDA, having USB host.
> I think it have to be stream interface driver simulating
> serial I/O (Com port). Where to start, please suggest?
> I mean what sample codes from the PlatBuilder shall I consider to learn
> first?
> Any other suggestions (or links) are greately appreciated too.
> TIA.
> Serge.
>
>