This is probably something stupid, but...
I want to test whether or not my phone is connected from bash. I'm finding lots of information about /dev/rfcomm0, but that's not on my system (Ubuntu 10.04). The device pairs just fine, and I can connect with gammu just fine, and I have the device address ("00:1F:5D:37:17:FB").
I just need something I can put in a bash script to say "Is this connected or not" akin to testing for a file's existence:
Code:
if [ -f /home/steven/arbitrary filename ]
then
notify-send --icon=blueman "We're connected"
fi
Is there something simple like that?
(Note: My phone's old enough that gammu's daemon doesn't work properly with it, which is why I'm hacking it this way.)
Bookmarks