Connect router (Archer C50) to a 802.1X EAP network

Of course.
First install openwrt firmware
Connect you by cable in ssh to your router (port LAN1)
Connect port WAN to Internet (there you can use another computer to share the connection received by wifi from exemple throught ethernet port of the PC then connect it to WAN on the router)
then perform:

opkg update
opkg remove wpad-basic

For some reasons install of wpad package didn't works throught ssh.
Then connect your computer to the router throught lucy (192.168.1.1) tab System/Software
Then you can install wpad by simply search it in the "Download and install package:" field.
Then active your wifi which is disabled by default. Tab Network/Wireless then click enable.
For me it's like this : N auto 20MHz
Add security if you want, and be sure you can add WPA2 security on it which comfirms that wpad package is correclty installed.
Now connect your computer to the router back in ssh.

Then create a new folder :
mkdir config
then:
wpasupplicant.conf

This is my wpasupplicant.conf where you need to replace of cours email & password:

# The directory that will be created for UNIX domain sockets
ctrl_interface=/var/run/wpa_supplicant

# Access control for the control interface
ctrl_interface_group=0

# IEEE 802.1X/EAPOL version
eapol_version=2

# This mode must be used when using wired Ethernet drivers
ap_scan=0

network={
	key_mgmt=IEEE8021X
	eap=TTLS
	phase1=""
	phase2="auth=PAP"
	identity="email@domain.hr"
	password="pass"
	eapol_flags=0
}

Save it (escape then type :wq)
Then type command:
wpa_supplicant -i eth0.2 -D wired -c /root/config/wpasupplicant.conf -dd -t
Finally:
udhcpc -i eth0.2

And now everything should works fine
For automate this at boot create a file wpasupplicant.init:

#!/bin/sh /etc/rc.common

START=50
STOP=15

start() {
	sleep 20
	wpa_supplicant -i eth0.2 -D wired -c /root/config/wpasupplicant.conf -dd -t -B
	sleep 10
	udhcpc -i eth0.2
	sleep 5
}

stop() {
	killall wpa_supplicant
	sleep 2
}

put it in /etc/init.d/ folder then the full path is /etc/init.d/wpasupplicant.init
Now enter the command:

sed -i -e 's/\r//g' /etc/init.d/wpasupplicant.init
chmod +x /etc/init.d/wpasupplicant.init
/etc/init.d/wpasupplicant.init enable
2 Likes