PC Review


Reply
Thread Tools Rate Thread

IrDAClient.DiscoverDevices can't find the IrDA Adapater

 
 
Stanimir A.
Guest
Posts: n/a
 
      16th Mar 2005
Hello,

we are using the following C# code to test the IrDA communication on an iPAQ
hx4700 and 5550 (both have PocketPC 2003):

string name;
Stream irStream;

IrDAClient irdaClient = new IrDAClient();
IrDADeviceInfo[] irdaDevices;
irdaDevices = irdaClient.DiscoverDevices(2);

if ( irdaDevices.Length > 0 )
{
MessageBox.Show("IrDA found!");
try
{
System.Net.IrDAEndPoint endP = new
System.Net.IrDAEndPoint(irdaDevices[0].DeviceID, "IrDA:IrCOMM");
irdaClient.Connect(endP);
MessageBox.Show("IrDAConnected!!");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString() + " thrown in openConnection");
}
irStream = irdaClient.GetStream();
name = irdaDevices[0].DeviceName.ToString();
}
else
{
name="No IrDA Devices Found";
}
MessageBox.Show(name);
irdaClient.Close();
Application.Exit();


The code compiles fine and the CF and OpenNETCF are installed on the
devices, but when the app is started the message box comes out that no IrDA
Device was found. The IrDA adapters of both iPAQ-s are in order as we have
successfully tested them with eVC 4.0.

Any help much appreciated!

Stanimir


 
Reply With Quote
 
 
 
 
Peter Foot [MVP]
Guest
Posts: n/a
 
      16th Mar 2005
Have you disabled Receive all incoming Beams in Settings > Connections >
Beam to turn off the default Obex listener?

Peter

--
Peter Foot
Windows Embedded MVP
http://www.inthehand.com | http://blog.opennetcf.org/pfoot/

"Stanimir A." <stanimir_dot_arnaudov_at_esk_dot_fraunhofer_dotde> wrote in
message news:%(E-Mail Removed)...
> Hello,
>
> we are using the following C# code to test the IrDA communication on an
> iPAQ
> hx4700 and 5550 (both have PocketPC 2003):
>
> string name;
> Stream irStream;
>
> IrDAClient irdaClient = new IrDAClient();
> IrDADeviceInfo[] irdaDevices;
> irdaDevices = irdaClient.DiscoverDevices(2);
>
> if ( irdaDevices.Length > 0 )
> {
> MessageBox.Show("IrDA found!");
> try
> {
> System.Net.IrDAEndPoint endP = new
> System.Net.IrDAEndPoint(irdaDevices[0].DeviceID, "IrDA:IrCOMM");
> irdaClient.Connect(endP);
> MessageBox.Show("IrDAConnected!!");
> }
> catch (Exception ex)
> {
> MessageBox.Show(ex.Message.ToString() + " thrown in openConnection");
> }
> irStream = irdaClient.GetStream();
> name = irdaDevices[0].DeviceName.ToString();
> }
> else
> {
> name="No IrDA Devices Found";
> }
> MessageBox.Show(name);
> irdaClient.Close();
> Application.Exit();
>
>
> The code compiles fine and the CF and OpenNETCF are installed on the
> devices, but when the app is started the message box comes out that no
> IrDA
> Device was found. The IrDA adapters of both iPAQ-s are in order as we have
> successfully tested them with eVC 4.0.
>
> Any help much appreciated!
>
> Stanimir
>
>



 
Reply With Quote
 
Stanimir A.
Guest
Posts: n/a
 
      17th Mar 2005
Peter,

I tried with the listener turned on and off, but no luck with either device.


Stanimir


"Peter Foot [MVP]" <(E-Mail Removed)> schrieb im Newsbeitrag
news:(E-Mail Removed)...
> Have you disabled Receive all incoming Beams in Settings > Connections >
> Beam to turn off the default Obex listener?
>
> Peter
>
> --
> Peter Foot
> Windows Embedded MVP
> http://www.inthehand.com | http://blog.opennetcf.org/pfoot/
>
> "Stanimir A." <stanimir_dot_arnaudov_at_esk_dot_fraunhofer_dotde> wrote in
> message news:%(E-Mail Removed)...
> > Hello,
> >
> > we are using the following C# code to test the IrDA communication on an
> > iPAQ
> > hx4700 and 5550 (both have PocketPC 2003):
> >
> > string name;
> > Stream irStream;
> >
> > IrDAClient irdaClient = new IrDAClient();
> > IrDADeviceInfo[] irdaDevices;
> > irdaDevices = irdaClient.DiscoverDevices(2);
> >
> > if ( irdaDevices.Length > 0 )
> > {
> > MessageBox.Show("IrDA found!");
> > try
> > {
> > System.Net.IrDAEndPoint endP = new
> > System.Net.IrDAEndPoint(irdaDevices[0].DeviceID, "IrDA:IrCOMM");
> > irdaClient.Connect(endP);
> > MessageBox.Show("IrDAConnected!!");
> > }
> > catch (Exception ex)
> > {
> > MessageBox.Show(ex.Message.ToString() + " thrown in

openConnection");
> > }
> > irStream = irdaClient.GetStream();
> > name = irdaDevices[0].DeviceName.ToString();
> > }
> > else
> > {
> > name="No IrDA Devices Found";
> > }
> > MessageBox.Show(name);
> > irdaClient.Close();
> > Application.Exit();
> >
> >
> > The code compiles fine and the CF and OpenNETCF are installed on the
> > devices, but when the app is started the message box comes out that no
> > IrDA
> > Device was found. The IrDA adapters of both iPAQ-s are in order as we

have
> > successfully tested them with eVC 4.0.
> >
> > Any help much appreciated!
> >
> > Stanimir
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IrDa DiscoverDevices with gps bluetooth Paul Microsoft Dot NET Compact Framework 8 26th Oct 2005 08:54 PM
IrDAClient SocketException... =?Utf-8?B?SmVmZg==?= Microsoft Dot NET Compact Framework 2 4th Mar 2005 08:41 PM
CF's System.Net.IrDA can't find either client or server. Alex Dong Microsoft Dot NET Compact Framework 1 18th Nov 2003 02:15 PM
IrDA DiscoverDevices Mark Johnson Microsoft Dot NET Compact Framework 2 9th Oct 2003 07:36 PM
PCMCIA adapater for xD Memory cards Proet Computer Hardware 1 6th Jul 2003 10:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:18 PM.