Hi guys,
I began to integrate WPA settings into the /usr/bin/network.py (LAN&WiFi settings) of pdaXrom 1.1.0beta3.
Since my Python knowledge is very limited, I have a working version, but it needs some tweaking.
What I have done so far is:
- Enhanced network.py by the necessary
input fields for WPA settings,
-
Write these WPA settings to the
config file ~/Choices/network.cfg-
Read settings from ~/Choices/network.cfg when starting network.py and selecting a WPA-enabled scheme
-
add "WPA=y" to the corresponding /etc/pcmcia/wireless.opts section when WPA is enabled
- Call
wpa_passphrase "your SSID name" "your passphrase" > /etc/wpa_supplicant.confwhen hitting "OK" after configuring WPA, so that the wpa_supplicant config file is created.
So this version should be able to correctly create everything which is necessary for a WPA-enabled WiFi connection.
However, there are some problems:
1. When reading the settings from ~/Choices/network.cfg I get an
error in line 553 of the script and the stored value of the wpakey_type is not read in correctly, resulting in an
empty combobox field. Not a serious problem, but annoying. Don't know the reason due to limited Python knowledge.
2. Generation of the /etc/wpa-supplicant.conf file as it is now allows for
only one WPA-enabled scheme (or more schemes sharing the same WPA settings).
How is it handled to have more PCMCIA / network schemes with different WPA settings? That's not primarily a problem of the python script, but rather a conceptual problem... except there is a syntax in wpa_supplicant.conf file which allows for this which I don't know yet.
Is it possible to simply append other network={} sections with different SSIDs to the file?
3. The
input dialog size is a bit large when "wireless" is chosen (i.e. when the wireless tab is enabled). This is due to the additional input fields.
There is still some room for optimization (e.g. don't stack the checkboxes for "any ESSID" and "Power management", but put them side by side). but due to my limited Python knowledge I don't know how to do that.
I have NO experience with WPA so far and almost no experience with Python.
So don't consider this a professional approach please
Also, I haven't tested the enhancement yet. Will do so on the weekend when I have time to set up WPA at my office. I think it should work because I designed the improvement to meet the instructions for WPA on the
Tyrannozaurus Cacko website (search for "WPA")
Please find the new python script attached. Remove .txt extension before executing.
Any hints for improvements are appreciated!
I hope we will soon have a fully working WPA-enabled LAN & WiFi config GUI.
Thanks
daniel