From: balaji palaniswami <balaji_palaniswami@yahoo.com>
To: linux-bluetooth@vger.kernel.org
Subject: Help me to test top of tree bluetooth subsystem
Date: Tue, 12 May 2009 17:44:30 +0530 (IST) [thread overview]
Message-ID: <671907.21026.qm@web95401.mail.in2.yahoo.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1075 bytes --]
Hi All ,
I have upgraded the ubuntu 8.04 kernel to 2.6.30-rc5 and bluez 4.39. I did pairing with Jabra headset using below pyhton script. I got below error message. This issue is related with ubuntu application dbus. so please advise me which distribution , setup procedure would be suitable to test top tree of bluetooth subsystem.
Thanks,
Balaji.P
Traceback (most recent call last):
File "./bthstereoheadset.py", line 25, in <module>
path = audio.CreateDevice(headsetAddress)
File "/var/lib/python-support/python2.5/dbus/proxies.py", line 68, in __call__
return self._proxy_method(*args, **keywords)
File "/var/lib/python-support/python2.5/dbus/proxies.py", line 140, in __call__
**keywords)
File "/var/lib/python-support/python2.5/dbus/connection.py", line 607, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.bluez.Error.ConnectionAttemptFailed: Host is down
Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo! Edition http://downloads.yahoo.com/in/firefox/?fr=om_email_firefox
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: bthstereoheadset.py --]
[-- Type: text/x-python; name="bthstereoheadset.py", Size: 1434 bytes --]
#!/usr/bin/python
import dbus
import os
import sys
def printusage():
print 'bthstereoheadset.py <options>'
print ' create - create a stereo headset'
print ' start - connect sink'
print ' stop - disconnect sink'
return
headsetAddress = os.getenv("BTSTEREO_HEADSET")
print 'BT Stereo Headset Is : => %s' % headsetAddress
bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'), 'org.bluez.Manager')
bus_id = manager.ActivateService('audio')
audio = dbus.Interface(bus.get_object(bus_id, '/org/bluez/audio'), 'org.bluez.audio.Manager')
if len(sys.argv) == 1 :
printusage()
elif len(sys.argv) > 1 and sys.argv[1] == 'create' :
path = audio.CreateDevice(headsetAddress)
audio.ChangeDefaultDevice(path)
sink = dbus.Interface (bus.get_object(bus_id, path), 'org.bluez.audio.Sink')
sink.Connect()
print 'Stereo Headset Connect Done'
elif len(sys.argv) > 1 and sys.argv[1] == 'start' :
path = audio.DefaultDevice()
sink = dbus.Interface (bus.get_object(bus_id, path), 'org.bluez.audio.Sink')
if not sink.IsConnected() :
sink.Connect()
print 'Audio connected'
elif len(sys.argv) > 1 and sys.argv[1] == 'stop' :
path = audio.DefaultDevice()
sink = dbus.Interface (bus.get_object(bus_id, path), 'org.bluez.audio.Sink')
try :
sink.Disconnect()
except dbus.exceptions.DBusException:
print 'Disconnect Failed'
print 'Stereo headset disconnect complete'
next reply other threads:[~2009-05-12 12:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-12 12:14 balaji palaniswami [this message]
2009-05-12 14:24 ` Help me to test top of tree bluetooth subsystem Vinicius Gomes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=671907.21026.qm@web95401.mail.in2.yahoo.com \
--to=balaji_palaniswami@yahoo.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox