Reply To: Setup wifi with WEP or WPA

HomeForumsMonoBrick EV3 FirmwareSetup wifi with WEP or WPAReply To: Setup wifi with WEP or WPA

#5056
Author Image
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

Posted in

Make a donation