Back to Main :)

''''''''''''''''''''''''''''''''''''''''*******************
#make wifi work with eduroam
''''''''''''''''''''''''''''''''''''''''*******************
sudo su
ifdown wlan0
ifdown eth0

killall wpa_supplicant

nano /etc/network/interfaces

add- > text
source-directory /etc/network/interfaces.d
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface wlan0 inet dhcp

nano /etc/wpa_supplicant/wpa_supplicant.conf

enter text ->

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=AT

network={
ssid="eduroam"
eap=PEAP
key_mgmt=WPA-EAP
phase2="auth=MSCHAPV2"
identity="*****************"
password="*****************"
}


wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
ifup wlan0

#_____________
#generate key
#________________________

ssh-keygen
#copy key to stationary- pi
ssh-copy-id -i /home/odroid/.ssh/id_rsa.pub pi@141.*.*.*
#__________________________/div>___

crontab -e

@reboot sleep 60 && /home/odroid/cp_ip.sh
@reboot sleep 60 && /home/odroid/copy_slides.sh
@reboot /home/odroid/slideshow.sh

*/5 * * * * /home/odroid/copy_slides.sh

#_________________


*************************************************
#!/bin/bash

slidehome='/home/odroid/Slides/'

# Check for STOP file
#if [ -f STOP ]; then #
# echo 'found a STOP file - remove it if you want to start'
# exit
#fi

# run forever except when there is a "STOP" file
while true; do

# sleep 10 # wait 20 s

if [ -f ${slidehome}/'newslides' ]; then

rm ${slidehome}/'newslides'

# stop any currently running fbi processes
# kill `ps -ef |pgrep fbi`
sudo killall -9 fbi
# start fbi again
sudo fbi -a -T 1 -t 15 -noverbose ${slidehome}/*png

# -T 1 uses terminal one. This implies that nobody else runs a
# terminal on the odroid. Otherwise maybe 2, etc.
# -t 20 leaves each slide for 20 sec
# -noverbose supresses the statusline at the bottom

fi

if [ -f 'STOP' ]; then # for emergency stop
echo 'Emergency stop' >> slides.log
exit
fi

done


scp -r pi@141.*.*.*:/home/pi/Slides /home/odroid/

ip address > ip_slides.txt
scp -r /home/odroid/ip_slides.txt pi@141.*.*.*:/home/pi/