SteveSpencer
Mon Nov 22 09:09:04 CST 2004
Alan,
Thanks for this. I can now access the IR port using the virutal com port. In
fact it makes my code easier because I can now access both Bluetooth and IR
using serial communications on .NET CF.
Cheers
Steve
"Alan J. McFarlane" wrote:
> "Steve Spencer" wrote:
> > thanks for this, you have confirmed my own thoughts.
> >
> > > So you'll have to use native code.
> > OK, Do you have any sample code that I could follow? Ideally I would like to
> > have everything as .NET so if you have any examples of this using PInvoke
> > that would be useful.
> >
> My expertise is only in the use of IrDA, and in particular on desktop
> Windows, so others may have more useful help here...
>
> Anyway see my programming reference for the complete details of IrDA through
> Winsock, at
> <
http://www.alanjmcf.me.uk/comms/infrared/Microsoft%20Windows%20IrDA%20programming.html>,
> sections 3.2, 4.9.3, etc. In short, use setsockopt with option
> IRLMP_9WIRE_MODE to set Cooked mode. However that probably takes you deeply
> into the native world...
>
> It would be nice if some company would create an 'object' to use with .Net
> that provides IrCOMM and IrLPT connectivity...
>
>
> Also I'll note again, in case you missed it the first time, that there's
> normally an IrCOMM Virtual COM Port present on PocketPC. One just uses it
> like a normal serial port but it uses IrCOMM to talk to an IrDA peer; it does
> all the discovery etc automatically. See
> <
http://msdn.microsoft.com/library/en-us/wceseril/html/cmconircomm.asp> etc.
> I presume one can use it fine from .Net.
>
>
> > Unfortunately, we can only run in IrCOMM and 9pin cooked mode as we are
> > trying to use an Actisys IR100s serial to IR converter connected to the RS232
> > port of the hardware device we are trying to communicate with.
> >
> Yup, its maybe a bit of a shame that the device can't be set to listen on a
> bog-standard (non-IrCOMM) TinyTP socket. :-(
> --
> Alan J. McFarlane
>
http://www.alanjmcf.me.uk/
> Please follow-up in the newsgroup for the benefit of all.