A prerequisite is to read the instructions here: Setting Up Wifi.
To use this guide, one must follow the instructions under the Advanced Setup Using Wireless Tools section and the Connecting to to a WPA-PSK Secured Access Point section.
Specifically you must have a “wpa_configure.conf” file and these commands must connect you to the desired access point.
wpa_supplicant -i*interface* -c/opt/wpa_configure.conf & udhcpc -i *interface*
We need to find the absolute locations of 2 commands wpa_supplicant and udhcpc.
We can do this using the find command.
find / -name 'filename' 2> /dev/null
find / -name 'wpa_supplicant' 2> /dev/null
/tmp/tcloop/wpa_supplicant /tmp/tcloop/wpa_supplicant/usr/local/sbin/wpa_supplicant /usr/local/sbin/wpa_supplicant /usr/local/tce.installed/wpa_supplicant
find / -name 'udhcpc' 2> /dev/null
So I write down the two file locations: /usr/local/sbin/wpa_supplicant and /sbin/udhcpc
You should have a file named wpa_configure.conf.
If you do not have a wpa_configure.conf file, please read these instructions: Connecting to to a WPA-PSK Secured Access Point.
This file needs to be persistent between reboots. Thus, you must store it a place that is saved between reboots.
These locations are specified in the file /opt/.filetool.lst.
I chose to keep my wpa_configure.conf file in the /opt directory, but you can save it anywhere as long as that location persists between reboots.
Finally we need to tell Tiny Core that we want to run these specific commands at boot.
Thus we will need to append to our bootlocal.sh file which can be found in the /opt directory.
Lets open up a text editor and add these 3 lines:
# Setup Wireless /your/path/to/wpa_supplicant -i[wireless adapter] -c[location of wpa_configure.conf] & /your/path/to/udhcpc -i [wireless adapter] &
- The first line is just an optional comment to remind us what these 2 lines do.
- My [wireless adapter] = wlan0
- My /path/to/wpa_supplicant = /usr/local/sbin/wpa_supplicant
- My /path/to/wpa_configure.conf = /opt/wpa.conf
- My /path/to/udhcpc = /sbin/udhcpc
- The ” &” tells the command to run in the background which is what we want.
So my bootlocal.sh file additions look like:
# Setup Wireless /usr/local/sbin/wpa_supplicant -iwlan0 -c/opt/wpa.conf & /sbin/udhcpc -i wlan0 &
Finally, we must save all of our changes.
This will save changes to our bootlocal.sh file and also allow us to save our wpa_configure.conf file.
To save your changes run:
sudo filetool.sh -b