I use custom build of Openwrt AA with NO gui on TP-Link wr-743ND.
In order to connect to an external AP, I usually edit /etc/config/wireless to add/comment new ssid, encryption, and password lines.
Instead, I'd like to write a script, to connect preconfigured AP, WITHOUT rewriting the config. So I need to connect to the external AP using command line.
Since I do not have experience on Linux, I can't figure how to accomplish this.
So far, I can only try to
1. create a file for specific external AP,like
network={
ssid="ESSID_AP_NAME"
psk="WPA_PASS"
}
2. invoke wpa_suppicant, like
wpa_supplicant -B -iwlan0 -c/tmp/ap_specific_file -Dnl80211
the above will effectively make my router to connect(authenticate, authorize) to external AP, but without actual IP connectivity:
ping 8.8.8.8
FAILS
3. the only clue, i have,is to invoke netifd , which can actually resolve connectivity issue, but this command hangs...
--
SO PLEASE give me further instructions.