PC Review


Reply
Thread Tools Rate Thread

Connectivity States (Wireless, Ethernet, & USB)

 
 
=?Utf-8?B?TmljayBTdGluZW1hbg==?=
Guest
Posts: n/a
 
      21st Apr 2005
I have a pretty basic question about the state of connectivity. My
application will be a mostly disconnected application that (when available)
needs to send & receive data from the enterprise server. The question I have
is that how can I monitor (from the device) for a good Wireless connection,
an ethernet connection, or a USB connection? The customer will be using all
three situations to load & unload data from the device. Both the USB &
Ethernet would be a cradle situation but the wireless would be a here & there
situation. Thusly, my second question is how I can monitor for a wireless
connection with an acceptable level of strength (30%). The users will be
walking through areas all the time that have wireless access points.
Sometimes these areas will be open for minutes & sometimes they'll only pass
by them for a few seconds. I need to be able to monitor for any of the above
3 situations and begin my transfers when certain criteria are met. I've seem
several posts on where to find more information on this subject but no posts
on exactly how to write it in & implement it onto the handheld. I want this
to happen automatically, behind the scenes without any user interaction. Any
help would be greatly appreciated. Thanks!!
 
Reply With Quote
 
 
 
 
Paul G. Tobey [eMVP]
Guest
Posts: n/a
 
      21st Apr 2005
In that situation, you're basically describing how Microsoft Message Queue
works. You drop messages in a queue and, when you are connected, the OS
detects that, automatically connects and sends the message. I don't think
that there are any finished libraries with MSMQ wrapped for .NET CF, but I
think that you'll find that having the OS handle the forwarding of messages
is worth having to do that wrapping yourself, rather than having to handle
all of the connect/disconnect/signal quality issues yourself. Does the
device have MSMQ on it?

Paul T.

"Nick Stineman" <(E-Mail Removed)> wrote in message
news:BF817720-651B-4646-815A-(E-Mail Removed)...
>I have a pretty basic question about the state of connectivity. My
> application will be a mostly disconnected application that (when
> available)
> needs to send & receive data from the enterprise server. The question I
> have
> is that how can I monitor (from the device) for a good Wireless
> connection,
> an ethernet connection, or a USB connection? The customer will be using
> all
> three situations to load & unload data from the device. Both the USB &
> Ethernet would be a cradle situation but the wireless would be a here &
> there
> situation. Thusly, my second question is how I can monitor for a wireless
> connection with an acceptable level of strength (30%). The users will be
> walking through areas all the time that have wireless access points.
> Sometimes these areas will be open for minutes & sometimes they'll only
> pass
> by them for a few seconds. I need to be able to monitor for any of the
> above
> 3 situations and begin my transfers when certain criteria are met. I've
> seem
> several posts on where to find more information on this subject but no
> posts
> on exactly how to write it in & implement it onto the handheld. I want
> this
> to happen automatically, behind the scenes without any user interaction.
> Any
> help would be greatly appreciated. Thanks!!



 
Reply With Quote
 
Sergey Bogdanov
Guest
Posts: n/a
 
      22nd Apr 2005
Also you can periodically call RasEnumConnection P/Invoke in a separate
thread. It will return list of all active RAS connections and its names
that can be used to distinguish between one another. For example, for an
active USB connection it will return connection with the name "`USB" or
something.

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com


Nick Stineman wrote:
> I have a pretty basic question about the state of connectivity. My
> application will be a mostly disconnected application that (when available)
> needs to send & receive data from the enterprise server. The question I have
> is that how can I monitor (from the device) for a good Wireless connection,
> an ethernet connection, or a USB connection? The customer will be using all
> three situations to load & unload data from the device. Both the USB &
> Ethernet would be a cradle situation but the wireless would be a here & there
> situation. Thusly, my second question is how I can monitor for a wireless
> connection with an acceptable level of strength (30%). The users will be
> walking through areas all the time that have wireless access points.
> Sometimes these areas will be open for minutes & sometimes they'll only pass
> by them for a few seconds. I need to be able to monitor for any of the above
> 3 situations and begin my transfers when certain criteria are met. I've seem
> several posts on where to find more information on this subject but no posts
> on exactly how to write it in & implement it onto the handheld. I want this
> to happen automatically, behind the scenes without any user interaction. Any
> help would be greatly appreciated. Thanks!!

 
Reply With Quote
 
=?Utf-8?B?TmljayBTdGluZW1hbg==?=
Guest
Posts: n/a
 
      22nd Apr 2005
First, Thank you both...both responses are helpful. However, I'm pretty
green to smart device development & need to get a little more detail before
diving into these issues. With regards to the MSMQ, it is on the device but
all I need to do is monitor for connection states & then submit some T-SQL to
the enterprise server. It seems that the MSMQ would be overkill for this.
With regards to calling "RasEnumConnection P/Invoke"...I haven't gotten into
Multithreading yet and perhaps this would be a good start. My question for
this is how do I periodically call it?

Isn't there a way that I can set the device up so that when the wireless
connection is available it runs my sync procedure or application every 15
minutes in the background? I've read some posts on how to kick things off
when the device is cradled but where do I put this coding on the device & how
do I get it to run as a system service?

"Sergey Bogdanov" wrote:

> Also you can periodically call RasEnumConnection P/Invoke in a separate
> thread. It will return list of all active RAS connections and its names
> that can be used to distinguish between one another. For example, for an
> active USB connection it will return connection with the name "`USB" or
> something.
>
> Best regards,
> Sergey Bogdanov
> http://www.sergeybogdanov.com
>
>
> Nick Stineman wrote:
> > I have a pretty basic question about the state of connectivity. My
> > application will be a mostly disconnected application that (when available)
> > needs to send & receive data from the enterprise server. The question I have
> > is that how can I monitor (from the device) for a good Wireless connection,
> > an ethernet connection, or a USB connection? The customer will be using all
> > three situations to load & unload data from the device. Both the USB &
> > Ethernet would be a cradle situation but the wireless would be a here & there
> > situation. Thusly, my second question is how I can monitor for a wireless
> > connection with an acceptable level of strength (30%). The users will be
> > walking through areas all the time that have wireless access points.
> > Sometimes these areas will be open for minutes & sometimes they'll only pass
> > by them for a few seconds. I need to be able to monitor for any of the above
> > 3 situations and begin my transfers when certain criteria are met. I've seem
> > several posts on where to find more information on this subject but no posts
> > on exactly how to write it in & implement it onto the handheld. I want this
> > to happen automatically, behind the scenes without any user interaction. Any
> > help would be greatly appreciated. Thanks!!

>

 
Reply With Quote
 
Paul G. Tobey [eMVP]
Guest
Posts: n/a
 
      22nd Apr 2005
OK, it might be true that MSMQ is overkill. You could use a timer to
trigger calling the enumeration periodically, or you could create a thread
in which there is a wait on an event. If the wait times out, it's time to
enumerate the connections. If the event fires, that means that the thread
should exit. Pretty standard stuff. OpenNETCF has lots of support for
threading, events, etc.

The OpenNETCF.Net namespace has a lot of stuff for receiving notifications
of change of state for adapters. That's probably your best bet for doing
something when wireless becomes connected. Look at AdapterStatusMonitor.
It's based on unmanaged code that I use on our devices to turn on an
indicator when wireless networking is connected.

Paul T.

"Nick Stineman" <(E-Mail Removed)> wrote in message
news:2B5B8D16-B925-4B48-BA8D-(E-Mail Removed)...
> First, Thank you both...both responses are helpful. However, I'm pretty
> green to smart device development & need to get a little more detail
> before
> diving into these issues. With regards to the MSMQ, it is on the device
> but
> all I need to do is monitor for connection states & then submit some T-SQL
> to
> the enterprise server. It seems that the MSMQ would be overkill for this.
> With regards to calling "RasEnumConnection P/Invoke"...I haven't gotten
> into
> Multithreading yet and perhaps this would be a good start. My question
> for
> this is how do I periodically call it?
>
> Isn't there a way that I can set the device up so that when the wireless
> connection is available it runs my sync procedure or application every 15
> minutes in the background? I've read some posts on how to kick things off
> when the device is cradled but where do I put this coding on the device &
> how
> do I get it to run as a system service?
>
> "Sergey Bogdanov" wrote:
>
>> Also you can periodically call RasEnumConnection P/Invoke in a separate
>> thread. It will return list of all active RAS connections and its names
>> that can be used to distinguish between one another. For example, for an
>> active USB connection it will return connection with the name "`USB" or
>> something.
>>
>> Best regards,
>> Sergey Bogdanov
>> http://www.sergeybogdanov.com
>>
>>
>> Nick Stineman wrote:
>> > I have a pretty basic question about the state of connectivity. My
>> > application will be a mostly disconnected application that (when
>> > available)
>> > needs to send & receive data from the enterprise server. The question
>> > I have
>> > is that how can I monitor (from the device) for a good Wireless
>> > connection,
>> > an ethernet connection, or a USB connection? The customer will be
>> > using all
>> > three situations to load & unload data from the device. Both the USB &
>> > Ethernet would be a cradle situation but the wireless would be a here &
>> > there
>> > situation. Thusly, my second question is how I can monitor for a
>> > wireless
>> > connection with an acceptable level of strength (30%). The users will
>> > be
>> > walking through areas all the time that have wireless access points.
>> > Sometimes these areas will be open for minutes & sometimes they'll only
>> > pass
>> > by them for a few seconds. I need to be able to monitor for any of the
>> > above
>> > 3 situations and begin my transfers when certain criteria are met.
>> > I've seem
>> > several posts on where to find more information on this subject but no
>> > posts
>> > on exactly how to write it in & implement it onto the handheld. I want
>> > this
>> > to happen automatically, behind the scenes without any user
>> > interaction. Any
>> > help would be greatly appreciated. Thanks!!

>>



 
Reply With Quote
 
=?Utf-8?B?TmljayBTdGluZW1hbg==?=
Guest
Posts: n/a
 
      25th Apr 2005
While I can appreciate that the OpenNETCF has lots of valuable tools, its
adapter monitoring class is horrific. I've been attempting to accomplish
using this for several weeks now & have since turned to posting questions
here.

I'm still convinced that monitoring for two events (wireless availability &
cradling) cannot be that difficult. I know the device itself reacts to these
actions so I simply need to include or append my logic into the devices
already present event handlers.

I'm looking for a solution outside of the OpenNETCF.NET namespace. While v.
1.1 did improve the adapter status area, It is still far from where many
other of the namespaces currently are. I'm sure they'll iron out all of the
wrinkles in time...but unfortunately I don't have the flexibility to wait on
this project.

Basically what I am looking for is a way to install some sort of
application, class, system monitor, something onto the device that will
monitor for the two connection states & when available automatically act
accordingly.

"Paul G. Tobey [eMVP]" wrote:

> OK, it might be true that MSMQ is overkill. You could use a timer to
> trigger calling the enumeration periodically, or you could create a thread
> in which there is a wait on an event. If the wait times out, it's time to
> enumerate the connections. If the event fires, that means that the thread
> should exit. Pretty standard stuff. OpenNETCF has lots of support for
> threading, events, etc.
>
> The OpenNETCF.Net namespace has a lot of stuff for receiving notifications
> of change of state for adapters. That's probably your best bet for doing
> something when wireless becomes connected. Look at AdapterStatusMonitor.
> It's based on unmanaged code that I use on our devices to turn on an
> indicator when wireless networking is connected.
>
> Paul T.
>
> "Nick Stineman" <(E-Mail Removed)> wrote in message
> news:2B5B8D16-B925-4B48-BA8D-(E-Mail Removed)...
> > First, Thank you both...both responses are helpful. However, I'm pretty
> > green to smart device development & need to get a little more detail
> > before
> > diving into these issues. With regards to the MSMQ, it is on the device
> > but
> > all I need to do is monitor for connection states & then submit some T-SQL
> > to
> > the enterprise server. It seems that the MSMQ would be overkill for this.
> > With regards to calling "RasEnumConnection P/Invoke"...I haven't gotten
> > into
> > Multithreading yet and perhaps this would be a good start. My question
> > for
> > this is how do I periodically call it?
> >
> > Isn't there a way that I can set the device up so that when the wireless
> > connection is available it runs my sync procedure or application every 15
> > minutes in the background? I've read some posts on how to kick things off
> > when the device is cradled but where do I put this coding on the device &
> > how
> > do I get it to run as a system service?
> >
> > "Sergey Bogdanov" wrote:
> >
> >> Also you can periodically call RasEnumConnection P/Invoke in a separate
> >> thread. It will return list of all active RAS connections and its names
> >> that can be used to distinguish between one another. For example, for an
> >> active USB connection it will return connection with the name "`USB" or
> >> something.
> >>
> >> Best regards,
> >> Sergey Bogdanov
> >> http://www.sergeybogdanov.com
> >>
> >>
> >> Nick Stineman wrote:
> >> > I have a pretty basic question about the state of connectivity. My
> >> > application will be a mostly disconnected application that (when
> >> > available)
> >> > needs to send & receive data from the enterprise server. The question
> >> > I have
> >> > is that how can I monitor (from the device) for a good Wireless
> >> > connection,
> >> > an ethernet connection, or a USB connection? The customer will be
> >> > using all
> >> > three situations to load & unload data from the device. Both the USB &
> >> > Ethernet would be a cradle situation but the wireless would be a here &
> >> > there
> >> > situation. Thusly, my second question is how I can monitor for a
> >> > wireless
> >> > connection with an acceptable level of strength (30%). The users will
> >> > be
> >> > walking through areas all the time that have wireless access points.
> >> > Sometimes these areas will be open for minutes & sometimes they'll only
> >> > pass
> >> > by them for a few seconds. I need to be able to monitor for any of the
> >> > above
> >> > 3 situations and begin my transfers when certain criteria are met.
> >> > I've seem
> >> > several posts on where to find more information on this subject but no
> >> > posts
> >> > on exactly how to write it in & implement it onto the handheld. I want
> >> > this
> >> > to happen automatically, behind the scenes without any user
> >> > interaction. Any
> >> > help would be greatly appreciated. Thanks!!
> >>

>
>
>

 
Reply With Quote
 
salimgbelim
Guest
Posts: n/a
 
      25th Apr 2005
Hi Nick,

Hope this might be useful

http://msdn.microsoft.com/library/de...kComponent.asp

Regards,

Salim

 
Reply With Quote
 
Paul G. Tobey [eMVP]
Guest
Posts: n/a
 
      25th Apr 2005
Thanks for the notes, since this caused me to find a bug in the library.
There's no easy, ten-line solution to being notified of network events like
connect and disconnect, no. I tried four or five different schemes in
unmanaged code for our devices before settling on one that uses
point-to-point message queues and NDISUIO notifications. The
AdapterStatusMonitor class in OpenNETCF is a direct port from that unmanaged
code.

What you should do is, when a notification occurs, check the adapters which
are of interest to you and see if there's been a status change that you care
about. Ideally, just the notification messages should be enough to tell you
if an adapter has reestablished connection or lost it, but each adapter
sends messages to NDIS a bit differently and, depending on the
adapter/driver, you may get an unbalanced number of connect and disconnect
messages, or something along those lines, making it difficult to use the
information by itself to decide what the connection state is.

The latest source in the Vault for OpenNETCF includes the bug fix and
there's also a new Sample of using the status monitor.

Paul T.

"Nick Stineman" <(E-Mail Removed)> wrote in message
news:1AE73BAF-E601-4AC1-B7E1-(E-Mail Removed)...
> While I can appreciate that the OpenNETCF has lots of valuable tools, its
> adapter monitoring class is horrific. I've been attempting to accomplish
> using this for several weeks now & have since turned to posting questions
> here.
>
> I'm still convinced that monitoring for two events (wireless availability
> &
> cradling) cannot be that difficult. I know the device itself reacts to
> these
> actions so I simply need to include or append my logic into the devices
> already present event handlers.
>
> I'm looking for a solution outside of the OpenNETCF.NET namespace. While
> v.
> 1.1 did improve the adapter status area, It is still far from where many
> other of the namespaces currently are. I'm sure they'll iron out all of
> the
> wrinkles in time...but unfortunately I don't have the flexibility to wait
> on
> this project.
>
> Basically what I am looking for is a way to install some sort of
> application, class, system monitor, something onto the device that will
> monitor for the two connection states & when available automatically act
> accordingly.
>
> "Paul G. Tobey [eMVP]" wrote:
>
>> OK, it might be true that MSMQ is overkill. You could use a timer to
>> trigger calling the enumeration periodically, or you could create a
>> thread
>> in which there is a wait on an event. If the wait times out, it's time
>> to
>> enumerate the connections. If the event fires, that means that the
>> thread
>> should exit. Pretty standard stuff. OpenNETCF has lots of support for
>> threading, events, etc.
>>
>> The OpenNETCF.Net namespace has a lot of stuff for receiving
>> notifications
>> of change of state for adapters. That's probably your best bet for doing
>> something when wireless becomes connected. Look at AdapterStatusMonitor.
>> It's based on unmanaged code that I use on our devices to turn on an
>> indicator when wireless networking is connected.
>>
>> Paul T.
>>
>> "Nick Stineman" <(E-Mail Removed)> wrote in message
>> news:2B5B8D16-B925-4B48-BA8D-(E-Mail Removed)...
>> > First, Thank you both...both responses are helpful. However, I'm
>> > pretty
>> > green to smart device development & need to get a little more detail
>> > before
>> > diving into these issues. With regards to the MSMQ, it is on the
>> > device
>> > but
>> > all I need to do is monitor for connection states & then submit some
>> > T-SQL
>> > to
>> > the enterprise server. It seems that the MSMQ would be overkill for
>> > this.
>> > With regards to calling "RasEnumConnection P/Invoke"...I haven't gotten
>> > into
>> > Multithreading yet and perhaps this would be a good start. My question
>> > for
>> > this is how do I periodically call it?
>> >
>> > Isn't there a way that I can set the device up so that when the
>> > wireless
>> > connection is available it runs my sync procedure or application every
>> > 15
>> > minutes in the background? I've read some posts on how to kick things
>> > off
>> > when the device is cradled but where do I put this coding on the device
>> > &
>> > how
>> > do I get it to run as a system service?
>> >
>> > "Sergey Bogdanov" wrote:
>> >
>> >> Also you can periodically call RasEnumConnection P/Invoke in a
>> >> separate
>> >> thread. It will return list of all active RAS connections and its
>> >> names
>> >> that can be used to distinguish between one another. For example, for
>> >> an
>> >> active USB connection it will return connection with the name "`USB"
>> >> or
>> >> something.
>> >>
>> >> Best regards,
>> >> Sergey Bogdanov
>> >> http://www.sergeybogdanov.com
>> >>
>> >>
>> >> Nick Stineman wrote:
>> >> > I have a pretty basic question about the state of connectivity. My
>> >> > application will be a mostly disconnected application that (when
>> >> > available)
>> >> > needs to send & receive data from the enterprise server. The
>> >> > question
>> >> > I have
>> >> > is that how can I monitor (from the device) for a good Wireless
>> >> > connection,
>> >> > an ethernet connection, or a USB connection? The customer will be
>> >> > using all
>> >> > three situations to load & unload data from the device. Both the
>> >> > USB &
>> >> > Ethernet would be a cradle situation but the wireless would be a
>> >> > here &
>> >> > there
>> >> > situation. Thusly, my second question is how I can monitor for a
>> >> > wireless
>> >> > connection with an acceptable level of strength (30%). The users
>> >> > will
>> >> > be
>> >> > walking through areas all the time that have wireless access points.
>> >> > Sometimes these areas will be open for minutes & sometimes they'll
>> >> > only
>> >> > pass
>> >> > by them for a few seconds. I need to be able to monitor for any of
>> >> > the
>> >> > above
>> >> > 3 situations and begin my transfers when certain criteria are met.
>> >> > I've seem
>> >> > several posts on where to find more information on this subject but
>> >> > no
>> >> > posts
>> >> > on exactly how to write it in & implement it onto the handheld. I
>> >> > want
>> >> > this
>> >> > to happen automatically, behind the scenes without any user
>> >> > interaction. Any
>> >> > help would be greatly appreciated. Thanks!!
>> >>

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?cnNjYXN0cm8=?=
Guest
Posts: n/a
 
      16th May 2005
Hi Salim,

The solution of the link don't work correctly because don't detect the
disconnected state when wireless is out of range. Any easy solution for this?

Ramón Somorrostro.

"salimgbelim" wrote:

> Hi Nick,
>
> Hope this might be useful
>
> http://msdn.microsoft.com/library/de...kComponent.asp
>
> Regards,
>
> Salim
>
>

 
Reply With Quote
 
Paul G. Tobey [eMVP]
Guest
Posts: n/a
 
      16th May 2005
What does the WZC dialog show in that situation? Obviously, your .NET CF
code isn't going to know more about the state of things than the OS itself.
If it doesn't know that it's out of range, you don't know, either.

Paul T.

"rscastro" <(E-Mail Removed)> wrote in message
news:8ED3E613-4C36-4176-898E-(E-Mail Removed)...
> Hi Salim,
>
> The solution of the link don't work correctly because don't detect the
> disconnected state when wireless is out of range. Any easy solution for
> this?
>
> Ramón Somorrostro.
>
> "salimgbelim" wrote:
>
>> Hi Nick,
>>
>> Hope this might be useful
>>
>> http://msdn.microsoft.com/library/de...kComponent.asp
>>
>> Regards,
>>
>> Salim
>>
>>



 
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
Ethernet: Little or No Connectivity at my wits end! BDK Windows XP Networking 2 9th Jun 2008 01:02 PM
Any NAS drive that has ethernet and USB connectivity? Aloke Prasad Storage Devices 4 10th Aug 2007 12:56 AM
Ethernet card has limited or no connectivity =?Utf-8?B?Ym9i?= Windows XP General 1 11th Sep 2006 03:45 PM
Ethernet - No Connectivity...not receiving! =?Utf-8?B?RG9teWFydXM=?= Windows XP Networking 10 24th Feb 2005 12:11 AM
ethernet connectivity problem Mark\(\(0o0\)\) Windows XP Help 1 4th Jun 2004 06:03 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:48 AM.