Tiny Core Base > TCB Tips & Tricks
Play sound when wireless network found?
(1/1)
gwalther:
I try and connect to a wireless network...on boot...using commands in ../opt/bootlocal.sh
The last command is:
udhcpc -b -i wlan0
Is there a way to play a wav file (using aplay)... if a successful connection is made?
Jason W:
Not on TC to test it, but one of these may work. Either
udhcpc -b -i wlan0 && aplay file.wav
or the below placed after the dhcp command:
if [ "$?" -eq "0" ];then
aplay file.wav
fi
One of those would work in general use, but with detecting connectivity there may be more to it, like using iwconfig and grepping output.
gwalther:
Thanks....tried the second solution and it seems to work. I hear wav file about 12 secs after the desktop first appears....system had connected. Need to test some more, when system is not available and/or fails to connect.
Navigation
[0] Message Index
Go to full version