Setup wifi with WEP or WPA

HomeForumsMonoBrick EV3 FirmwareSetup wifi with WEP or WPA

Tagged: 

This topic contains 6 replies, has 2 voices, and was last updated by Author Image Patrice Boucher 2 years, 7 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #4993
    Author Image
    Patrice Boucher
    Participant

    I would like to know if it’s possible to use WEP or WPA instead of WPA2?
    Currentlys only 2 choices appears in the menu none and WPA2.
    I have an older wifi router that i would like to use and it only supports WEP or WPA.
    I have the Edimax dongle on the EV3.
    If it’s possible then what should i do to set it up.

    #4995
    Author Image
    Anders Søborg
    Key Master

    Hi there

    Did you try to use WPA2 – as I remember it should be backwards compatible…

    /Anders

    #4999
    Author Image
    Patrice Boucher
    Participant

    Yes i did but it did not connect. The router has WPA Pre-Shared key with TKIP or WEP 64bits and 128 bits

    #5023
    Author Image
    Anders Søborg
    Key Master

    Hi there

    sorry for the late reply – it seems that we don’t support old routers with only WEP or WPA encryption. It could be added but to be completly honest this is not our highest priority at the momment. You Will have to connect without encryption.

    /Anders

    #5035
    Author Image
    Patrice Boucher
    Participant

    I was able to connect with wep. What i did is i created a file in /mnt/bootpar named wpa_supplicant_wep.conf
    The file contains the following parametres:

    ctrl_interface=/var/run/wpa_supplicant
    network={
    ssid=”myssid”
    key_mgmt=NONE
    wep_key0=FFFFFFFFFFFFFFFFFFFFFFFFFF
    wep_tx_keyidx=0
    auth_alg=SHARED
    }

    Then i modified the file startwlan in /home/root/lejos/bin to use the file /mnt/bootpar/wpa_supplicant_wep.conf
    instead of /mnt/bootpar/wpa_supplicant.conf.

    Now everything works fine.

    #5056
    Author Image
    Anders Søborg
    Key Master

    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

    #5065
    Author Image
    Patrice Boucher
    Participant

    Ok, I will take a look at it.
    Probably during the holidays.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Posted in

Make a donation