maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Two questions / ideas about Bluetooth (Might be useful) (https://talk.maemo.org/showthread.php?t=74000)

Crogge 2011-06-14 19:09

Two questions / ideas about Bluetooth (Might be useful)
 
Dear Community,

I have two questions / ideas regarding the Bluetooth functions of the N900.

1. Idea how the N900 would start BT automatically once I leave my house:

My idea would be a small script / (cronjob?) which is starting the BT function once the WLAN connection is disconnected (out of range). That way the N900 would connect automatically to my handsfree car kit and I wouldn't have to enable it each time by hand. Anyone got an idea how to create such a script?

2. Is there a possibility to connect automatically to BT devices?

I have the problem that my N900 is connecting not always automatically to my handsfree car kit, I have to connect it by hand then which can be quite annoying while I drive. Is there any possibility to "force" aways a automatic connect once it is seeing my handsfree car kit in range?

My handsfree car kit is a Kenwood BT60 which is evening reading the phone contacts of the N900. Also "BT Audio" is working without any problems.

lardman 2011-06-14 22:33

Re: Two questions / ideas about Bluetooth (Might be useful)
 
Quote:

Originally Posted by Crogge (Post 1029158)
Dear Community,

I have two questions / ideas regarding the Bluetooth functions of the N900.

1. Idea how the N900 would start BT automatically once I leave my house:

My idea would be a small script / (cronjob?) which is starting the BT function once the WLAN connection is disconnected (out of range). That way the N900 would connect automatically to my handsfree car kit and I wouldn't have to enable it each time by hand. Anyone got an idea how to create such a script?

I'm currently writing exactly this type of app, see here: http://wiki.maemo.org/Proximus

ForeverYoung 2011-06-15 03:46

Re: Two questions / ideas about Bluetooth (Might be useful)
 
1. /etc/network/if-post-down.d/10_enable_bt:
Code:

#!/bin/sh
if [ "$ICD_CONNECTION_ID" == "GUID_OF_CONNECTION" ]; then
  phone-control --bton
fi
exit 0

/etc/network/if-up.d/10_disable_bt:
Code:

#!/bin/sh
if [ "$ICD_CONNECTION_ID" == "GUID_OF_CONNECTION" ]; then
  phone-control --btoff
fi
exit 0

GUID you can see in output of
Code:

gconftool-2 -R /system/osso/connectivity/IAP


All times are GMT. The time now is 01:43.

vBulletin® Version 3.8.8