Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
wiki:setting_up_wifi [2019/01/29 19:56] – [More Advanced Setup: using wireless tools] TomyTurbos | wiki:setting_up_wifi [2025/06/09 15:17] (current) – [One simple way to connect to wifi] GNUser | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Easy Way: wicd ====== | + | ===== One simple way to connect to wifi ===== |
+ | 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. | ||
- | If you want to set up wifi with minimum of fuss, just install wicd package | + | This guide makes two assumptions: |
- | See http:// | + | |
+ | 1) The driver for your wireless network interface controller | ||
- | After installing " | + | 2) You know the name of the extension |
- | < | + | |
- | sudo wicd-start | + | |
- | </ | + | |
- | Then activate the GUI interface using the application menu. | + | |
- | + | ||
- | If you have problems getting wicd to see your wifi card, you may have driver issues. Atheros users can see this [[Network Setup - Atheros Wireless Cards]], but note that tinycore | + | |
- | + | ||
- | **TIP**: For a system that doesn' | + | |
- | + | ||
- | **WICD is not available for TC 4 !!!** | + | |
- | + | ||
- | ====== Another easy way: wpa_gui ====== | + | |
- | + | ||
- | //**Note:** As of **Tiny Core Linux 4.x** you can probably just use the wpa_gui | + | |
- | + | ||
- | You should configure | + | |
- | + | ||
- | ---- | + | |
- | + | ||
- | Another way to set up a wireless connection is to use wpa_supplicant with it's associated GUI interface. wpa_supplicant is the IEEE 802.1X/WPA component that is used in the client stations. It implements key negotiation with a WPA Authenticator and it controls the roaming and IEEE 802.11 authentication/ | + | |
- | + | ||
- | wpa_supplicant is designed to be a " | + | |
- | See http:// | + | |
- | + | ||
- | Install wpa_supplicant and wpa_gui. Then configure wpa_supplicant for remote control by creating a configuration file (this has to be done only once): | + | |
- | + | ||
- | Create a configuration file "/ | + | |
- | < | + | |
- | ctrl_interface=/ | + | |
- | ctrl_interface_group=staff | + | |
- | update_config=1 | + | |
- | </ | + | |
- | + | ||
- | After creating the configuration file start the wpa_supplicant daemon using the following command | + | |
- | and to have wpa_supplicant start every boot, add this to / | + | |
- | < | + | |
- | wpa_supplicant -Dwext -iwlan0 -c/ | + | |
- | </ | + | |
- | + | ||
- | Afterwards, all you need to do to connect to various networks is to run wpa_gui from the menu. | + | |
- | ====== More Advanced Setup: using wireless | + | **A. These are the steps if your TCL computer already has a wired (ethernet) connection to the internet:** |
+ | |||
+ | 1. Load // | ||
+ | $ tce-load -wi wifi-manager firmware-mediatek | ||
+ | |||
+ | 2. Copy // | ||
+ | $ mkdir -p ~/.config; cp / | ||
+ | |||
+ | 3. Use your favorite text editor to add your access point' | ||
+ | |||
+ | 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 | ||
- | Prerequisites: | + | **B. These are the steps if your TCL computer does NOT have a wired (ethernet) connection:** |
+ | |||
+ | 1. Download Rich's // | ||
+ | |||
+ | 2. Make sure the //TC// and //ARCH// variables at the top of // | ||
+ | |||
+ | 3. Copy // | ||
+ | |||
+ | Steps 4-6 are performed on the GNU/Linux system that has an internet connection. | ||
+ | |||
+ | 4. Make the // | ||
+ | |||
+ | 5. Create and cd into an empty directory, for example: | ||
+ | $ mkdir / | ||
+ | |||
+ | 6. Download // | ||
+ | $ / | ||
+ | |||
+ | 7. Copy all the files in /// | ||
- | 1. You have a working tinycore system | + | 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' | ||
+ | $ tce-load -wi wireless-KERNEL bluetooth-KERNEL | ||
+ | $ dmesg | grep firmware | ||
+ | ... | ||
+ | [ | ||
+ | [ | ||
+ | [ | ||
+ | [ 747.236848] bluetooth hci0: Direct firmware load for intel/ | ||
+ | [ 747.239327] Bluetooth: hci0: Intel Bluetooth firmware file: intel/ | ||
+ | Some wireless nics require bluetooth drivers and firmware, which is why it is helpful to load // | ||
+ | |||
+ | Now that you know the firmware' | ||
+ | $ 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 | ||
+ | |||
+ | **Note #3:** | ||
+ | // | ||
+ | ===== More Advanced Setup : Using wireless tools ===== | ||
- | 2. Your wireless hardware is supported by a driver available in the repo. | + | === Prerequisites === |
+ | - You have a working tinycore system with some support for persistence (ie: A tce directory and either a backup/ | ||
+ | - Your wireless hardware is supported by a driver available in the repo. | ||
+ | - You want to connect to an open access point, WEP or WPA-PSK secured AP (you do care about security don't you?) | ||
- | 3. You want to connect to an open access point, WEP or WPA-PSK secured AP (you do care about security don't you?) | + | === Initial Preparation === |
- | ===== Initial Preparation ===== | + | 1. Boot tinycore and install the needed wireless packages if you haven' |
+ | | 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 | | ||
- | 1. boot tinycore and install the needed wireless packages if you haven' | ||
- | * wireless_tools.tcz -- gives you iwconfig and other tools | ||
- | * wireless-`uname -r`-tinycore.tcz -- in-kernel wifi drivers | ||
- | * wpa-supplicant.tcz (which depends on openssl-0.9.8.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). | 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: | + | 2. Check whether you can see your wireless hardware. in the console run: **iwconfig** |
- | ^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 |
- | + | ||
- | 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^| | + | |
+ | 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 < | ||
you should see the ath9k.ko.gz and ath5k.ko.gz device driver files | you should see the ath9k.ko.gz and ath5k.ko.gz device driver files | ||
- | verify | + | Verify |
- | |^lsmod | grep ath^| | + | **lsmod < |
- | 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]] | + | 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 |
- | ===== Connecting to an open access point ===== | + | === Connecting to an open access point === |
- | + | | |
- | 1. To connect 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 | + | |
- | + | ||
- | Alternately, | + | |
- | ^udhcpc -i *interface*^ | + | |
- | + | ||
- | 3. At this point you should have a working network connection. If it doesn' | + | |
- | + | ||
- | 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 / | + | |
- | + | ||
- | ===== Connecting to a WPA-PSK secured access point ===== | + | |
+ | === 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). | Before you start, you need to look up your access point id (ssid) and passphrase (a string). | ||
- | + | * At the command line, run **< | |
- | 1. At the command line, run | + | * Now create a file in your favorite editor replacing the ssid and psk values below with result from step 1: **ctrl_interface=/ |
- | ^wpa_passphrase *essid* *passphrase*^ | + | < |
- | + | ||
- | For example: | + | |
- | ^ | + | |
- | ~$ wpa_passphrase mynetwork mypassphrase | + | |
network={ | network={ | ||
- | ssid="mynetwork" | + | |
- | # | + | proto=WPA |
- | psk=f242925f83787084d58101d5eb52485989e2a553983bfe6fc5b8d27fdfa063bd | + | key_mgmt=WPA-PSK |
- | } | + | pairwise=TKIP |
- | ^ | + | group=TKIP |
- | + | psk=f242925f83787084d58101d5eb52485989e2a553983bfe6fc5b8d27fdfa063bd | |
- | 2. Now create a file in your favorite editor replacing the ssid and psk values below with result from step 1: | + | }</code> |
- | + | ||
- | ^ | + | |
- | ctrl_interface=/ | + | |
- | + | ||
- | network={ | + | |
- | ssid=mynetwork | + | |
- | | + | |
- | 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/ | + | |
- | + | ||
- | 3. to connect to the access point, run in the console: | + | |
- | ^wpa_supplicant -i*interface* -c/ | + | |
- | + | ||
- | For diagnostic run this command with debugging option -d | + | |
- | ^sudo wpa_supplicant -i*interface* -c/ | + | |
- | Close debugging mode with Ctrl+c. \\ | + | |
- | You can verify the connection with '' | + | |
- | Another simple method is watching card LINK diode. Diode shines with constant light, when Adapter is connected to AP. | + | |
- | + | ||
- | 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?" | + | |
- | + | ||
- | Alternately, | + | |
- | ^udhcpc -i *interface*^ | + | |
- | + | ||
- | 5. At this point you should have a working network connection. If it doesn' | + | |
- | + | ||
- | 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 / | + | |
- | + | ||
- | ===== Simple scripts to auto connect to specific networks ===== | + | |
- | + | ||
- | ==== Connect to non-secured access point. ==== | + | |
- | + | ||
- | Script that displays local Access Points to connect to. Only works with unsecured APs. | + | |
- | + | ||
- | http:// | + | |
- | ==== Connect to either non-secure or WEP protected access point ==== | + | 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 / | ||
- | NOTE requires editing of shell script | + | * to connect to the access point, run in the console: **wpa_supplicant -i*interface* -c/ |
+ | * 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?// | ||
- | NOTE to set your WEP key using a plain text string (i.e.: not HEX) then put an s: in front of the key. | + | Alternately, |
- | ^iwconfig wlan0 key s: | + | * At this point you should have a working network connection. If it doesn' |
+ | * 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 / | ||
- | < | + | === Simple scripts to auto connect to specific networks === |
+ | Connect to non-secured access point. (Script that displays local Access Points to connect to. Only works with unsecured APs.) | ||
+ | * [[http:// | ||
+ | < | ||
+ | #!/bin/sh | ||
- Example usage: | - Example usage: | ||
- | - | ||
Line 187: | Line 155: | ||
echo SID ${essid} | echo SID ${essid} | ||
if [[ -n " | if [[ -n " | ||
- | then | + | then |
echo WEPKEY $wepkey | echo WEPKEY $wepkey | ||
fi | fi | ||
Line 208: | Line 176: | ||
pkill udhcpc | pkill udhcpc | ||
udhcpc -H box -b -i ${wlan} | udhcpc -H box -b -i ${wlan} | ||
+ | </ | ||
- | |||
- | </ | ||