1

I am relativly exceperinced in Python 2.x, and just started learning C. I've come to the conclusion that I will need to use the Windows Native Wifi API (feel free to provide alternatives).

I want to connect to a network with a given name and password. I really don't understand how I would use WlandConnect (that's the right function, right?).

If there is a (resonable) way, I'd prefer to do it in Python.

jacwah
  • 2,727
  • 2
  • 21
  • 42
  • You can use Socket for this. – Mihai8 Mar 09 '13 at 11:50
  • @user1929959 How would one go about doing this? I haven't used the `socket` module much. To be clear: i do not want to send data over the network, but connect the computer to a given network. – jacwah Mar 09 '13 at 12:15
  • @user1929959 After some googling and browsing various tutorials, I've seen no trace of a way to connect to the internet. That is, not connecting to a server, but to open a connection to the router or whatever in the socket module (I probably use all those words wrong but I hope you understand). – jacwah Mar 09 '13 at 12:39
  • In a cmd shell, look at the output of `netsh wlan`. You can use that command with `subprocess.check_call`. It doesn't let you set a key, but you can add/export XML profiles that have encrypted keys. If that's good enough, it will be easier than using the Win32 API via `ctypes`. – Eryk Sun Mar 09 '13 at 13:48

0 Answers0