plugin: shell
name: wireless/wireless_scanning
requires:
  package.name == 'network-manager'
  device.category == 'WIRELESS'
command:
 rfkill unblock wlan wifi
 if rfkill list wlan wifi | grep -q 'Hard blocked: yes'; then
   echo "Hard block is applied to WiFi device. Please remove and retest."
   exit 1
 fi
 wireless_networks=`nmcli -f SSID dev wifi list`
 if [ `echo "$wireless_networks" | wc -l` -gt 1 ]; then
   echo "Wireless networks discovered: "
   echo "$wireless_networks"
   exit 0
 fi
 echo "No wireless networks discovered."
 exit 1
description: Wireless scanning test. It scans and reports on discovered APs.
description-ast.UTF-8: Prueba d'esploración inalámbrica. Esplora ya informa de les AP descubiertes.
description-bn.UTF-8: ওয়্যারলেস স্ক্যানিং পরীক্ষা। এটি স্ক্যান করে এবং অনুসন্ধানকৃত APs এর উপর রিপোর্ট করে।
description-bs.UTF-8: Test bežičnog skaniranja, Skanira i prijavljuje otkrivene pristupne tačke-
description-cs.UTF-8: Test prohledávání bezdrátové sítě. Prohledá a vypíše dostupné přístupové body (AP).
description-de.UTF-8: Test der Funknetzwerksuche. Es wird nach Funknetzwerken gesucht und gefundene Zugriffspunkte werden angezeigt.
description-el.utf-8: Έλεγχος ασύρματης ανίχνευσης. Διενεργεί σάρωση και επιστρέφει μία αναφορά για τα ανακαλυφθέντα AP.
description-en_AU.UTF-8: Wireless scanning test. It scans and reports on discovered APs.
description-en_GB.UTF-8: Wireless scanning test. It scans and reports on discovered APs.
description-es.UTF-8: Prueba de exploración inalámbrica. Explora e informa de las AP descubiertas.
description-fi.UTF-8: Langattomien verkkojen havaitsemistesti. Etsitään verkkoja ja raportoidaan havaitut verkot.
description-fr.UTF-8: Test de balayage du sans fils. Ce test permet de balayer et d'informer sur les points d'accès découverts.
description-he.UTF-8: בדיקת סריקת אלחוטי. התכונה תחפש ותדווח על נקודות הגישה שהתגלו.
description-hu.UTF-8: Vezeték nélküli hálózatok felderítésének tesztje. Felderíti, és jelenti az észlelt kapcsolódási pontokat.
description-it.UTF-8: Test di ricerca delle reti senza fili. Ricerca e crea un resoconto sui punti di accesso trovati.
description-km.UTF-8: សាកល្បង.
description-ms.UTF-8: Ujian pengimbasan tanpa wayar. Ia mengimbas dan laporkan AP yang ditemui.
description-nl.UTF-8: Draadloze scanner test. Het scant en doet verslag van ontdekte APs
description-pt_BR.UTF-8: Teste de varredura de redes sem fio. Detecta e relata pontos de acesso descobertos.
description-ro.UTF-8: Test de scanare pentru rețele fără fir. Scanează și afișează punctele de acces descoperite.
description-ru.UTF-8: Проверка сканирование беспроводных устройств. Выполняется проверка и создаются отчёты об обнаруженных точках доступа.
description-sl.UTF-8: Preizkus iskanja brezžičnih povezav. Išče in poroča o odkritih dostopnih točkah.
description-tr.UTF-8: Kablosuz tarama sınaması. Erişim noktalarını tarar ve bulunanlar hakkında rapor verir.
description-ug.UTF-8: سىمسىز تورنى ئىزدەش سىنىقى. بۇ سىناقتا سىمسىز زىيارەت نۇقتىلىرىنى(AP) ئىزدەپ تېپىلىدۇ ۋە تاپقانلىرىنى كۆرسىتىدۇ.
description-zh_CN.UTF-8: 无线网络扫描测试。将自动扫描和报告可用的无线网络。

plugin: manual
name: wireless/wireless_connection
command: network_check
requires: device.category == 'WIRELESS'
description:
 PURPOSE:
     This test will check your wireless connection.
 STEPS:
     1. Click on the Network icon in the panel.
     2. Select a network below the 'Wireless networks' section.
     3. Click "Test" to verify that it's possible to establish an HTTP connection.
 VERIFICATION:
     Did a notification show and was the connection correctly established?

plugin: shell
name: wireless/wireless_connection_wpa_bg
requires: device.category == 'WIRELESS'
user: root
environ: WPA_BG_SSID WPA_BG_PSK
command: trap "nmcli con delete id $WPA_BG_SSID" EXIT; create_connection $WPA_BG_SSID --security=wpa --key=$WPA_BG_PSK && internet_test --interface=`nmcli dev status | awk '/802-11-wireless/ {print $1}'`
description:
 Tests that the systems wireless hardware can connect to a router using WPA
 security and the 802.11b/g protocols.

plugin: shell
name: wireless/wireless_connection_open_bg
requires: device.category == 'WIRELESS'
user: root
environ: OPEN_BG_SSID
command: trap "nmcli con delete id $OPEN_BG_SSID" EXIT; create_connection $OPEN_BG_SSID && internet_test --interface=`nmcli dev status | awk '/802-11-wireless/ {print $1}'`
description:
 Tests that the systems wireless hardware can connect to a router using no
 security and the 802.11b/g protocols.

plugin: shell
name: wireless/wireless_connection_wpa_n
requires: device.category == 'WIRELESS'
user: root
environ: WPA_N_SSID WPA_N_PSK
command: trap "nmcli con delete id $WPA_N_SSID" EXIT; create_connection $WPA_N_SSID --security=wpa --key=$WPA_N_PSK && internet_test --interface=`nmcli dev status | awk '/802-11-wireless/ {print $1}'`
description:
 Tests that the systems wireless hardware can connect to a router using WPA
 security and the 802.11n protocol.

plugin: shell
name: wireless/wireless_connection_open_n
requires: device.category == 'WIRELESS'
user: root
environ: OPEN_N_SSID
command: trap "nmcli con delete id $OPEN_N_SSID" EXIT; create_connection $OPEN_N_SSID &&  internet_test --interface=`nmcli dev status | awk '/802-11-wireless/ {print $1}'`
description:
 Tests that the systems wireless hardware can connect to a router using no
 security and the 802.11n protocol.

plugin: shell
name: wireless/monitor_wireless_connection
requires:
 package.name == 'iperf'
 device.category == 'WIRELESS'
user: root
environ: WPA_BG_SSID WPA_BG_PSK SERVER_IPERF
command: trap "nmcli con delete id $WPA_BG_SSID" EXIT; create_connection $WPA_BG_SSID --security=wpa --key=$WPA_BG_PSK && iperf -c $SERVER_IPERF -t 300 -i 30
description:
 Tests the performance of a systems wireless connection through the iperf tool.

plugin: shell
name: wireless/monitor_wireless_connection_udp
requires:
 package.name == 'iperf'
 device.category == 'WIRELESS'
user: root
environ: WPA_BG_SSID WPA_BG_PSK SERVER_IPERF
command: trap "nmcli con delete id $WPA_BG_SSID" EXIT; create_connection $WPA_BG_SSID --security=wpa --key=$WPA_BG_PSK && iperf -c $SERVER_IPERF -t 300 -i 30 -u -b 100m -p 5050
description:
 Tests the performance of a systems wireless connection through the iperf tool, using UDP packets.
