A rasp app the checks network status and displays on tab1
- Install node and npm (if you don't already have it)
- npm install
npm start
ifconfig
sudo pico /etc/hostname -> smartmeter-12345678 sudo reboot (har inte lyckats starta om endast tjänsten eller nätverket)
https://linuxcommando.blogspot.se/2013/10/how-to-connect-to-wpawpa2-wifi-network.html https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
sudo ifdown wlan0 sudo ifup wlan0
ip link show wlan0
/sbin/iw wlan0 link
/sbin/iw wlan0 link | grep SSID | awk '{print $1}'
-> SSID:
if wlan0 is up
wpa_cli scan wpa_cli scan_results wpa_cli wps_pbc '70:8b:cd:e7:ac:d0'
/sbin/iw wlan0 link Connected to 70:8b:cd:e7:ac:d0 (on wlan0) SSID: ASUS-RT-N12-WAP-BUTTON freq: 2437 RX: 901 bytes (7 packets) TX: 7680 bytes (40 packets) signal: -21 dBm tx bitrate: 24.0 MBit/s
bss flags: short-slot-time
dtim period: 3
beacon int: 100
/sbin/iw wlan0 link | grep SSID | awk '{print $2}' -> ASUS-RT-N12-WAP-BUTTON
/sbin/iw wlan0 link | grep SSID | echo $? 0 (SSID finns, funkar), 1 ( funkar inte)
ping -c 1 -I wlan0 www.kth.se exitCode :0 om ok, annars 1 eller 2 eller något helt annat