Programatically enbling Wireless

G

Guest

Hi

I have a Dell Axim X3 PDA and a ViewSonic V37 PDA, My app is talking to a desktop app wirelessly using UDP comms. If the PDA is powered off and then powered on the Wireless disconnects and then attempts to reconnect. This can take up to 10 seconds and causes problems in my application.

Is there a way that I can programatically (using VB.NET and .Net CF) reconnect the wireless upon power up of the PDA's? or is there something with the UDPClient that I can do to check the wireless? I aim to develop the software for all haldheld devices.

Hope to hear from someone soon

Thanks.
 
P

Paul G. Tobey [eMVP]

It sounds like it's already reconnecting, just not as fast as you'd like.
Your application should be written to handle the case where an attempted
transmit or receive fails because of lack of network connectivity (this will
happen all the time with RF Ethernet, no doubt).

You could try the RFUtils class library that I posted some time ago to check
the signal strength of the wireless signal and not send or receive until
there is signal. My guess on the 10 second delay is that this is the time
taken for DHCP to assign the wireless card an IP address. You could check
the local IP address before sending/receiving and not attempt it unless it's
something other than 0.0.0.0, which seems to be what it's set to while DHCP
is trying to work. Or you could try assigning a static IP address to every
device.

Paul T.

Trevor said:
Hi,

I have a Dell Axim X3 PDA and a ViewSonic V37 PDA, My app is talking to a
desktop app wirelessly using UDP comms. If the PDA is powered off and then
powered on the Wireless disconnects and then attempts to reconnect. This can
take up to 10 seconds and causes problems in my application.
Is there a way that I can programatically (using VB.NET and .Net CF)
reconnect the wireless upon power up of the PDA's? or is there something
with the UDPClient that I can do to check the wireless? I aim to develop the
software for all haldheld devices.
 
P

Paul G. Tobey [eMVP]

You really can't decide which access point to connect to, unless they use
different SSID values. If they do, you can set a preferred SSID.

This is not the problem that I'm describing, though. DHCP assignment of the
IP address is totally separate from low-level radio contact. It's the means
to get the IP address for the card. Is the card using DHCP? You can tell
by accessing the Network and Dial-up Connections applet via the Settings
item on the Start menu. Open the icon associated with your RF Ethernet card
and, if the Obtain an IP Address Via DHCP radio button is enabled, that's
probably what's causing the delay. As I said, you could enter a different
static IP address for each device...

Paul T.

Trevor said:
Paul,

Firstly, Thanks for the swift reply. Ive set the flag in my Wireless
adaptors software to automatically reconnect to network. If there are more
than access point then it may reconnect to the wrong access point. How
should I avoid this scenario? Also, how do I check the devices IP Address?
Im using VB.NET and .NET CF.
 
R

Rob

RFUtils? Is this a c# class? I can't seem to find it.

I am also doing wireless communications and having difficulties with
connections. I have been using socket's but I am struggling with
timeout issues. I am thinking about using remoting with soap on the
desktop instead of sockets because I can easily set a timeout and poll
every few seconds to make sure I am still connected. I really don't
care about the extra overhead because the application doesn't need to
be speedy. Would you recommend using your RFUtils class with sockets?
First check to see if you have the signal, then send using sockets?
That would take care of the timeout problem I am having. I just want
reliable wireless communications with a desktop running a c#
application.
 
P

Paul G. Tobey [eMVP]

I posted it to this newsgroup a few weeks ago. There were several posts
with attached ZIP files in the thread.

Remoting: remember that remoting is *not supported* in the Compact
Framework, so don't design a solution that requires remoting on the Windows
CE end.

You should be able to use whatever time-out you want with sockets, too. You
just have to be clever about how you're going to do it. You might use
non-blocking sockets, for example, and, if the time-out value passes, shut
down the socket earlier than would normally happen with TCP time-outs.

Remember that assuming that communications will be reliable is a fallacy of
network programming. Network communications will always be unreliable. You
have to assume that and work around it. If the wireless card loses contact,
you have to figure out what to do about it and you should assume that the
card *will* lose contact.

Paul T.

Rob said:
RFUtils? Is this a c# class? I can't seem to find it.

I am also doing wireless communications and having difficulties with
connections. I have been using socket's but I am struggling with
timeout issues. I am thinking about using remoting with soap on the
desktop instead of sockets because I can easily set a timeout and poll
every few seconds to make sure I am still connected. I really don't
care about the extra overhead because the application doesn't need to
be speedy. Would you recommend using your RFUtils class with sockets?
First check to see if you have the signal, then send using sockets?
That would take care of the timeout problem I am having. I just want
reliable wireless communications with a desktop running a c#
application.


"Paul G. Tobey [eMVP]" <ptobey_no_spam@instrument_no_spam.com> wrote in
message news: said:
You really can't decide which access point to connect to, unless they use
different SSID values. If they do, you can set a preferred SSID.

This is not the problem that I'm describing, though. DHCP assignment of the
IP address is totally separate from low-level radio contact. It's the means
to get the IP address for the card. Is the card using DHCP? You can tell
by accessing the Network and Dial-up Connections applet via the Settings
item on the Start menu. Open the icon associated with your RF Ethernet card
and, if the Obtain an IP Address Via DHCP radio button is enabled, that's
probably what's causing the delay. As I said, you could enter a different
static IP address for each device...

Paul T.


adaptors software to automatically reconnect to network. If there are more
than access point then it may reconnect to the wrong access point. How
should I avoid this scenario? Also, how do I check the devices IP Address?
Im using VB.NET and .NET CF.
 
G

Guest

I currently use this code in the server app and I can access it as a webservice from c# compact framwork code. I assumed it was remoting with soap. What should this be called? CookService.cs has methods like this --> public int AddOrder(string id, int orderNumber, string name, string itemStr, Note[] notes, string tableId)

I create a new RemotingServer when I start up the application
public class RemotingServe

public RemotingServer(

ChannelServices.RegisterChannel(new HttpChannel(9001))
RemotingConfiguration.ApplicationName = "WSCookRemotingService"
RemotingConfiguration.RegisterWellKnownServiceType(typeof(CookService)
"RemServiceUri.soap"
WellKnownObjectMode.SingleCall )


}
 
P

Paul G. Tobey [eMVP]

You have a Web Service client there. Remoting is calling the methods of an
actual object and having that call potentially, but not necessarily,
executed on another processor. It's rather like what DCOM does. You don't
have to know where the other object is, unlike with Web Services, and you
can more easily distribute pieces of the process to other machines, without
having to know, in the code, what the URLs are.

Paul T.

Rob Beers said:
I currently use this code in the server app and I can access it as a
webservice from c# compact framwork code. I assumed it was remoting with
soap. What should this be called? CookService.cs has methods like this -->
public int AddOrder(string id, int orderNumber, string name, string itemStr,
Note[] notes, string tableId)
 
R

Rob

Would you consider this an acceptable way to communicate with a
desktop server? I will only have 5-15 handhelds talking to the
desktop server at once. I will poll the webservice every 15 seconds
from each device to check for ready orders. Every minute or so they
will send an order or a print request. It doesn't have to be speedy.
This method seems easier for someone like myself who is not
experienced in low level socket programming.

Rob

Paul G. Tobey said:
You have a Web Service client there. Remoting is calling the methods of an
actual object and having that call potentially, but not necessarily,
executed on another processor. It's rather like what DCOM does. You don't
have to know where the other object is, unlike with Web Services, and you
can more easily distribute pieces of the process to other machines, without
having to know, in the code, what the URLs are.

Paul T.

Rob Beers said:
I currently use this code in the server app and I can access it as a
webservice from c# compact framwork code. I assumed it was remoting with
soap. What should this be called? CookService.cs has methods like this -->
public int AddOrder(string id, int orderNumber, string name, string itemStr,
Note[] notes, string tableId)
I create a new RemotingServer when I start up the application.
public class RemotingServer
{
public RemotingServer()
{
ChannelServices.RegisterChannel(new HttpChannel(9001));
RemotingConfiguration.ApplicationName = "WSCookRemotingService";
RemotingConfiguration.RegisterWellKnownServiceType(typeof(CookService),
"RemServiceUri.soap",
WellKnownObjectMode.SingleCall );

}
}
 
P

Paul G. Tobey [eMVP]

Sure. As long as the network guys don't care about a few hundred extra
packets per second floating around...

Paul T.

Rob said:
Would you consider this an acceptable way to communicate with a
desktop server? I will only have 5-15 handhelds talking to the
desktop server at once. I will poll the webservice every 15 seconds
from each device to check for ready orders. Every minute or so they
will send an order or a print request. It doesn't have to be speedy.
This method seems easier for someone like myself who is not
experienced in low level socket programming.

Rob

"Paul G. Tobey [eMVP]" <ptobey_no_spam@instrument_no_spam.com> wrote in
message news: said:
You have a Web Service client there. Remoting is calling the methods of an
actual object and having that call potentially, but not necessarily,
executed on another processor. It's rather like what DCOM does. You don't
have to know where the other object is, unlike with Web Services, and you
can more easily distribute pieces of the process to other machines, without
having to know, in the code, what the URLs are.

Paul T.

Rob Beers said:
I currently use this code in the server app and I can access it as a
webservice from c# compact framwork code. I assumed it was remoting with
soap. What should this be called? CookService.cs has methods like this -->
public int AddOrder(string id, int orderNumber, string name, string itemStr,
Note[] notes, string tableId)
I create a new RemotingServer when I start up the application.
public class RemotingServer
{
public RemotingServer()
{
ChannelServices.RegisterChannel(new HttpChannel(9001));
RemotingConfiguration.ApplicationName = "WSCookRemotingService";
RemotingConfiguration.RegisterWellKnownServiceType(typeof(CookService),
"RemServiceUri.soap",
WellKnownObjectMode.SingleCall );

}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top