Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dcore:wireless_set-up [2015/05/19 14:53] – [Graphical desktop] +_[Trouble-shooting] sm8psdcore:wireless_set-up [2017/09/18 16:19] (current) – [Configure wireless network] sm8ps
Line 1: Line 1:
-======Setting up Wireless======+====== dCore Wireless======
  
 A network connection is necessary for down-loading extensions from within dCore. If the computer only has wireless connection then one must set that up from the command line as first thing. Once one has a functional graphical desktop the tools are more comfortable to use. A network connection is necessary for down-loading extensions from within dCore. If the computer only has wireless connection then one must set that up from the command line as first thing. Once one has a functional graphical desktop the tools are more comfortable to use.
Line 8: Line 8:
 ====Assumptions==== ====Assumptions====
  
-We assume a basic dCore installation, notably with already set-up tce-directory 'tce/' (cf. sample [[dcore:welcome#installations|installations]]).+We assume a basic dCore installation, notably with already set-up tce-directory 'tce/' (cf. sample [[dcore:installations|installations]]).
  
 ====Import extensions==== ====Import extensions====
Line 16: Line 16:
 Setting up dCore on a computer without Ethernet connection, wireless extensions must be "side-loaded" into the tce-directory, that is the down-load must be performed from another installation. Setting up dCore on a computer without Ethernet connection, wireless extensions must be "side-loaded" into the tce-directory, that is the down-load must be performed from another installation.
  
-Down-load all the 'wireless*' files from the 'sce/'-folder at the [[http://tinycorelinux.net/dCore/x86/release/ub-dCore-trusty/sce/|download repository]] into 'tce/sce'. If you need [[http://en.wikipedia.org/wiki/NDISwrapper|NDISwrapper]] for using Windows-drivers then also down-load those files.+Down-load all the 'wireless*' files from the 'sce/'-folder at the [[http://tinycorelinux.net/dCore/x86/release/dCore-trusty/sce/|download repository]] into 'tce/sce'. If you need [[http://en.wikipedia.org/wiki/NDISwrapper|NDISwrapper]] for using Windows-drivers then also down-load those files.
  
 //wireless-<KERNEL>-tinycore.sce// consists of drivers for wireless radios whereas //wireless// consists of the necessary utilities like 'iwconfig' etc. //wireless-<KERNEL>-tinycore.sce// consists of drivers for wireless radios whereas //wireless// consists of the necessary utilities like 'iwconfig' etc.
Line 23: Line 23:
 ==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//.
  
  
Line 33: Line 33:
 ====Configure wireless network==== ====Configure wireless network====
  
-<IF> stands for the wireless interface name (e.g. "wlan0"); it can be determined by issueing ''iwconfig''. The recommended way to go about establishing a wireless network connection is by using 'wifi.sh'; only more complex situations should necessitate the manual calling of 'wpa_supplicant'.+Let <IF> denote the wireless interface name (e.g. "wlan0"); it can be determined by issueing ''iwconfig''. The recommended way to go about establishing a wireless network connection is by using 'wifi.sh'; only more complex situations should necessitate the manual calling of 'wpa_supplicant'.
  
 === Using 'wifi.sh' === === Using 'wifi.sh' ===
Line 58: Line 58:
  
   *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={
Line 65: Line 65:
 } }
 </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==
  
 +Alternatively, the key file may be generated by use of the configuration tool 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>
Line 79: Line 82:
  
 <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>
Line 95: Line 98:
 set_network 0 psk "<YOUR_PASSWORD>" set_network 0 psk "<YOUR_PASSWORD>"
 </code> </code>
 +NB: the hyphens around the strings are mandatory!
 +
 Connect to the network and save the configuration Connect to the network and save the configuration
  
Line 110: Line 115:
 ==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 (possibly a driver has to be specified; try ''-D wext'' if the command should fail with an error message about the standard driver nl80211;  cf. ''wpa_supplicant --help''). ''iwconfig'' will 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' will then show the IP-address as "inet addr"+acquires a DHCP-lease. 'ifconfig' should then show the IP-address as "inet addr"
  
 Pinging any IP-address should work now.  Pinging any IP-address should work now. 
Line 124: Line 129:
 ==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.
Line 135: Line 140:
  
 <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.
Line 149: Line 154:
 A useful first step for localizing the cause of trouble is the manual configuration as outlined above. ''wpa_supplicant'' prints out debug-messages with the ''-d'' option (or even ''-dd''). A useful first step for localizing the cause of trouble is the manual configuration as outlined above. ''wpa_supplicant'' prints out debug-messages with the ''-d'' option (or even ''-dd'').
  
-For older wireless hardware (e.g. Intel PRO/Wireless 2100), the modern (user space) driver nl80211maybe needs 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).+==== 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). 
 + 
 +=== Persistence === 
 +Unfortunately, there is no way to specify the  driver in 'wpa_supplicant.conf'. Thus one has to either manually call 'wpa_supplicant' with the ''-D wext'' option; or one may patch the file 'wifi.sh'. For the latter, follow these steps: 
 +  - Load the ''wireless'' extension 
 +  - Copy the file '/tmp/tcloop/wireless/usr/local/bin/wifi.sh' aside 
 +  - Re-boot 
 +  - Do //not// load the ''wireless'' extension yet! 
 +  - Move 'wifi.sh' to '/usr/local/bin/'
 +  - Add the option ''-D wext'' to line 113 containing the call to 'wpa_supplicant' 
 +  - Add "usr/local/bin/wifi.sh" to '/opt/.filetool.lst' 
 +  - Issue ''backup'' 
 +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]]**
Print/export
QR Code
QR Code dcore:wireless_set-up (generated for current page)