I need to auto-connect to the AP wirelessly with WEP with the password hello. I know it's unsecure and that's the purpose of the lab environment I am setting up for a presentation. I've seen tutorials and answers like this one (Connecting the Pi3 automatically to Wifi) but they all are using WPA or WPA2 and would like some help in setting this up. I also need to be able to simulate high amounts of traffic to the AP like a network to generate a ton of IVs (initialization vectors). Any help would be appreciated.

  • I have never done this, but I believe it can be done by manually setting /etc/wpa_supplicant/wpa_supplicant.conf to group=CCMP TKIP WEP104 WEP40. Read man wpa_supplicant.conf for detail. – Milliways Jul 11 '17 at 5:18

First, WEP key (i.e. password) only allowed hexadecimal digits (i.e. 0 - 9, A - F) as password, therefore 'hello' is not a valid password, and maximum length for the password is 26 hexadecimal digits (or 104 bits). This is the reason that WEP is not very secure and seldom be used nowadays.

If you still want to use WEP, here is what you need to do. Run your editor (example using nano) to modify the configuration of /etc/wpa_supplicant/wpa_supplicant.conf file:

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Add the following configuration to the end of the file:

  ssid="your network said"

Please noted that there is no quote for wep_key and it must be hexadecimal digits, and maximum not exceeding 26 hexadecimals. My example shows a 26-digit key.

Save the file and reload the network service or reboot.

| improve this answer | |

This thread was very helpful in getting my Raspberry Pi connected to WEP router. Here are some details that I had to dig out:

The essence of the problem is that in the file /etc/wpa_supplicant/wpa_supplicant.conf the passkey is stored with quotes. The object is to remove the quotes (simple, right?). The problem is that the editor must be invoked with superuser privileges, otherwise you cannot save the edited file. The nano editor was not as friendly as the leafpad editor. So, in terminal:

sudo leafpad /etc/wpa_supplicant/wpa_supplicant.conf

Remove the quotes, save the file and Bob's your uncle!

| improve this answer | |
  • Everyone uses his favorite editor and swear it's the best one. nano is the most used one on the command line. I swear vim is the best one ever. So suggesting to use a specific editor is not a good idea particularly if you have to install it only for this action. Everyone using his favorite editor (he is familiar with it) should be able to delete some quotes. So you should advise to use sudo editor /etc/wpa_supplicant/wpa_supplicant.conf. This will start the favorite editor mostly nano (default setting of editor). For you it could start leafpad. Nevertheless +1. – Ingo Jan 20 '19 at 12:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.