Re: Get IRDA Harware status on Windows Mobile..
- From: r_z_aret@xxxxxxxxxxxx
- Date: Thu, 01 Feb 2007 16:00:29 -0500
On 23 Jan 2007 03:37:45 -0800, rajmanish@xxxxxxxxx wrote:
Hi all,
I am developing an application where I need to check the availability
of Bluetooth and IRDA support on my Windows Mobile 5.0 smartphone
device.
As I could c there is an API "BthGetHardwareStatus" to get the
availability/status of Bluetooth hardware. But I am not able to find
the same for IRDA.
Do we have the same type of API for IRDA availability/status checking?
I'm surprised you have had only one answer. I'll at least attempt to
help.
I use IR as a COM port. I detect support by looking for the Index
value in
HKLM\Drivers\\BuiltIn\\IrCOMM
If I find that, I convert it to the port:
1 -> COM1:
2 -> COM2:
etc.
Here are comments from my code that include references:
#if 0 && defined( UNDER_CE )
// Reenabled and disabled 6 Apr 05 (7.7.0.26) - did not work on
iPAQ 3600 (see below
// quote from 21 Jan 05.
// Disabled 3 Apr 05 (7.7.0.26) - caused major delays on iPAQ 3600
// From 17 Jan 2002 contribution by Tony to thread called "Using
RawIR" in same newsgroup
// Remember not to call EscapeCommFunction() on the iPaq. If
you do, you'll
// need to reset the device to put the IR port back in the
correct state.
// See also on-line help 14 May 03 (4.0.0.4)
// From 4 Jul 2004 contribution by Magnus Persson to thread called
"Raw IR through the IR port"
// Don't forget to reverse the call when you close the port:
// EscapeCommFunction(m_hPort, CLRIR)
// See 5 Jul 04 contribution from Magnus Persson to thread called
// "Raw IR through the IR port" in
microsoft.public.pocketpc.developer
// From 21 Jan 2005 contribution by Magnus Persson to thread
called "Serial Port Problems"
// The SETIR/CLRIR escape function is only needed for devices
with shared ports
// (i.e. not iPAQs).
// Also, 2 Feb 2005 thread called "CLRIR was: serial port woes" in
WindowsCE-Dev.
// And 2 Feb 2005 thread called "CLRIR and SETIR" in
microsoft.public.pocketpc.developer
//
// Since this call will fail on devices where the port is not
shared you should
// ignore the result of the call.
if (m_ePort == PFSIR)
VERIFY_EXPLAIN( ::EscapeCommFunction( m_hPort, CLRIR ) );
#endif
// For more about IRDA, see
http://www.pocketpcdn.com/sections/irdaled.html
// Also, see Alan J. McFarlane's 1 Sep 03 contribution to a thread
called
// "Where is the difference" in
microsoft.public.pocketpc.developer
// From http://www.codeproject.com/ce/IrdaMobile.asp
// IrdaMobile tries IrDA first, but BZ found (previous experience)
that IrComm works
// ClsPFRegistry clsReg( _T( "Drivers\\Builtin\\IrDA" ) )
I even need to get the notification for the change of status[on/off] of
these devices. Is it possible to get any callback for these hardware
status change.
Thanks in advance.
Regards,
Raj
-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).
Robert E. Zaret, eMVP
PenFact, Inc.
20 Park Plaza, Suite 478
Boston, MA 02116
www.penfact.com
.
- Prev by Date: Re: HardwareButton KeyDown event stops firing after 18 key presses
- Next by Date: ASP/.NET, Mobile 2003, and Enter key
- Previous by thread: Re: Get IRDA Harware status on Windows Mobile..
- Next by thread: Re: Context Menu
- Index(es):