?
Solved

c++ manage wireless connection

Posted on 2011-03-07
5
Medium Priority
?
983 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 2000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Six Sigma Control Plans
Progress
Suggested Courses

771 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