Both sides previous revisionPrevious revisionNext revision | Previous revision |
dcore:wireless_set-up [2016/05/17 08:27] – [Setting up Wireless] nitram | dcore:wireless_set-up [2017/09/18 16:19] (current) – [Configure wireless network] sm8ps |
---|
==From within dCore== | ==From within dCore== |
| |
If you have a function network connection then launch ''sce-import'' for //wireless//, //wireless-<KERNEL>-tinycore// and, if applicable, //ndis-wrapper-modules-<KERNEL>-tinycore//. | If you have a functional network connection then launch ''sce-import'' for //wireless//, //wireless-<KERNEL>-tinycore// and, if applicable, //ndis-wrapper-modules-<KERNEL>-tinycore//. |
| |
| |
| |
*Optional step for determining the available wireless networks: issue ''sudo iwlist scanning | less'' and search for "ESSID" | *Optional step for determining the available wireless networks: issue ''sudo iwlist scanning | less'' and search for "ESSID" |
*Create a file '/etc/wpa_supplicant /wpa_supplicant.conf' to contain the following and ''chmod'' it to 600-permissions. | *Create a file '/etc/wpa_supplicant.conf' to contain the following and ''chmod'' it to 600-permissions. |
<code> | <code> |
network={ | network={ |
} | } |
</code> | </code> |
| |
| Alternatively, one may use 'wifi.sh' which will create the file with the password hashed. The clear-text password is commented out and may be deleted. |
| |
== Set-up key file by use of WPA-cli== | == Set-up key file by use of WPA-cli== |
Following the excellent presentation in the [[https://wiki.archlinux.org/index.php/WPA_supplicant|Archlinux wiki]], this procedure will automate the writing of the configuration file by use of the semi-interactive tool 'wpa_cli'. It has quite an impressive list of features and probably can be helpful in many kinds of situations; ''wpa_cli --help'' gives a complete list of available commands. | Following the excellent presentation in the [[https://wiki.archlinux.org/index.php/WPA_supplicant|Archlinux wiki]], this procedure will automate the writing of the configuration file by use of the semi-interactive tool 'wpa_cli'. It has quite an impressive list of features and probably can be helpful in many kinds of situations; ''wpa_cli --help'' gives a complete list of available commands. |
| |
In order to use WPA-cli, a control interface must be specified for WPA-supplicant, and it must be given the rights to update the configuration. Do this by creating a minimal configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' with 600-permissions. | In order to use WPA-cli, a control interface must be specified for WPA-supplicant, and it must be given the rights to update the configuration. Do this by creating a minimal configuration file '/etc/wpa_supplicant.conf' with 600-permissions. |
| |
<code> | <code> |
| |
<code> | <code> |
sudo wpa_supplicant -B -i <IF> -c /etc/wpa_supplicant/wpa_supplicant.conf | sudo wpa_supplicant -B -i <IF> -c /etc/wpa_supplicant.conf |
sudo wpa_cli | sudo wpa_cli |
</code> | </code> |
==Connect to the network== | ==Connect to the network== |
<code> | <code> |
sudo wpa_supplicant -i <IF> -c /etc/wpa_supplicant/wpa_supplicant.conf & | sudo wpa_supplicant -i <IF> -c /etc/wpa_supplicant.conf & |
</code> | </code> |
connects to the network. ''iwconfig'' should then show the connection. | connects to the network. ''iwconfig'' should then show the connection. |
| |
<code> | <code> |
sudo udhcpc -b -i <IF> -x hostname <HOSTNAME> -p /var/run/udhcpc.wlan0.pid' | sudo udhcpc -b -i <IF> -x hostname <HOSTNAME> -p /var/run/udhcpc.<IF>.pid' |
</code> | </code> |
acquires a DHCP-lease. 'ifconfig' should then show the IP-address as "inet addr". | acquires a DHCP-lease. 'ifconfig' should then show the IP-address as "inet addr". |
==Persistence== | ==Persistence== |
| |
The configuration file can be made persistent by adding "/etc/wpa_supplicant/wpa_supplicant.conf" to '/opt/bootlocal.sh' and issue ''backup''. | The configuration file can be made persistent by adding "/etc/wpa_supplicant.conf" to '/opt/.filetool.lst' and issueing ''backup''. |
| |
Note that the folder '/etc/wpa_supplicant' will be mounted from the wireless extension as an overlay-filesystem, though that does not interfere with the configuration file. | Note that the folder '/etc/wpa_supplicant' will be mounted from the wireless extension as an overlay-filesystem, though that does not interfere with the configuration file. |
| |
<code> | <code> |
/sbin/wpa_supplicant -B -i <IF> -c /etc/wpa_supplicant/wpa_supplicant.conf | /sbin/wpa_supplicant -B -i <IF> -c /etc/wpa_supplicant.conf |
/bb/udhcpc -b -i <IF> -x hostname $(hostname) -p /var/run/udhcpc.wlan0.pid | /bb/udhcpc -b -i <IF> -x hostname $(hostname) -p /var/run/udhcpc.<IF>.pid |
</code> | </code> |
If Syslog is running, one may want to add the option ''-s'' for WPA-supplicant and ''-S > /dev/null 2>&1'' for UDHCP-client. | If Syslog is running, one may want to add the option ''-s'' for WPA-supplicant and ''-S > /dev/null 2>&1'' for UDHCP-client. |
| |
==== Driver of wpa_supplicant ==== | ==== Driver of wpa_supplicant ==== |
For older wireless hardware (e.g. Intel PRO/Wireless 2100), the modern driver nl80211 (user space, i.e. the one of wpa_supplicant, not the kernel driver) may need to be replaced. Try -D wext if the command should fail with an error message about the standard driver nl80211 (cf. ''wpa_supplicant –h'' or also the [[https://wiki.archlinux.org/index.php/WPA_supplicant#nl80211_driver_not_supported_on_some_hardware|respective section]] of the Archlinux-Wiki). | For older wireless hardware (e.g. Intel PRO/Wireless 2100), the modern driver nl80211 (user space, i.e. the one of wpa_supplicant, not the kernel driver) may need to be replaced. Try ''-D wext'' if the command should fail with an error message about the standard driver nl80211 (cf. ''wpa_supplicant –h'' or also the [[https://wiki.archlinux.org/index.php/WPA_supplicant#nl80211_driver_not_supported_on_some_hardware|respective section]] of the Archlinux-Wiki). |
| |
=== Persistence === | === Persistence === |
- Issue ''backup'' | - Issue ''backup'' |
From then on, 'wifi.sh' will call 'wpa_supplicant' with the desired driver. | From then on, 'wifi.sh' will call 'wpa_supplicant' with the desired driver. |
| |
| **[[http://wiki.tinycorelinux.net/dcore:welcome|> Return to the dCore Wiki Welcome page]]** |