View Single Post
5spdvl's Avatar
Posts: 220 | Thanked: 66 times | Joined on Aug 2010 @ Melbourne, Australia
#397
Ah! I had "AutoSink" in there (I know you can put any service in that string, but I wasn't sure what the available options are, or which one I needed).

Code:
~ $ sh /home/user/MyDocs/headphones3.sh
Error org.bluez.Error.Failed: Failed to create a stream
Same again, but this time with BT already on:

Code:
~ $ sh /home/user/MyDocs/headphones3.sh
Error org.bluez.Error.Failed: Stream setup failed
Same again, but this time with BT already on, and headphones awaiting pairing:

Code:
~ $ sh /home/user/MyDocs/headphones3.sh
method return sender=:1.32 -> dest=:1.639 reply_serial=2
Success! Connects as per normal, streams audio under AD2P profile. Only issue is now having to turn BT on first. Again, thanks for you help nicolai!

In DCEW, using

Code:
sh /home/user/MyDocs/headphones3.sh
successfully pairs with the headphones when both the N900/BH-503 are awaiting connection.

Any ideas on having the script also turn BT on (N900) before it attempts connection?

I write a script with the content

Code:
dbus-send --system --type=method_call --dest=org.bluez /org/bluez/906/hci0 org.bluez.Adaptor.SetProperty string:Powered variant:boolean:true
and tried it via xterm

Code:
sh /home/user/MyDocs/Bton.sh
which executes fine, but doesn't turn BT on or leave any comments in xterm.

Last edited by 5spdvl; 2011-10-27 at 10:33.