PC Review


Reply
Thread Tools Rate Thread

CF's System.Net.IrDA can't find either client or server.

 
 
Alex Dong
Guest
Posts: n/a
 
      17th Nov 2003
Hello Everybody:
I have tried to use System.Net.IrDA to create an IrDA application to control my home air conditioner. The idea is that first I learn the controlling signal by reading IR from controller and then send the signal out by using my iPAQ 5500. The problem is that I use IrDAListen to listen to the socket but can't find the IrDAClient even if the controller is only 1cm from the iPAQ's IR port; I also use IrDAClient to find a device and can't find any. Can anybody here tell me what I have done is wrong?

Environment: VS.NET 2003, iPAQ 5500, PocketPC 2003. Compact Framework 1.1 SP1.

Thank you.
Alex

The server code looks like this:
#region IrDAListener

irDAListener = new IrDAListener("IRClientDemo");

irDAListener.Start();

Socket socket = irDAListener.AcceptSocket();


IrDAClient irClient = irDAListener.AcceptIrDAClient();

Debug.WriteLine(irClient.RemoteMachineName);

StreamReader sr = new StreamReader(irClient.GetStream(), System.Text.Encoding.ASCII);

Debug.WriteLine(sr.ReadLine());

sr.Close();

#endregion

The client code looks like this:

#region IrDAClient

IrDAClient irDAClient = new IrDAClient();

IrDADeviceInfo[] devsAvailable = irDAClient.DiscoverDevices(5);

foreach(IrDADeviceInfo devInfo in devsAvailable)

{

Debug.WriteLine("Device ID: " + devInfo.DeviceID + ", Device Name: " + devInfo.DeviceName);

}

#endregion





 
Reply With Quote
 
 
 
 
Alan J. McFarlane
Guest
Posts: n/a
 
      18th Nov 2003
"Alex Dong" <adong@REMOVE_MEobjectivasoftware.com> wrote in message
news:(E-Mail Removed)...

> Hello Everybody:
> I have tried to use System.Net.IrDA to create an IrDA application to
> control my home air conditioner. The idea is that first I learn the
> controlling signal by reading IR from controller and then send the
> signal out by using my iPAQ 5500. The problem is that I use
> IrDAListen to listen to the socket but can't find the IrDAClient even
> if the controller is only 1cm from the iPAQ's IR port; I also use
> IrDAClient to find a device and can't find any. Can anybody here tell
> me what I have done is wrong?
>

Do you know that the air conditioner uses IrDA protocols (precisely
IrDA-Data)? I would have guessed it uses some form of 'consumer'
infrared signal. These two are not at all similar.

(Oh by the way please don't post here in HTML format).
--
Alan J. McFarlane
http://homepage.ntlworld.com/alanjmcf/
Please follow-up in the newsgroup for the benefit of all.


 
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
Client computers cannot find login server warren@rsvpcare.com Microsoft Windows 2000 Networking 1 3rd Jun 2007 02:07 PM
xp client cannot find printers on windows 2000 server Mac Windows XP Basics 1 22nd Feb 2006 02:43 PM
xp client cannot find printers on windows 2000 server Mac Windows XP General 1 22nd Feb 2006 02:43 PM
xp client cannot find printers on windows 2000 server Mac Windows XP Basics 1 16th Feb 2006 12:44 PM
VPN client can't find Server#2 =?Utf-8?B?U3RldmUgUw==?= Microsoft Windows 2000 RAS Routing 6 22nd Mar 2004 08:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:29 PM.