USB Development

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Has anyone done any USB development using C# and the compact framework? I'm
primarily looking for information related to sending and receiving data from
bulk endpoints after enumeration has occured and even the process of
identifying when a PDA has become connected to a host.
 
There's no defined interface for that sort of operation on USB at the
managed code level. In fact, I doubt that the necessary header files and
libraries are even available in the device SDK. You'd have to have more
detailed information about the driver and the platform for us to have a
chance to get an answer right...

Paul T.
 
The current environment we're developing on is the HP IPAQ 6315 which is
running WM 2003 or PPC 2003. The host in our scenario is a small micro that
has a USB host controller on it. The micro board and the HP device need to be
able to send bulk data back and forth. Is that enough info?

Jeremy T.

Paul G. Tobey said:
There's no defined interface for that sort of operation on USB at the
managed code level. In fact, I doubt that the necessary header files and
libraries are even available in the device SDK. You'd have to have more
detailed information about the driver and the platform for us to have a
chance to get an answer right...

Paul T.
 
Probably, but I think that you're going to have to write a device driver for
it in order to get at that at the low-level that you're looking for. As far
as I know, the only high-level interface available is a simulated serial
port which most USB drivers provide.

I think I see a post from you in the Platform Builder newsgroup and, if
that's you, that's the right place to ask. I suppose that, once you figure
out what form of driver or other native code you need, you may be able to
build a native, flat wrapper around it that you can P/Invoke from managed
code (ReadUSBBulk(), WriteUSBBulk(), maybe).

If you have Platform Builder 4.2 or later, look in the help, searching on
"usb driver". The topic USB Device Driver Implementation talks about
building a driver for a specific USB device, which I think is more or less
what you're trying to do. The functions OpenPipe, IssueBulkTransfer, and
GetTransferStatus might be good pages to read. I suppose that, as an
alternative, you might use the default USB support, install ActiveSync on
the host side, and establish an AS connection when the two devices are
connected. You can use sockets to send data back and forth in that case and
whether they are sent via bulk or some other means, you don't really care.

Paul T.

Jeremy said:
The current environment we're developing on is the HP IPAQ 6315 which is
running WM 2003 or PPC 2003. The host in our scenario is a small micro
that
has a USB host controller on it. The micro board and the HP device need to
be
able to send bulk data back and forth. Is that enough info?

Jeremy T.
 
Hi,
Could I please get in here with a question similar to Jeremy's?
A radio device with an RS232 Output generates a small ASCII stream of data.
We have successfully talked to the device using a laptop but wish to use a
Casio IT500 which has a USB port.
We have plugged the radio device into a commercially available dongle which
gives a USB output.
Physically we can plug the dongle into the CASIO IT500. Can we extract the
data using calls to the Windows CE 'standard USB drivers' ie. making calls
from a managed C# application or would we be up for a complete driver
development?
Thanks
Bob
Jeremy said:
The current environment we're developing on is the HP IPAQ 6315 which is
running WM 2003 or PPC 2003. The host in our scenario is a small micro that
has a USB host controller on it. The micro board and the HP device need to be
able to send bulk data back and forth. Is that enough info?

Jeremy T.
 
Does the device have a virtual serial port corresponding to the USB port? I
don't know what port number it might be given, as it would likely be
different on every device, but you might find it by looking in the registry
at HKLM\Drivers\Active. Each entry represents one device and you'd be
looking for devices that have names like COM<n>:. You wouldn't know what to
send to use the low-level driver calls, unless you know exactly how the
dongle device works.

Paul T.
 
I checked on my IPAQ and it appears that it exposes a driver called
USBF_Serial on COM5. Is it enough to connect to that and send properly
formated USB packets down?
 
You need a USB host to do that and I know of only one device with USB host
(Toshiba e805).
So, chances are: it's not going to work.

However, according to the spec, CASIO IT500 has a serial port you could use
directly.
OpenNETCF has a serial class, so it's easy.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
Reply-To: "Bob Clegg" <[email protected]>
From: "Bob Clegg" <[email protected]>
References: <[email protected]>
 
Thanks IIlya and Paul,
I'll follow up on the virtual serial port.
regards
Bob
"Ilya Tumanov [MS]" said:
You need a USB host to do that and I know of only one device with USB host
(Toshiba e805).
So, chances are: it's not going to work.

However, according to the spec, CASIO IT500 has a serial port you could use
directly.
OpenNETCF has a serial class, so it's easy.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.
Subject: Re: USB Development
Date: Sat, 23 Oct 2004 09:41:26 +1300
Lines: 54
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.compactframework
NNTP-Posting-Host: 210-86-75-183.jetstream.xtra.co.nz 210.86.75.183
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXS01.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08
phx.gbl!TK2MSFTNGP12.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.compactframework:63763
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

Hi,
Could I please get in here with a question similar to Jeremy's?
A radio device with an RS232 Output generates a small ASCII stream of data.
We have successfully talked to the device using a laptop but wish to use a
Casio IT500 which has a USB port.
We have plugged the radio device into a commercially available dongle which
gives a USB output.
Physically we can plug the dongle into the CASIO IT500. Can we extract the
data using calls to the Windows CE 'standard USB drivers' ie. making calls
from a managed C# application or would we be up for a complete driver
development?
Thanks
Bob
need
to files
and
have
 
No, you wouldn't send USB anything. It's a serial port. You send the data
that you want to have transmitted and it will be sent in whatever format the
driver deems appropriate. The data will come out the serial port just like
any other serial port character stream.

Paul T.
 
Back
Top