Changes

Jump to: navigation, search

XUELK-AN-002: Running Debian distribution

4,228 bytes removed, 11:04, 2 August 2018
update wifi configuration
The procedure was tested on an SBC Lynx with ConfigID=0x0000000C (PCB revision CS214515A), starting from XUELK 1.1.3 binaries.
 
====WiFi (client mode)====
The procedure here described can be used to connect to an Access Point, using the WPA2/PSK security protocolwith network address given by the AP via DHCP. User can also follow [https://wiki.debian.org/WiFi/HowToUse#Command_Line this guide from Debian Wiki] for a generic approach.
As the WiFi driver is not statically linked to the kernel image, it is necessary to load the module first. This operation is done automatically upon boot, as the module is listed in <code>/etc/modules</code>:
</pre>
 To bring Once the WiFi module is loaded, it's time to configure the interface up: first of all we need to fix interface renaming with the following command:
<pre class="board-terminal">
root@arm:~# iw ln -s /devphy#0 Interface wlan0 ifindex 4 wdev 0x1 addr 88:33:14:5e:30:61 type managedroot@arm:~# ip link show wlan04: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000 link/ether 88:33:14:5e:30:61 brd ff:ff:ff:ff:ff:ffroot@arm:~# ip link set wlan0 up[ 276null /etc/systemd/network/99-default.076847] wlcore: firmware booted (Rev 6.3.10.0.133)[ 276.097912] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not readyroot@arm:~# ip link show wlan04: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq qlen 1000 link/ether 88:33:14:5e:30:61 brd ff:ff:ff:ff:ff:ff
</pre>
 The connection will be established with Generate the SSID named PSK from the ESSID and the clear text passphrase using <code>SSID_ZyXEL_WPA2wpa_passphrase</code>tool:
<pre class="board-terminal">
root@arm:~# iw wlan0 linkwpa_passphrase SSID_ZyXEL_WPA2Not connected.root@arm:~# iw wlan0 scan...BSS fe:f0:28:cc:03:90(on wlan0) TSF: 42646261 usec (0d, 00:00:42) freq: 2437 beacon interval: 100 TUs capability: ESS Privacy ShortPreamble ShortSlotTime (0x0431) signal: -53.00 dBm last seen: 0 ms ago SSID: SSID_ZyXEL_WPA2 Supported rates: 1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 DS Parameter set: channel 6 RSN: * Version: 1 * Group cipher: TKIP * Pairwise ciphers: TKIP * Authentication suites: PSK * Capabilities: 1-PTKSA-RC 1-GTKSA-RC (0x0000) ERP: <no flags> Extended supported rates: 24.0 36.0 48.0 54.0 WMM: * Parameter version 1 * BE: CW 15-1023, AIFSN 3 * BK: CW 15-1023, AIFSN 7 * VI: CW 7-15, AIFSN 2, TXOP 3008 usec * VO: CW 3-7, AIFSN 2, TXOP 1504 usec...</pre>  Add the reading passphrase key to the <code>wpa_supplicant</code> configuration file and make it readable by <code>root</code> only:<pre class="board-terminal">root@arm:~# wpa_passphrase SSID_ZyXEL_WPA2 >> /etc/wpa_supplicant.conffrom stdin
ZyXEL-WPA2-PSK
root@arm:~# chmod 0600 /etc/wpa_supplicant.conf
root@arm:~# cat /etc/wpa_supplicant.conf
# reading passphrase from stdin
network={
ssid="SSID_ZyXEL_WPA2"
</pre>
Edit <code>/etc/network/interfaces</code> and change the <code>wlan0</code> configuration as follows, by entering the <code>ssid</code> and <code>psk</code> generated above:
<pre class="board-terminal">
auto wlan0
iface wlan0 inet dhcp
wpa-ssid SSID_ZyXEL_WPA2
wpa-psk
ec41b79ebdf10022908aa10189b0341f095fd62eeb719a67c5c920e0cde28564
</pre>
Start User can now restart <code>wpa_supplicantsystemd</code>networking service with:
<pre class="board-terminal">
root@arm:~# wpa_supplicant -B -D wext -i wlan0 -c /etc/wpa_supplicant.confSuccessfully initialized wpa_supplicantrfkill: Cannot open RFKILL control deviceioctl[SIOCSIWENCODEEXT]: Invalid argumentioctl[SIOCSIWENCODEEXT]: Invalid argument[ 3527.234018] wlan0: authenticate with fe:f0:28:cc:03:90[ 3527.269591] wlan0: send auth to fe:f0:28:cc:03:90 (try 1/3)[ 3527.277879] wlan0: authenticated[ 3527.282841] wl12xx_driver wl12xx.0.auto wlan0: disabling HT/VHT due to WEP/TKIP use[ 3527.298407] wlan0: associate with fe:f0:28:cc:03:90 (try 1/3)[ 3527.307655] wlan0: RX AssocResp from fe:f0:28:cc:03:90 (capab=0x431 status=0 aid=1)[ 3527.326148] wlcore: Association completed.[ 3527.349780] wlan0: associated[ 3527.352824] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes readysystemctl restart networking
</pre>
 Once Now you can check the connection process completed successfullysystem configuration using standard tools (<code>route</code>, <code>ifconfig</code>, <code>iw</code> reports ). E.g. to check the WiFi link status as followsuse:
<pre class="board-terminal">
root@arm:~# iw wlan0 link
dtim period: 1
beacon int: 100
</pre>All of the above configuration are persistent at reboots and automatically started by <code>systemd</code> at boot time.
 
After assigning a (static) IP address to the <code>wlan0</code> interface, it is possible to ping the Access Point:
<pre class="board-terminal">
root@arm:~# ifconfig wlan0 192.168.11.81
root@arm:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:C2:1E:AF:E9
inet addr:192.168.0.81 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::250:c2ff:fe1e:afe9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:35226 errors:0 dropped:0 overruns:0 frame:0
TX packets:28 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3555583 (3.3 MiB) TX bytes:1906 (1.8 KiB)
 
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
 
wlan0 Link encap:Ethernet HWaddr 88:33:14:5E:30:61
inet addr:192.168.11.81 Bcast:192.168.11.255 Mask:255.255.255.0
inet6 addr: fe80::8a33:14ff:fe5e:3061/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:24970 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2448625 (2.3 MiB) TX bytes:1291 (1.2 KiB)
 
root@arm:~# ping 192.168.11.243
PING 192.168.11.243 (192.168.11.243): 56 data bytes
64 bytes from 192.168.11.243: seq=0 ttl=64 time=20.155 ms
64 bytes from 192.168.11.243: seq=1 ttl=64 time=11.253 ms
64 bytes from 192.168.11.243: seq=2 ttl=64 time=11.259 ms
64 bytes from 192.168.11.243: seq=3 ttl=64 time=3.726 ms
64 bytes from 192.168.11.243: seq=4 ttl=64 time=11.582 ms
64 bytes from 192.168.11.243: seq=5 ttl=64 time=3.138 ms
64 bytes from 192.168.11.243: seq=6 ttl=64 time=11.221 ms
64 bytes from 192.168.11.243: seq=7 ttl=64 time=11.652 ms
64 bytes from 192.168.11.243: seq=8 ttl=64 time=11.294 ms
64 bytes from 192.168.11.243: seq=9 ttl=64 time=11.268 ms
64 bytes from 192.168.11.243: seq=10 ttl=64 time=11.598 ms
64 bytes from 192.168.11.243: seq=11 ttl=64 time=11.690 ms
^C
--- 192.168.11.243 ping statistics ---
12 packets transmitted, 12 packets received, 0% packet loss
round-trip min/avg/max = 3.138/10.819/20.155 ms
</pre>
==Miscellaneous configurations==
===<code>ssh</code> server===
743
edits

Navigation menu