View Single Post
5spdvl's Avatar
Posts: 220 | Thanked: 66 times | Joined on Aug 2010 @ Melbourne, Australia
#391
I have the script I want to use, but I can't seem to get it to work with DCEW:

-trying to connect to a specific BT MAC address (Nokia BH-503 headphones)

I have tried this from karimko:
Originally Posted by karimko
Try this in xterm:

Code:
rfcomm connect 0 <MAC_ADDRESS>
don't forget to have your bluetooth enabled and just replace <MAC_ADDRESS> with your car's stereo.

I have the same problem like you guys, except with a Kenwood

[EDIT]: You can use Desktop Command Execution widget with this command to have a shortcut on ur desktop
(http://talk.maemo.org/showpost.php?p=746631&postcount=4)

However, this only works once BT is on, and doesn't "genuinely connect" (status bar BT icon turns blue, but device does not respond/receive commands).

I have tried this:
Code:
adapter=$(dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.DefaultAdapter | awk -F'"' '/at/ {print $2}')
device=$(dbus-send --system --print-reply --dest=org.bluez ${adapter} org.bluez.Adapter.FindDevice string:${devmac} | awk -F'"' '/at/ {print $2}')
dbus-send --system --type=method_call --print-reply --dest=org.bluez ${device} org.bluez.${service}.Connect
...inside a script I called "headphones.sh", which I call inside DCEW via:

Code:
run-standalone.sh <directory>/headphones.sh
which does not work. My understanding of shell scripting is probably at fault - I created a notepad file in windows with the script code, saved it as headphones.sh(.txt), then transferred to my N900 and renamed it just headphones.sh.

Can anyone point me in the right direction? Nokia revised the programming for their BH-503 (board revision 3), and now I can't connect to my latest pair automatically (must access via the BT menu, despite being "trusted").