https://www.raspberrypi.org/forums/view ... 3#p1578898
Where I am now you have to login to Wifi via a web page.
So I could try to figure out how to automate the Wifi login and send an email.
I thought what to do in case there is no internet access, and how to signal the IP-address without help.
The ACT activity LED is too busy, so I chose the PWR led (sorry PiZero).
The script can be executed at boot as described in above posting:
Code: Select all
$ cat signal_ip_pwr
#!/bin/bash
ini() { echo gpio | sudo tee /sys/class/leds/led1/trigger
}
exi() { echo input | sudo tee /sys/class/leds/led1/trigger
}
d() { echo $1 | sudo tee /sys/class/leds/led1/brightness
}
p() { sleep 1
}
s() { sleep 0.4
}
b() { d 1; sleep 0.$(($1?8:1)); d 0; s;
}
ini; d 0; p; d 1; p; d 0; p;
#b 0; b 0; b 0; b 1; b 1; b 1; b 0; b 0; b 0; p; exi
#exit
for d in `ifconfig | grep broadcast | cut -f2 -dt | cut -f2 -d\ | sed "s/\./ /g"`
do
for((p=128; p>0; p/=2))
do
b $((($d & $p) != 0))
done
done
p; exi
$
Finally it waits with PWR led off a second, and then switches back to normal PWR led operation.
I was not able to make notes of the bits while seeing on paper.
But I took a smartphone video, and watching that video allows to stop and take notes ...

IP-address signalled in the video is 172.27.1.22
(1010 1100 0001 1011 0000 0001 0001 0110);
https://www.youtube.com/watch?v=m4pM8KD ... e=youtu.be
P.S:
The script is kind of followup of script from "flag_semaphore att rest R A S P B E R R Y read" thread using servos for signalling:
https://www.raspberrypi.org/forums/view ... ?p=1550959