A simple Bash script to establish a Wi-Fi connection for the TP-LINK TL-WN725N Nano USB adapter. Intended for the Arch Linux OS, however it should work fine for all Arch-based distros.
Clone the tlwn725n repository to the local machine.
$ git clone https://github.com/devourerOfBits80/tlwn725n.git
If you are going to use the Arch Linux installation media, clone the repository to a USB flash drive or to any different portable mass storage device.
$ git clone https://github.com/devourerOfBits80/tlwn725n.git /run/media/{user}/{device_identifier}
Go to the tlwn725n repository folder.
$ cd ./tlwn725n
If you are using the installation media, boot the live environment, plug-in the prepared USB flash drive to a USB port, mount it to the /mnt, and go to the tlwn725n directory.
$ mount /dev/sdXY /mnt (to list all block devices use the command lsblk -l)
$ cd /mnt/tlwn725n
Finally, show all available network interfaces, find out the proper one, and execute the Wi-Fi connection script.
$ ip link show (the expected interface name should be wlan0 or something like that)
$ ./tlwn725n.sh -i wlan0 -s {SSID} -p {PASSWORD} -c PL ({COUNTRY_CODE} is optional, default set to US)
voilà
You should be able to access the internet now. The generated wpa_supplicant configuration file can be found in the /etc/wpa_supplicant directory. Its name should look like: wpa_supplicant-wext-wlan0.conf.
If you were booting your machine via the installation media, remember to unmount the mounted drive.
$ umount /mnt