overwraith Posted June 8, 2014 Share Posted June 8, 2014 So does anybody know how to connect to a WPA 2 network? So I have figured out that one needs to use a different executable than iwconfig, because iwconfig only works on wep and open networks. I have found some stuff online about the wpa_supplicant command, but the structure of the config file that is used to set it up eludes me. Quote Link to comment Share on other sites More sharing options...
xrad Posted June 8, 2014 Share Posted June 8, 2014 Would this help overwraith? http://linuxcommando.blogspot.com/2013/10/how-to-connect-to-wpawpa2-wifi-network.html Quote Link to comment Share on other sites More sharing options...
overwraith Posted June 8, 2014 Author Share Posted June 8, 2014 Not really, that is what i was looking at a few minutes ago. Some of the commands like wpa_passphrase don't exist in pineapple environment. Quote Link to comment Share on other sites More sharing options...
xrad Posted June 8, 2014 Share Posted June 8, 2014 Ok how about using wpad, or wpad mini, instead of wpa_supplicant? http://wiki.openwrt.org/doc/uci/wireless/encryption#configure.wpa2.psk I'm just guessing here, so I hope I'm not wasting your time. Quote Link to comment Share on other sites More sharing options...
overwraith Posted June 8, 2014 Author Share Posted June 8, 2014 Actually pineapple has wpa_supplicant, is wpad mini any better? Quote Link to comment Share on other sites More sharing options...
Sebkinne Posted June 8, 2014 Share Posted June 8, 2014 You should be using OpenWRT configuration for this. It's much easier to manage: http://wiki.openwrt.org/doc/uci/wireless Best Regards, Sebkinne Quote Link to comment Share on other sites More sharing options...
xrad Posted June 8, 2014 Share Posted June 8, 2014 (edited) I am not sure if better is the word to be used overwraith. It seems from the wiki at openwrt (previous link) wpad supports AP, Client and WPA Enterprise. You may want to wait until Sebkinne chimes in. Edit: oops he did while I was writing this post. Edited June 8, 2014 by xrad Quote Link to comment Share on other sites More sharing options...
Sebkinne Posted June 8, 2014 Share Posted June 8, 2014 I am not sure if better is the word to be used overwraith. It seems from the wiki at openwrt (previous link) wpad supports AP, Client and WPA Enterprise. You may want to wait until Sebkinne chimes in. Edit: oops he did while I was writing this post. Using the configuration file found at /etc/config/wireless allows you to set up everything you want. Executing the "wifi" command over SSH afterwards will run your configuration and connect to any networks. I am curious though, why do you not use the webinterface for this? It does all this for you in a jiffy ;) Either way, OpenWRT's wifi configuration sets up hostapd/wpa_supplicant/whatever up for you automatically - all it requires is a modified /etc/config/wireless file. Edit: This works for open, WEP, WPA2 (and possibly radius) networks. Best Regards, Sebkinne Quote Link to comment Share on other sites More sharing options...
xrad Posted June 8, 2014 Share Posted June 8, 2014 I think overwraith is trying to use the pineapple completely with cli other than the web interface. Not sure why though. Quote Link to comment Share on other sites More sharing options...
overwraith Posted June 8, 2014 Author Share Posted June 8, 2014 (edited) Well, I now have managed to delete one of my devices, wlan1 by messing with the etc/wireless config file, and have a WPA 2 encrypted wlan0. I think I am going to have to re-flash. damn. Quote: I think overwraith is trying to use the pineapple completely with cli other than the web interface. Not sure why though. Yes, it would be nice to be able to script the pineapple to do everything, so you can just set a dip switch and leave the thing where you want to do your snooping. GUI is so yesteryear. Edited June 8, 2014 by overwraith Quote Link to comment Share on other sites More sharing options...
xrad Posted June 8, 2014 Share Posted June 8, 2014 Try the Reset Wireless Configuration option in the Advanced tab of the Network title. It might fix it without reflash. Quote Link to comment Share on other sites More sharing options...
overwraith Posted June 8, 2014 Author Share Posted June 8, 2014 (edited) Will check it out. ... It worked. I guess GUI aren't that bad, but they shouldn't be used as a crutch if you know what I mean. Edited June 8, 2014 by overwraith Quote Link to comment Share on other sites More sharing options...
Sebkinne Posted June 8, 2014 Share Posted June 8, 2014 For next time: "wifi detect > /etc/config/wireless" Best regards, Sebkinne Quote Link to comment Share on other sites More sharing options...
overwraith Posted June 8, 2014 Author Share Posted June 8, 2014 (edited) Just checked out the gui version of what I am trying to do. Wow, that was easy. I think I will try to learn how to do this on CLI though, just in case I ever need to make a bash script that uses this. For tonight though, I will first watch game of thrones! Edited June 8, 2014 by overwraith Quote Link to comment Share on other sites More sharing options...
overwraith Posted June 9, 2014 Author Share Posted June 9, 2014 I am trying to get these configurations working, but I am not sure what mode to put the wifi configuration in. Here are the commands: uci set wireless.@wifi-device[1].mode=wds uci set wireless.@wifi-device[1].ssid=some_ssid uci set wireless.@wifi-device[1].encryption=psk2+tkip+ccmp uci set wireless.@wifi-device[1].key=some_key uci commit wireless wifi I am not sure whether quotes should be used on some of the entries, it doesn't say I should or shouldn't put any. Again, trying to connect wlan1 to a wpa2 encrypted network. I used iwlist command to determine that my home router uses psk2 tkip ccmp. Quote Link to comment Share on other sites More sharing options...
Sebkinne Posted June 9, 2014 Share Posted June 9, 2014 I am trying to get these configurations working, but I am not sure what mode to put the wifi configuration in. Here are the commands: uci set wireless.@wifi-device[1].mode=wds uci set wireless.@wifi-device[1].ssid=some_ssid uci set wireless.@wifi-device[1].encryption=psk2+tkip+ccmp uci set wireless.@wifi-device[1].key=some_key uci commit wireless wifi I am not sure whether quotes should be used on some of the entries, it doesn't say I should or shouldn't put any. Again, trying to connect wlan1 to a wpa2 encrypted network. I used iwlist command to determine that my home router uses psk2 tkip ccmp. Quotes are not required, but I do suggest single quotes. In regards to mode, you need to set the mode to 'sta' for clientmode, 'ap' for access point (wlan1 doesn't support AP), and so on. Best Regards, Sebkinne Quote Link to comment Share on other sites More sharing options...
overwraith Posted June 9, 2014 Author Share Posted June 9, 2014 I might be missing something else then. I will keep looking into it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.