PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
IrDAClient.DiscoverDevices can't find the IrDA Adapater
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
IrDAClient.DiscoverDevices can't find the IrDA Adapater
![]() |
IrDAClient.DiscoverDevices can't find the IrDA Adapater |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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 |
|
|
|
#2 |
|
Guest
Posts: n/a
|
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:%23zPJ5nkKFHA.4064@tk2msftngp13.phx.gbl... > 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 > > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Peter,
I tried with the listener turned on and off, but no luck with either device. ![]() Stanimir "Peter Foot [MVP]" <feedback@nospam-inthehand.com> schrieb im Newsbeitrag news:ubiy76lKFHA.3552@TK2MSFTNGP12.phx.gbl... > 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:%23zPJ5nkKFHA.4064@tk2msftngp13.phx.gbl... > > 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 > > > > > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 


