As with most things on GNU/Linux, there are many ways to connect to wifi. What follows is one simple and relatively straight-forward way among others.
This guide makes two assumptions:
1) The driver for your wireless network interface controller (nic) is distributed with the linux kernel (see Note #1)
2) You know the name of the extension that contains your wireless nic's firmware (firmware-mediatek is used below merely as an example) (see Note #2)
A. These are the steps if your TCL computer already has a wired (ethernet) connection to the internet:
1. Load wifi-manager.tcz (see Note #3) and the extension that contains your wireless nic's firmware (again, firmware-mediatek.tcz here is just an example):
$ tce-load -wi wifi-manager firmware-mediatek
2. Copy wifi-manager's example config file into your ~/.config directory:
$ mkdir -p ~/.config; cp /usr/local/share/wifi-manager/wifi-manager.conf ~/.config
3. Use your favorite text editor to add your access point's ssid|password combination to ~/.config/wifi-manager.conf
4. Disconnect from ethernet by removing the ethernet cable or running:
$ sudo ifconfig eth0 down
5. Connect to wifi by running this command in a terminal:
$ sudo wifi-connect
B. These are the steps if your TCL computer does NOT have a wired (ethernet) connection:
1. Download Rich's FetchExt.sh script from here: https://gnuser.ddns.net/public/FetchExt.sh
2. Make sure the TC and ARCH variables at the top of FetchExt.sh match the TCL version and architecture you are using (for example, if you are using TCL16 Pure64 you need TC=“16.x” and ARCH=“x86_64”)
3. Copy FetchExt.sh to a GNU/Linux system that does have an internet connection.
Steps 4-6 are performed on the GNU/Linux system that has an internet connection.
4. Make the FetchExt.sh script executable.
5. Create and cd into an empty directory, for example:
$ mkdir /tmp/extensions; cd /tmp/extensions
6. Download wifi-manager.tcz, its dependencies, and the extension that contains your wireless nic's firmware (again, firmware-mediatek.tcz here is just an example):
$ /path/to/FetchExt.sh wifi-manager firmware-mediatek
7. Copy all the files in /tmp/extensions to your TCL machine's tce/optional directory
8. Boot into your TCL machine and load the necessary extensions:
$ tce-load -i wifi-manager firmware-mediatek
9. Follow steps A.2. through A.5. (see above)
Note #1: If the driver for your wireless nic is not distributed with the linux kernel, then connecting to wifi on GNU/Linux is complex and beyond the scope of this guide.
Note #2: To find the name of the extension that provides your wireless nic's firmware, you first need to determine the firmware's exact filename. Boot into your TCL machine then issue these commands:
$ tce-load -wi wireless-KERNEL bluetooth-KERNEL $ dmesg | grep firmware ... [ 23.699520] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 23.785437] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7260-17.ucode failed with error -2 [ 23.843757] iwlwifi 0000:02:00.0: loaded firmware version 17.459231.0 7260-17.ucode op_mode iwlmvm [ 747.236848] bluetooth hci0: Direct firmware load for intel/ibt-hw-37.7.10-fw-1.80.2.3.d.bseq failed with error -2 [ 747.239327] Bluetooth: hci0: Intel Bluetooth firmware file: intel/ibt-hw-37.7.10-fw-1.80.2.3.d.bseq
Some wireless nics require bluetooth drivers and firmware, which is why it is helpful to load bluetooth-KERNEL as shown above. In this example, you can see that the missing firmware files are iwlwifi-7260-17.ucode and ibt-hw-37.7.10-fw-1.80.2.3.d.bseq.
Now that you know the firmware's exact filename(s), you can find the extension(s) you need. If you have a TCL machine with any kind of internet connection, you can use provides.sh for this purpose:
$ provides.sh iwlwifi-7260-17.ucode firmware-iwlwifi.tcz $ $ provides.sh ibt-hw-37.7.10-fw-1.80.2.3.d.bseq firmware-intel.tcz
If you don't have a TCL machine with an internet connection, not to worry: On any machine with an internet and web browser you can go to http://tinycorelinux.net/16.x/x86_64/tcz/provides.db (adjust the TCL version and architecture in the URL as appropriate), search the page for the filename you need (e.g., iwlwifi-7260-17.ucode), then scroll up until you see the extension (.tcz) that supplies it (which would be firmware-iwlwifi.tcz in this example).
Note #3: wifi-manager.tcz is available for recent versions of TCL (TCL15 or later), x86 and x86_64 architectures. If you are using an older version of TCL or an architecture other than x86 or x86_64, wifi-manager.tcz will not be in your repository but a similar extension, simply called wifi.tcz, should be available. wifi.tcz is well-maintained and works similarly to wifi-manager.tcz – both are just shell scripts that run iw or iwlist (to scan for available access points), then wpa_supplicant (to authenticate with an access point), then udhcpc (to get an IP address).
1. Boot tinycore and install the needed wireless packages if you haven't already (if you have an Intel wireless card, you need to install firmware-intel.tcz first, and iwlwifi.tcz if it doesn't install it as a dependency).
| wireless_tools.tcz | gives you iwconfig and other tools | | wireless-`uname -r`-tinycore.tcz | in-kernel wifi drivers | | wpa-supplicant.tcz | wpa_supplicant tool for negotiating secured access points |
If you will be installing to a system that depends on wifi access you may find it easier to pre-download these files and copy them to your tinycore tce directory so that they are installed at boot time (or use tce-load to install them after boot).
2. Check whether you can see your wireless hardware. in the console run: iwconfig
You should see a list of interfaces with some status info. your wireless interface may show up as wlan0 (but maybe ath0 or eth0?). You need to remember the name of this interface as it will be used later
If you don't see a connection, you may need to load or install drivers. The wireless-`uname -r`-tinycore contains all in-kernel wifi drivers. You can verify the drivers are present using something like (assuming Atheros card): modprobe -l | grep ath you should see the ath9k.ko.gz and ath5k.ko.gz device driver files
Verify they are loaded using: lsmod | grep ath
You can use modprobe to temporarily load and unload drivers as needed. For instructions on setting up alternative Atheros drivers, see Network Setup - Atheros Wireless Cards
Before you start, you need to look up your access point id (ssid) and passphrase (a string).
network={ ssid=mynetwork proto=WPA key_mgmt=WPA-PSK pairwise=TKIP group=TKIP psk=f242925f83787084d58101d5eb52485989e2a553983bfe6fc5b8d27fdfa063bd }
Note: This assumes a fairly conventional WPA-PSK setup. If you need to use other security (e.g. WEP) or are connecting to a more sophisticated network you may have to tweak this file. See the wpa_supplicant manual for more info. (What if you connect to more than one WPA-PSK network? You can add as many network sections to the conf file as needed.) save it as /opt/wpa_configure.conf (then to ensure it is persistent in the system, add the line opt/wpa_configure.conf to /opt/.filetool.lst)
Alternately, instead of running netcardconfig you could just issue the udhcpc command, e.g.: udhcpc -i *interface*
Connect to non-secured access point. (Script that displays local Access Points to connect to. Only works with unsecured APs.)
#!/bin/sh - Example usage: - - sudo sh mywifi.sh - - Can automate this stuff by putting into /opt/bootlocal.sh (without the need for sudo) - using cpanel, network autocreates /opt/my* - Determine device name (assume one wifi device; use head, etc. to restrict to first, last...) |wlan=`iwconfig 2>/dev/null |grep IEEE |awk '{print $1}' `| echo $wlan essid=myessid - set wepkey to hex digits, leave blank if no wep-security is used wepkey=deadbeafdeadbeaf echo SID ${essid} if [[ -n "${wep}" ]] then echo WEPKEY $wepkey fi iwconfig ${wlan} iwconfig ${wlan} essid ${essid} if [[ -n "${wep}" ]] then iwconfig ${wlan} enc ${wepkey} iwconfig ${wlan} key ${wepkey} fi iwconfig ${wlan} commit - now setup IP address, route, gateway, etc. - Use DHCP - after netcardconfig and save settings - TC@BOX:~$ cat /opt/eth1.sh - !/bin/sh pkill udhcpc udhcpc -H box -b -i ${wlan}