it is possible, to make external script executing, only if another device from DB is away(or not).
for example: run script "run-in" from folder "device1" if device2 is away
or maybe execute command from "device1/run-in" script if device2 is away.
Printable View
it is possible, to make external script executing, only if another device from DB is away(or not).
for example: run script "run-in" from folder "device1" if device2 is away
or maybe execute command from "device1/run-in" script if device2 is away.
I'm sorry for my late response - I didn't get mail notification of new post for some reason.
Unfortunately it is not possible natively, but you can put sqlite query to `status` table and check for status of any other device.
You may get inspiration from this function:
----------------------
# get state of device from DB (print it on stdout)
# $1 = device name
get_state () {
sqlite3 "$dbname" << /EOF/
SELECT status FROM status WHERE name = "$1" AND status IS NOT NULL;
/EOF/
}
-----------------------
and then, for example, execute this in run-in
if [ "$(get_state OtherDeviceName)" == "OUT" ] ; then
.........
fi
I hope this will help you.
Paul
Could someone here explain how to load the kernel modules required for the bluetooth stick to work, and how to install bluez?
Here I've tried to share my internet connection to my phone using bluetooth, but I can't even get the bluetooth stick to work. So what should I do to get bluetooth working on my WL-500gP?
I'm using bluez2-libs and bluez2-utils packages (older version than bluez-* ones) and these modules:
-rwxr-xr-x 1 root root 58788 Jun 21 2009 bluez.o
-rwxr-xr-x 1 root root 17268 Jun 21 2009 bnep.o
-rwxr-xr-x 1 root root 4420 Jun 21 2009 crc32.o
-rwxr-xr-x 1 root root 15924 Jun 21 2009 hci_usb.o
-rwxr-xr-x 1 root root 30600 Jun 21 2009 l2cap.o
-rwxr-xr-x 1 root root 50592 Jun 21 2009 rfcomm.o
-rwxr-xr-x 1 root root 18612 Jun 21 2009 sco.o
I found the modules somewhere on this forum, but I can't locate it now. You could try files from the attachment if you were unable to get the correct version of modules.
Paul