Home→Forums→MonoBrick EV3 Firmware→Setup wifi with WEP or WPA→Reply To: Setup wifi with WEP or WPA
December 16, 2014 at 21:00
#5056

Anders Søborg
Keymaster
Hi there
Nice work. I would like to include this is the upcoming release. In our firwmare we use the following function to generate the wpa_supplicant_wep.conf file.
static void WriteWpaSupplicantConfiguration (string ssid, string password, bool useEncryption)
{
MonoBrickFirmware.Native.ProcessHelper.RunAndWaitForProcess("rm",WpaSupplicantFileName);
string encryption;
if(useEncryption)
encryption = "WPA-PSK";
else
encryption = "NONE";
string[] lines = {
"#This file is auto generated by MonoBrick - will be overwritten at startup",
"#ap_scan=1",
"#fast_reauth=1",
"# Pers",
"ctrl_interface=/var/run/wpa_supplicant",
"network={",
" ssid=\"" + ssid + "\"",
" key_mgmt="+encryption,
" psk=\"" + password + "\"",
" pairwise=CCMP TKIP",
" group=CCMP TKIP",
"}",
};
System.IO.File.WriteAllLines(@WpaSupplicantFileName, lines);
}
You can find function in the firmware startup app found here. Would it be possible for you to extend/rewrite this function to support WEP and then test if it actually works?
Thanks
Anders
Follow