Solved

c++ manage wireless connection

Posted on 2011-03-07
5
981 Views
Last Modified: 2012-05-11
I'm writing a small app for an XP notebook.  The app needs to connect to the Internet and send and receive a few files VIA FTP.  The notebook will not be used for any other Internet activity and the connection process must be as simple and seemless as possible.

What I would like to do is be able to, by default, have the wireless connection disabled so there's no chance of someone harming the notebook while it's roaming around (they will be moving from one place to the other a good bit).

When the user begins the app, it should enable the wireless connection, automatically connect to any unprotected network within range - even if it's not in the network list, send and receive the files, then disable the wireless connection again.

I've tried the "Automatically connect to non-preferred networks" setting in the advanced wireless network connections window, but after a reboot, it still doesn't automatically connect to my local unsecured network.  The user would have to go in and manually connect.  This is what I'd like to avoid if possible.

I'm sure all this is possible with C++, but I need a little guidance.

Thanks
0
Comment
Question by:theclay
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 11

Expert Comment

by:DeepuAbrahamK
ID: 35055715
Configuring the wireless may help. Have a look at the attachment.
wireless.JPG
0
 
LVL 6

Accepted Solution

by:
t-max earned 500 total points
ID: 35056388
There's a Microsoft utility to turn on/off wifi cards.
You can run that from a batch (or c++ if you want) on Windows start up, to disable the card, and then turn it on when your app runs.
More info here: http://wlanbook.com/enable-disable-wireless-card-command-line/
0
 

Author Comment

by:theclay
ID: 35058502
I have the notebook connecting fine on networks that were previously used - as per the first suggestion here.  What I'd like to do is have the notebook connect to new connections (like, if the user took it into a coffee shop) automatically without them having to open the connection window and tell it to connect.

The devcon app works great except that it takes it too long to start up the connection.  My program enables the connection, then tries to connect, but gives an error because it takes a little while to get the connection up and running once it's activated.  I could build a pause into the program, but the amount of time is probably going to vary based on how fast the notebook is, how many other programs are running, how the stars are aligned, etc.

I could probably make devcon work, but if in the mean time there are other remedies or suggestions I would love to hear them.
0
 
LVL 6

Expert Comment

by:t-max
ID: 35059508
I'm sure the delay is caused both by enabling the wifi interface again, and by the setup time it takes to connect to a known network. I'm not sure those delays are unavoidable, but perhaps they are.
About connecting automatically, I guess it's possible, but not so secure to my taste.
0
 

Author Comment

by:theclay
ID: 35060646
Yeah the delay makes sense.  Probably not avoidable.  I'll just have to set a timer if I want to use that method.
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question