This is a first draft of a howto on wifi. Comments/edits welcome. I'm not all that familiar with tinycore internals, network tech and network jargon so I'm sure there are mistakes.
Can merge some info from the existing wifi howto (e.g. getting other drivers)
---------------------------------------------
Here are some instructions for getting wifi to work in tinycore with minimal dependencies and not too much fuss.
Note: If you want a more out of the box wifi setup, you can install the wicd package, which will offer you a gui to take care of all the connection details. The only price is extra package dependencies.
Prerequisites:
1. You have a working tinycore system with some support for persistence (a tce directory and either a backup/restore point or a persistent /opt directory) <-- link to appropriate howtos
2. Your wireless hardware is supported by the open source Atheros wifi drivers
3. You want to connect to an open access point or WPA-PSK secured AP (you do care about security don't you?)
Initial Preparation
1. boot tinycore and install the needed wireless packages if you haven't already
* wireless_tools.tce -- gives you iwconfig and other tools
* wireless-2.6.29.1-tinycore.tcem -- open source atheros wifi drivers
* wpa-supplicant.tce (which depends on openssl-0.9.8h.tcel) -- 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.
2. the wireless-2.6.29.1-tinycore package automatically installs the open source atheros drivers (ath5k/ath9k), these will autoload into tinycore once you have the pacakages installed.
double check they are there by running the following at the command line:
modprobe -l | grep ath
you should see the ath9k.ko.gz and ath5k.ko.gz device driver files
you can also
lsmod | grep ath
to verify modules are actually loaded
3. now make sure 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 will likely show up as wlan0 (but maybe ath0 or eth0?). You need to remember the name of this interface as it will be used later
Connecting to an open access point (haven't actually tested this properly yet)
1. To connection to a particular access point, all you need to do is type in the console
iwconfig <interface> essid <network-id>
to search for access points, use the command iwlist scanning
.
to connect to the nearest access point, just use:
iwconfig <interface> essid any
2.To finalize the connection (getting IP address etc), go to control panel, open the netcardconfig tool. switch eth0 to the name of your interface (e.g. wlan0). Change "use DHCP Broadcast?" to yes, leave "Save Configuration" as yes. Hit apply. This will save and run a script /opt/<interface>.sh. In addition, the /opt/bootlocal.sh (the script run at boot) will now include /opt/<interface>.sh. If your /opt directory is not persistent, make sure you do a backup when you boot or you will need to rerun this tool each time you boot.
3. At this point you should have a working network connection. If it doesn't work you might need to play around with the udhcpc commandline (the gui in step 2 makes a udhcpc call, but there are additional options that may be needed)
4. If you don't want to have to run step 1 and 2 every time you boot, you can add the command to your /opt/bootlocal.sh file before the line that calls /opt/<interface>.sh script (make sure you backup!)
Connecting to a WPA-PSK secured access point
Before you start, you need to look up your access point id (ssid) and passphrase (a string).
1. At the command line, run
wpa_passphrase <essid> <passphrase>
For example:
~$ wpa_passphrase mynetwork mypassphrase
network={
ssid="mynetwork"
#psk="mypassphrase"
psk=f242925f83787084d58101d5eb52485989e2a553983bfe6fc5b8d27fdfa063bd
}
2. Now create a file in your favorite editor replacing the ssid and psk values below with result from step 1:
ctrl_interface=/var/run/wpa_supplicant
network={
ssid=mynetwork
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
psk=f242925f83787084d58101d5eb52485989e2a553983bfe6fc5b8d27fdfa063bd
}
Note that 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 -- 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)
3. to connect to the access point, run in the console:
wpa_supplicant -i<interface> -c/opt/wpa_supplicant.conf &
(what diagnostics can be run here to verify the connection? iwconfig etc)
4. now to finalize the connection (getting IP address etc), go to control panel, open the netcardconfig tool. switch eth0 to the name of your interface (e.g. wlan0). Change "use DHCP Broadcast?" to yes, leave "Save Configuration" as yes. Hit apply. This will save and run a script /opt/<interface>.sh. In addition, the /opt/bootlocal.sh (the script run at boot) will now include /opt/<interface>.sh. If your /opt directory is not persistent, make sure you do a backup when you boot or you will need to rerun this tool each time you boot.
5. At this point you should have a working network connection. If it doesn't work you might need to tweak the wpa_supplicant configuration or the udhcpc command line.
6. If you don't want to have to run step 3 and 4 every time you boot, you can add the wpa_supplicant command in line 3 to your /opt/bootlocal.sh file before the line that calls /opt/<interface>.sh script (make sure you backup!)