From: Mailing List SVR <lists@svrinformatica.it>
To: linux-bluetooth@vger.kernel.org
Subject: pc as headset: some progress but still no audio
Date: Sat, 9 Jan 2010 11:42:00 +0100 [thread overview]
Message-ID: <201001091142.00568.lists@svrinformatica.it> (raw)
[-- Attachment #1: Type: Text/Plain, Size: 869 bytes --]
Hi,
I made some progress:
1) my phone can now recognize my pc as an headset
2) I'm able to pair the two device
3) I advertise the hsp service with the attacched pybluez script
4) the phone can connect to the pc and the output of the script is:
Waiting for connection on RFCOMM 1
Accepted connection ('00:1E:96:00:07:D2', 1)
received
OK
so the connection is successfull and the phone answer ok to AT+CKPD
5) I run bluetoothd -n -d and I see some errors like this:
bluetoothd[5938]: No matching connection found for handle 1
6) with hcidump I see sco data:
> SCO data: handle 1 flags 0x00 dlen 48
and I think this sco data cause the error "No matching connection found for
handle 1"
so I think there is something wrong in the sco link estabilishment, can you
please give my some hints?
Is there a way to use a pc as an headset using bluez?
thanks
Nicola
[-- Attachment #2: testhsp.py --]
[-- Type: text/x-python, Size: 736 bytes --]
from bluetooth import *
server_sock=BluetoothSocket( RFCOMM )
server_sock.bind(("",PORT_ANY))
server_sock.listen(1)
port = server_sock.getsockname()[1]
advertise_service( server_sock, "Headset",
service_classes = [ HEADSET_CLASS,GENERIC_AUDIO_CLASS ],
profiles =[ HEADSET_PROFILE ] )
print "Waiting for connection on RFCOMM %d" %port
client_sock, client_info = server_sock.accept()
print "Accepted connection ", client_info
client_sock.send("AT+CKPD\r")
try:
while True:
data = client_sock.recv(1024)
print "received %s" % data
except IOError:
pass
print "disconnect"
client_sock.close()
server_sock.close()
next reply other threads:[~2010-01-09 10:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-09 10:42 Mailing List SVR [this message]
2010-01-11 9:51 ` pc as headset: some progress but still no audio Mailing List SVR
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=201001091142.00568.lists@svrinformatica.it \
--to=lists@svrinformatica.it \
--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;
as well as URLs for NNTP newsgroup(s).