I'm doing development on the PPC 2003 environment. I'm trying to develop a
client USB driver for PPC 2003 to communicate with our host device. The
development environment that we use is MS EVC++ 4.0, the specific device this
is being attempted with is the HP IPAQ 6315. Does anyone here have any
experience with doing USB development with the PPC 2003? Some of the issues
of come up against is it appears from the Win CE 4.2 SDK that it only
supports host functionality while the Hp device itself and most PDA's only
have client controllers. The device enumerates fine, I was wondering how I
could go about getting access to endpoints to send and receive data?

--
Jeremy T.
Software Engineer

Re: USB Client Driver Development by Bruce

Bruce
Fri Oct 22 14:57:32 CDT 2004

Tell us the big picture of what you are doing. You shouldn't need to
replace the USB Function driver to do what you want to do. You just need to
register to be notified when the cable connects. Then the USB Function
driver provides a stream interface registered as a COM port. You will need
to disable loading of repllog.exe.

--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net

Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member

Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups



Re: USB Client Driver Development by Jeremy

Jeremy
Fri Oct 22 17:59:04 CDT 2004

That was of kind of the idea I was getting as I looked through some of the
USB examples in PB 4.2. The big picture is that we have a board with a micro
that has various functionalities it provides; in addition we now have added
a USB host controller to it. I need to be able to do all the communication I
used to do over serial now through USB, partially because it is a better way
but mainly because the IPAQ 6315 has no true serial support. I currently have
a service that sits on the device and intercepts communication back and forth
between apps and our board using serial comm. I need to be able to build in
basic functionality for a USB wrapper to do what my serial wrapper did. I
need to be alerted when a USB device is connected and disconnected. I also
need to be able to send and receive bulk data. I've heard you can use serial
COM to access USB but I haven't been able to find much related to that topic.
Any direction or input you might have would be great.

Jeremy T.

"Bruce Eitman (eMVP)" wrote:

> Tell us the big picture of what you are doing. You shouldn't need to
> replace the USB Function driver to do what you want to do. You just need to
> register to be notified when the cable connects. Then the USB Function
> driver provides a stream interface registered as a COM port. You will need
> to disable loading of repllog.exe.
>
> --
> Bruce Eitman (eMVP)
> Senior Engineer
> beitman AT applieddata DOT net
>
> Applied Data Systems
> www.applieddata.net
> An ISO 9001:2000 Registered Company
> Microsoft WEP Gold-level Member
>
> Do have an opinion on the effectiveness of Microsoft Windows Mobile and
> Embedded newsgroups? Let us know!
> https://www.windowsembeddedeval.com/community/newsgroups
>
>
>

Re: USB Client Driver Development by Bruce

Bruce
Mon Oct 25 07:05:59 CDT 2004

What information are you looking for? It is a COM driver, so it works just
like the driver that you used to use.

You may want to consider using the ActiveSync connection though, unless you
don't need it. I'm not an expert on that, but I think that you do socketed
communication.

--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net

Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member

Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups



Re: USB Client Driver Development by Jeremy

Jeremy
Mon Oct 25 10:41:02 CDT 2004

I guess I'm confused about how you're going to know when a device connects or
disconnects based on having a COM connection. Will you receive some sort of
notification on the port? Is the programmer responsible for serializing and
deserializing data going out and coming in? All data sent down will need to
be in correctly formatted USB packets right? Also is there a way to know when
a full packet has been received other then knowing the length of the data and
the actual USB packet structures?

Why does repllog.exe need to be disabled? Is it because it's a stream and
you don't know when data will be coming in and out.

"Bruce Eitman (eMVP)" wrote:

> What information are you looking for? It is a COM driver, so it works just
> like the driver that you used to use.
>
> You may want to consider using the ActiveSync connection though, unless you
> don't need it. I'm not an expert on that, but I think that you do socketed
> communication.
>
> --
> Bruce Eitman (eMVP)
> Senior Engineer
> beitman AT applieddata DOT net
>
> Applied Data Systems
> www.applieddata.net
> An ISO 9001:2000 Registered Company
> Microsoft WEP Gold-level Member
>
> Do have an opinion on the effectiveness of Microsoft Windows Mobile and
> Embedded newsgroups? Let us know!
> https://www.windowsembeddedeval.com/community/newsgroups
>
>
>

Re: USB Client Driver Development by David

David
Mon Oct 25 13:45:27 CDT 2004

I am confused by this conversation. One time, it sound like you are talking
about USB Host Driver. Right now, it looks like to me you are talking about
USB Function(Device) Driver to me. They are different.

Because of USB Host has to talk to USB Function device, so, it depends what
you are talking about, the answer may completely different.

David Liao.

"Jeremy" <Jeremy@discussions.microsoft.com> wrote in message
news:81CFC086-F1C9-401A-A2AA-60CF10C9BD69@microsoft.com...
>I guess I'm confused about how you're going to know when a device connects
>or
> disconnects based on having a COM connection. Will you receive some sort
> of
> notification on the port? Is the programmer responsible for serializing
> and
> deserializing data going out and coming in? All data sent down will need
> to
> be in correctly formatted USB packets right? Also is there a way to know
> when
> a full packet has been received other then knowing the length of the data
> and
> the actual USB packet structures?
>
> Why does repllog.exe need to be disabled? Is it because it's a stream and
> you don't know when data will be coming in and out.
>
> "Bruce Eitman (eMVP)" wrote:
>
>> What information are you looking for? It is a COM driver, so it works
>> just
>> like the driver that you used to use.
>>
>> You may want to consider using the ActiveSync connection though, unless
>> you
>> don't need it. I'm not an expert on that, but I think that you do
>> socketed
>> communication.
>>
>> --
>> Bruce Eitman (eMVP)
>> Senior Engineer
>> beitman AT applieddata DOT net
>>
>> Applied Data Systems
>> www.applieddata.net
>> An ISO 9001:2000 Registered Company
>> Microsoft WEP Gold-level Member
>>
>> Do have an opinion on the effectiveness of Microsoft Windows Mobile and
>> Embedded newsgroups? Let us know!
>> https://www.windowsembeddedeval.com/community/newsgroups
>>
>>
>>



Re: USB Client Driver Development by Jeremy

Jeremy
Mon Oct 25 14:07:09 CDT 2004

Sorry I used some mis-leading terminology in the first part of the last post.
I meant to say how do you know in software when a host connects to the
device. I'm strictly seeking information related to the client/device side. I
think the rest of the post should be clear now.

"David Liao (MS)" wrote:

> I am confused by this conversation. One time, it sound like you are talking
> about USB Host Driver. Right now, it looks like to me you are talking about
> USB Function(Device) Driver to me. They are different.
>
> Because of USB Host has to talk to USB Function device, so, it depends what
> you are talking about, the answer may completely different.
>
> David Liao.
>
> "Jeremy" <Jeremy@discussions.microsoft.com> wrote in message
> news:81CFC086-F1C9-401A-A2AA-60CF10C9BD69@microsoft.com...
> >I guess I'm confused about how you're going to know when a device connects
> >or
> > disconnects based on having a COM connection. Will you receive some sort
> > of
> > notification on the port? Is the programmer responsible for serializing
> > and
> > deserializing data going out and coming in? All data sent down will need
> > to
> > be in correctly formatted USB packets right? Also is there a way to know
> > when
> > a full packet has been received other then knowing the length of the data
> > and
> > the actual USB packet structures?
> >
> > Why does repllog.exe need to be disabled? Is it because it's a stream and
> > you don't know when data will be coming in and out.
> >
> > "Bruce Eitman (eMVP)" wrote:
> >
> >> What information are you looking for? It is a COM driver, so it works
> >> just
> >> like the driver that you used to use.
> >>
> >> You may want to consider using the ActiveSync connection though, unless
> >> you
> >> don't need it. I'm not an expert on that, but I think that you do
> >> socketed
> >> communication.
> >>
> >> --
> >> Bruce Eitman (eMVP)
> >> Senior Engineer
> >> beitman AT applieddata DOT net
> >>
> >> Applied Data Systems
> >> www.applieddata.net
> >> An ISO 9001:2000 Registered Company
> >> Microsoft WEP Gold-level Member
> >>
> >> Do have an opinion on the effectiveness of Microsoft Windows Mobile and
> >> Embedded newsgroups? Let us know!
> >> https://www.windowsembeddedeval.com/community/newsgroups
> >>
> >>
> >>
>
>
>

Re: USB Client Driver Development by David

David
Mon Oct 25 15:35:17 CDT 2004

Like Bruce said, If your CE device has USB function and you want to
connected to Desktop, You may use Serial Function driver on CE device side,
because there is a driver (called WCEUSBSH.SYS) available on desktop side.
They are simulating serial port on both end. Because serial driver only can
be opened by one application, so if you want to use this connection, you
have to disable ActiveSync application on both end.

David Liao


"Jeremy" <Jeremy@discussions.microsoft.com> wrote in message
news:1572A382-5545-4E66-BEA0-A52FB58DCC9B@microsoft.com...
> Sorry I used some mis-leading terminology in the first part of the last
> post.
> I meant to say how do you know in software when a host connects to the
> device. I'm strictly seeking information related to the client/device
> side. I
> think the rest of the post should be clear now.
>
> "David Liao (MS)" wrote:
>
>> I am confused by this conversation. One time, it sound like you are
>> talking
>> about USB Host Driver. Right now, it looks like to me you are talking
>> about
>> USB Function(Device) Driver to me. They are different.
>>
>> Because of USB Host has to talk to USB Function device, so, it depends
>> what
>> you are talking about, the answer may completely different.
>>
>> David Liao.
>>
>> "Jeremy" <Jeremy@discussions.microsoft.com> wrote in message
>> news:81CFC086-F1C9-401A-A2AA-60CF10C9BD69@microsoft.com...
>> >I guess I'm confused about how you're going to know when a device
>> >connects
>> >or
>> > disconnects based on having a COM connection. Will you receive some
>> > sort
>> > of
>> > notification on the port? Is the programmer responsible for serializing
>> > and
>> > deserializing data going out and coming in? All data sent down will
>> > need
>> > to
>> > be in correctly formatted USB packets right? Also is there a way to
>> > know
>> > when
>> > a full packet has been received other then knowing the length of the
>> > data
>> > and
>> > the actual USB packet structures?
>> >
>> > Why does repllog.exe need to be disabled? Is it because it's a stream
>> > and
>> > you don't know when data will be coming in and out.
>> >
>> > "Bruce Eitman (eMVP)" wrote:
>> >
>> >> What information are you looking for? It is a COM driver, so it works
>> >> just
>> >> like the driver that you used to use.
>> >>
>> >> You may want to consider using the ActiveSync connection though,
>> >> unless
>> >> you
>> >> don't need it. I'm not an expert on that, but I think that you do
>> >> socketed
>> >> communication.
>> >>
>> >> --
>> >> Bruce Eitman (eMVP)
>> >> Senior Engineer
>> >> beitman AT applieddata DOT net
>> >>
>> >> Applied Data Systems
>> >> www.applieddata.net
>> >> An ISO 9001:2000 Registered Company
>> >> Microsoft WEP Gold-level Member
>> >>
>> >> Do have an opinion on the effectiveness of Microsoft Windows Mobile
>> >> and
>> >> Embedded newsgroups? Let us know!
>> >> https://www.windowsembeddedeval.com/community/newsgroups
>> >>
>> >>
>> >>
>>
>>
>>



Re: USB Client Driver Development by JeremyT

JeremyT
Mon Oct 25 18:25:04 CDT 2004

Well in our host/device implementation the host isn't the desktop it's a
board with micro and host controller. I just use the desktop on occasion for
testing until I get an updated rev for the dev board.

So how exactly can an application on the device know if the host has
connected to it, from a software standpoint? Does the configuration of the
serial port on the device side need to be setup in any specific way?

After I figured out that I needed to disable USB with active sync, I did
notice with my USB analyzer that the connection was shutdown automatically
after a bit by windows. Which I guess relates to the repllog.exe issue
mentioned earlier. How do you disable that feature? Thanks for all the help.


"David Liao (MS)" wrote:

> Like Bruce said, If your CE device has USB function and you want to
> connected to Desktop, You may use Serial Function driver on CE device side,
> because there is a driver (called WCEUSBSH.SYS) available on desktop side.
> They are simulating serial port on both end. Because serial driver only can
> be opened by one application, so if you want to use this connection, you
> have to disable ActiveSync application on both end.
>
> David Liao
>
>
> "Jeremy" <Jeremy@discussions.microsoft.com> wrote in message
> news:1572A382-5545-4E66-BEA0-A52FB58DCC9B@microsoft.com...
> > Sorry I used some mis-leading terminology in the first part of the last
> > post.
> > I meant to say how do you know in software when a host connects to the
> > device. I'm strictly seeking information related to the client/device
> > side. I
> > think the rest of the post should be clear now.
> >
> > "David Liao (MS)" wrote:
> >
> >> I am confused by this conversation. One time, it sound like you are
> >> talking
> >> about USB Host Driver. Right now, it looks like to me you are talking
> >> about
> >> USB Function(Device) Driver to me. They are different.
> >>
> >> Because of USB Host has to talk to USB Function device, so, it depends
> >> what
> >> you are talking about, the answer may completely different.
> >>
> >> David Liao.
> >>
> >> "Jeremy" <Jeremy@discussions.microsoft.com> wrote in message
> >> news:81CFC086-F1C9-401A-A2AA-60CF10C9BD69@microsoft.com...
> >> >I guess I'm confused about how you're going to know when a device
> >> >connects
> >> >or
> >> > disconnects based on having a COM connection. Will you receive some
> >> > sort
> >> > of
> >> > notification on the port? Is the programmer responsible for serializing
> >> > and
> >> > deserializing data going out and coming in? All data sent down will
> >> > need
> >> > to
> >> > be in correctly formatted USB packets right? Also is there a way to
> >> > know
> >> > when
> >> > a full packet has been received other then knowing the length of the
> >> > data
> >> > and
> >> > the actual USB packet structures?
> >> >
> >> > Why does repllog.exe need to be disabled? Is it because it's a stream
> >> > and
> >> > you don't know when data will be coming in and out.
> >> >
> >> > "Bruce Eitman (eMVP)" wrote:
> >> >
> >> >> What information are you looking for? It is a COM driver, so it works
> >> >> just
> >> >> like the driver that you used to use.
> >> >>
> >> >> You may want to consider using the ActiveSync connection though,
> >> >> unless
> >> >> you
> >> >> don't need it. I'm not an expert on that, but I think that you do
> >> >> socketed
> >> >> communication.
> >> >>
> >> >> --
> >> >> Bruce Eitman (eMVP)
> >> >> Senior Engineer
> >> >> beitman AT applieddata DOT net
> >> >>
> >> >> Applied Data Systems
> >> >> www.applieddata.net
> >> >> An ISO 9001:2000 Registered Company
> >> >> Microsoft WEP Gold-level Member
> >> >>
> >> >> Do have an opinion on the effectiveness of Microsoft Windows Mobile
> >> >> and
> >> >> Embedded newsgroups? Let us know!
> >> >> https://www.windowsembeddedeval.com/community/newsgroups
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>

Re: USB Client Driver Development by Bruce

Bruce
Mon Oct 25 19:47:53 CDT 2004

Take a look at CeRunAppAtEvent() it will run your app when the "rs232" port
connects.

Disabling repllog? Don't know, but search the PocketPC newsgroups, I bet it
has been discussed before.

--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net

Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member

Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups



Re: USB Client Driver Development by David

David
Tue Oct 26 13:07:05 CDT 2004

The USB function serial driver works like this.
When USB Cable Attached, Host end will detect the attached device and start
to enumerate this device. I don't know how your host end work. But, it
should sent out USB Reset, Get Descriptor, Set Configuration, open pipe and
etc.
After everything set up, the Host issues vender specific transfer(on
endpoint zero) to setup Modem Signal if you connected to desktop. This
vender specific transfer trigger the Modem event on device side USB serial
function driver. If this USB serial driver has been open by application, the
EV_POWER will be set and sent to any thread was waiting on this event. If
there is no application open this USB serial driver, CeEventHasOccurred
(NOTIFICATION_EVENT_RS232_DETECTED, NULL) will called and any application
with register with event NOTIFICATION_EVENT_RS232_DETECTED will run by
shell.

I hope this answer your question.

"Bruce Eitman (eMVP)" <beitmannospam@NOSPAM_applieddata.NOSPAM_net> wrote in
message news:%23MLyuVvuEHA.4044@tk2msftngp13.phx.gbl...
> Take a look at CeRunAppAtEvent() it will run your app when the "rs232"
> port
> connects.
>
> Disabling repllog? Don't know, but search the PocketPC newsgroups, I bet
> it
> has been discussed before.
>
> --
> Bruce Eitman (eMVP)
> Senior Engineer
> beitman AT applieddata DOT net
>
> Applied Data Systems
> www.applieddata.net
> An ISO 9001:2000 Registered Company
> Microsoft WEP Gold-level Member
>
> Do have an opinion on the effectiveness of Microsoft Windows Mobile and
> Embedded newsgroups? Let us know!
> https://www.windowsembeddedeval.com/community/newsgroups
>
>