public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-users] Headset half working using Bluez's ALSA plugin
@ 2008-01-22 11:43 Ing. Gabriele Oberhammer
  2008-01-22 16:14 ` Guillaume Bedot
  0 siblings, 1 reply; 12+ messages in thread
From: Ing. Gabriele Oberhammer @ 2008-01-22 11:43 UTC (permalink / raw)
  To: bluez-users

My problem is similar to that outlined in this post:

http://thread.gmane.org/gmane.linux.bluez.user/13352

I wish to use my new Phoenix BTK-03 (PCB300) bluetooth headset with VOIP 
applications.
Audio playback works well with mplayer (mplayer -ao 
alsa:device=bluetooth test.mp3) and aplay (aplay -D bluetooth test.wav) 
but I can't get capture working.

Test command:
$ arecord -D bluetooth -f S16_LE | aplay -D bluetooth -f S16_LE

executes without errors and:
$ arecord -D bluetooth -f S16_LE /tmp/rec_test.wav

produces always files with lenght=44 bytes (the files seems to contain 
only the wav format headers but no sound).
I'm sure the headset starts capturing because I hear a beep and some 
noise in the speaker.

I've tried with 'options hci_usb force_scofix=1' but the results are the 
same.
I've also successfully compiled bluez-utils from the yesterday cvs but I 
think I screwed up something when installing because the services in the 
'Service' tab in bluetooth applet preferences became uncheckable.

What information can I post to help solving this problem?
Can someone point me to an howto or README with best practices for 
installing from cvs?

This is my configuration:

PC:
	Dell Latitude D820

software versions:
	bluetooth		3.24-0ubuntu1
	bluez-gnome		0.14-0ubuntu2
	bluez-hcidump		1.39-1
	bluez-utils		3.24-0ubuntu1
	gnome-bluetooth		0.9.1-0ubuntu1
	libbluetooth-dev	3.24-0ubuntu1
	libbluetooth2		3.24-0ubuntu1
	python-bluez		0.9.1-1

.asoundrc:
	pcm.bluetooth {
        	 	type bluetooth
         	device 00:07:B0:0F:49:B7
	        profile voice
	}

hci0:   Type: USB
         BD Address: 00:1A:6B:11:52:5A ACL MTU: 384:8 SCO MTU: 64:8
         UP RUNNING PSCAN ISCAN
         RX bytes:6430 acl:57 sco:0 events:181 errors:0
         TX bytes:1739 acl:52 sco:0 commands:82 errors:0
         Features: 0xff 0xff 0x9f 0xfe 0x9b 0xf9 0x00 0x80
         Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
         Link policy: RSWITCH HOLD SNIFF PARK
         Link mode: SLAVE ACCEPT
         Name: 'BlueZ (0)'
         Class: 0x08210c
         Service Classes: Capturing
         Device Class: Computer, Laptop
         HCI Ver: 2.0 (0x3) HCI Rev: 0x976 LMP Ver: 2.0 (0x3)
	LMP Subver:0x976 Manufacturer: Cambridge Silicon Radio (10)

headset:
BD Address:  00:07:B0:0F:49:B7
         Device Name: PBC300
         LMP Version: 2.0 (0x3) LMP Subversion: 0xbf9
         Manufacturer: Cambridge Silicon Radio (10)
         Features: 0xfc 0xfe 0x0f 0x00 0x08 0x08 0x00 0x00
                 <encryption><slot offset><timing accuracy><roleswitch>
                 <hold mode><sniff mode><RSSI><channel quality><SCO link>
                 <HV2 packets><HV3 packets><u-law log><A-law log><CVSD>
                 <paging scheme><power control><transparent SCO>
		<AFH cap. slave><AFH cap. master>


Best regard, Gabriele

PS: The PC was shipped with Vista, but I've installed winXp and 
downgraded the firmware with the Dell utlity. Th headset works both for 
playing and capturing under winXP.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-users] Headset half working using Bluez's ALSA plugin
  2008-01-22 11:43 [Bluez-users] Headset half working using Bluez's ALSA plugin Ing. Gabriele Oberhammer
@ 2008-01-22 16:14 ` Guillaume Bedot
  2008-01-24 10:07   ` Ing. Gabriele Oberhammer
  0 siblings, 1 reply; 12+ messages in thread
From: Guillaume Bedot @ 2008-01-22 16:14 UTC (permalink / raw)
  To: BlueZ users

Hello,

On mar, 2008-01-22 at 12:43 +0100, Ing. Gabriele Oberhammer wrote:
> What information can I post to help solving this problem?
> Can someone point me to an howto or README with best practices for 
> installing from cvs?

I guess you need the cvs version indeed.
Try in the utils directory:
$ ./configure --help
to see all options available.

( --enable-audio or --enable-all may be ok)

You would need of lot of headers installed too (packages usually named
libsomething-dev  or -devel).

Then the services should be installed...

Regards,

Guillaume B.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-users] Headset half working using Bluez's ALSA plugin
  2008-01-22 16:14 ` Guillaume Bedot
@ 2008-01-24 10:07   ` Ing. Gabriele Oberhammer
  2008-01-24 15:17     ` Brad Midgley
  2008-01-27 11:04     ` jayjwa
  0 siblings, 2 replies; 12+ messages in thread
From: Ing. Gabriele Oberhammer @ 2008-01-24 10:07 UTC (permalink / raw)
  To: BlueZ users

Hi, I've successful compiled and installed 'utils' and 'libs' from today 
cvs but now its worse then before, now playback doesn't work too :-(
Now In the preferences menu in gnome-applet there are no services 
listed, but my headset pairs correctly.
Here's what I've done, please tell ma what's wrong:

1. checked out latest 'utils' and 'libs' directoryes from cvs
2. installed all needed development headers
3. Compiled:
	$ cd utils/
	$ sudo ./bootstrap
	$ sudo ./configure --enable-all --prefix=/usr/local/
	$ sudo make

	$ cd ../libs/
	$ sudo ./bootstrap
	$ sudo ./configure --prefix=/usr/local/
	$ sudo make

4. uninstalled bluez-utils:
	$ sudo apt-get remove bluez-utils

5. uninstalled libbluetooth2 (forcing needed to solve dependencies):
	$ sudo dpkg --force-all -r libbluetoot2

6. Installed libs and utils:
	$ cd libs; sudo make install
	$ cd utils; sudo make install

7. Edited '/etc/init.d/bluetooth' and modified all paths to pont to 
correct locations under /usr/local/{bin,sbin}

8. rebooted (I know it's not needed but I did it)

9. Now headset pairs, 'hcitool dev' correctly shows it but
	$ mplayer -ao alsa:device=bluetooth test.mp3
	
	gives:

	....
	[AO_ALSA] alsa-lib: pcm.c:2105:(snd_pcm_open_conf) Cannot open shared 
library /usr/lib/alsa-lib/libasound_module_pcm_bluetooth.so
	[AO_ALSA] Playback open error: No such file or directory
	....


10. sadness  ;(


Can someone help me or give me some link to documentation about correct 
procedures for cvs building?


Tnx  :-)


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-users] Headset half working using Bluez's ALSA plugin
@ 2008-01-24 13:42 pramod gurav
  2008-01-24 13:54 ` Ing. Gabriele Oberhammer
  0 siblings, 1 reply; 12+ messages in thread
From: pramod gurav @ 2008-01-24 13:42 UTC (permalink / raw)
  To: BlueZ users


[-- Attachment #1.1: Type: text/plain, Size: 2882 bytes --]

hi gabriele,
i have not worked much on BlueZ and alsa but i can see from your information that you have not configured your kernel to support alsa. have a kernel built with alsa configured.
bcoz i checked the file /usr/lib/alsa-lib/libasound_module_pcm_bluetooth.so which u are missing
but my kernel has as i hv alsa support. also i confirmed this by checking into another system which dont hv alsa configured in it. 
Try and c.
best luck....bye

Pramod

----- Original Message ----
From: Ing. Gabriele Oberhammer <gabriele@naustech.com>
To: BlueZ users <bluez-users@lists.sourceforge.net>
Sent: Thursday, 24 January, 2008 3:37:16 PM
Subject: Re: [Bluez-users] Headset half working using Bluez's ALSA plugin

Hi, I've successful compiled and installed 'utils' and 'libs' from
 today 
cvs but now its worse then before, now playback doesn't work too :-(
Now In the preferences menu in gnome-applet there are no services 
listed, but my headset pairs correctly.
Here's what I've done, please tell ma what's wrong:

1. checked out latest 'utils' and 'libs' directoryes from cvs
2. installed all needed development headers
3. Compiled:
    $ cd utils/
    $ sudo ./bootstrap
    $ sudo ./configure --enable-all --prefix=/usr/local/
    $ sudo make

    $ cd ../libs/
    $ sudo ./bootstrap
    $ sudo ./configure --prefix=/usr/local/
    $ sudo make

4. uninstalled bluez-utils:
    $ sudo apt-get remove bluez-utils

5. uninstalled libbluetooth2 (forcing needed to solve dependencies):
    $ sudo dpkg --force-all -r libbluetoot2

6. Installed libs and utils:
    $ cd libs; sudo make install
    $ cd utils; sudo make install

7. Edited '/etc/init.d/bluetooth' and modified all paths to pont to 
correct locations under /usr/local/{bin,sbin}

8. rebooted (I know it's not needed but I did it)

9. Now headset pairs, 'hcitool dev' correctly shows it but
    $ mplayer -ao alsa:device=bluetooth test.mp3
    
    gives:

    ....
    [AO_ALSA] alsa-lib: pcm.c:2105:(snd_pcm_open_conf) Cannot open
 shared 
library /usr/lib/alsa-lib/libasound_module_pcm_bluetooth.so
    [AO_ALSA] Playback open error: No such file or directory
    ....


10. sadness  ;(


Can someone help me or give me some link to documentation about correct
 
procedures for cvs building?


Tnx  :-)


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users






      Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/

[-- Attachment #1.2: Type: text/html, Size: 4082 bytes --]

[-- Attachment #2: Type: text/plain, Size: 228 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-users] Headset half working using Bluez's ALSA plugin
  2008-01-24 13:42 pramod gurav
@ 2008-01-24 13:54 ` Ing. Gabriele Oberhammer
  0 siblings, 0 replies; 12+ messages in thread
From: Ing. Gabriele Oberhammer @ 2008-01-24 13:54 UTC (permalink / raw)
  To: BlueZ users

tnx for your response, but I've a standard Ubuntu kernel and alsa i 
correcty configured.
Running dpkg -S libasound_module_pcm_bluetooth.la I found that this 
module is shipped with the package bluez-utils.
If I install the package bluez-utils form standard repositories almost 
everything of bluetooth works flawlessly. The problem is that capture 
from my headset does not work (i.e. only playback works).
Several posts confirm that this is a common problem which the latest cvs 
is supposed to solve.
I've correctly compiled and installed latest blues-utils form cvs, but I 
guess the library libasound_module_pcm_bluetooth.la is not correctly 
build/installed  :-(

I guess I must wait until the cvs becomes stable.

Tnx, bye

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-users] Headset half working using Bluez's ALSA plugin
  2008-01-24 10:07   ` Ing. Gabriele Oberhammer
@ 2008-01-24 15:17     ` Brad Midgley
  2008-01-24 22:30       ` Ing. Gabriele Oberhammer
  2008-01-27 11:04     ` jayjwa
  1 sibling, 1 reply; 12+ messages in thread
From: Brad Midgley @ 2008-01-24 15:17 UTC (permalink / raw)
  To: BlueZ users

Gabriele

>         $ sudo ./configure --prefix=/usr/local/

there are hacks so alsa plugins will work from /usr/local. it's easier
to just use /usr.

-- 
Brad

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-users] Headset half working using Bluez's ALSA plugin
  2008-01-24 15:17     ` Brad Midgley
@ 2008-01-24 22:30       ` Ing. Gabriele Oberhammer
  2008-01-24 23:20         ` Brad Midgley
  0 siblings, 1 reply; 12+ messages in thread
From: Ing. Gabriele Oberhammer @ 2008-01-24 22:30 UTC (permalink / raw)
  To: BlueZ users

Ok, I eventually managed to compile and install bluez-utils!
The problem was that the audio module was not built, even if I used 
--enable-all switch in configure. To have the audio module built I had 
to add --enable-audio  (so it seems that --enable-all does not.... 
enable all  ;-)
Note that to have network/serial/input services built you have to add 
--enable-{network,serial,input} too.

Here's the correct configure  line:

sudo ./configure --prefix=/usr --mandir=/usr/share/man \ 
--sysconfdir=/etc  --localstatedir=/var --libexecdir=/lib \
--enable-all --enable-audio

Unfortunately I'm stuck with the same situation of the first post, i.e. 
playback works well but capture is not working.


$ arecord -D bluetooth -f S16_LE  /tmp/test.wav

produces always files 44 bytes long without any audio  ;(

So, before giving up, is there in the list someone with a fully working 
bluetooth headset who could give me some hints?

Thanks in advance,
bye.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-users] Headset half working using Bluez's ALSA plugin
  2008-01-24 22:30       ` Ing. Gabriele Oberhammer
@ 2008-01-24 23:20         ` Brad Midgley
  2008-01-25  8:33           ` Ing. Gabriele Oberhammer
  2008-01-25  9:01           ` Ing. Gabriele Oberhammer
  0 siblings, 2 replies; 12+ messages in thread
From: Brad Midgley @ 2008-01-24 23:20 UTC (permalink / raw)
  To: BlueZ users

Hi

> So, before giving up, is there in the list someone with a fully working
> bluetooth headset who could give me some hints?

iirc, there was a patch for recording that was committed to cvs after
3.24 was released. Did you already try the latest?

-- 
Brad

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-users] Headset half working using Bluez's ALSA plugin
  2008-01-24 23:20         ` Brad Midgley
@ 2008-01-25  8:33           ` Ing. Gabriele Oberhammer
  2008-01-25  9:01           ` Ing. Gabriele Oberhammer
  1 sibling, 0 replies; 12+ messages in thread
From: Ing. Gabriele Oberhammer @ 2008-01-25  8:33 UTC (permalink / raw)
  To: BlueZ users


Brad Midgley wrote:

> iirc, there was a patch for recording that was committed to cvs after
> 3.24 was released. Did you already try the latest?
> 
Hi,

Yes, I was aware about that patch. I red about it in your message to 
Chip McArtor on 9gen2008 and that it solved Chip problem.

I built blue-utils form 23gen2008 CVS, but did not solve the problem for me.
Could it be related to my bluetooth CSR adapter Class?
I saw that Chip adapter is recognized as 'Class: 0x080100' but my is 
'Class: 0x08210c'

Can I use hcidump to get some useful debug informations?

Thanks for your time :-)

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-users] Headset half working using Bluez's ALSA plugin
  2008-01-24 23:20         ` Brad Midgley
  2008-01-25  8:33           ` Ing. Gabriele Oberhammer
@ 2008-01-25  9:01           ` Ing. Gabriele Oberhammer
  1 sibling, 0 replies; 12+ messages in thread
From: Ing. Gabriele Oberhammer @ 2008-01-25  9:01 UTC (permalink / raw)
  To: BlueZ users

hcidump of '$ arecord -D bluetooth -f S16_LE /tmp/test.wav'  :


HCI sniffer - Bluetooth packet analyzer ver 1.39
device: hci0 snap_len: 1028 filter: 0xffffffff
< HCI Command: Create Connection (0x01|0x0005) plen 13
 > HCI Event: Command Status (0x0f) plen 4
 > HCI Event: Connect Complete (0x03) plen 11
< ACL data: handle 46 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 1 scid 0x0040
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
 > HCI Event: Command Status (0x0f) plen 4
< HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4
 > ACL data: handle 46 flags 0x02 dlen 16
     L2CAP(s): Connect rsp: dcid 0x004b scid 0x0040 result 1 status 2
       Connection pending - Authorization pending
 > ACL data: handle 46 flags 0x02 dlen 16
     L2CAP(s): Connect rsp: dcid 0x004b scid 0x0040 result 0 status 0
       Connection successful
< ACL data: handle 46 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x004b flags 0x00 clen 0
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Command Complete (0x0e) plen 6
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
 > HCI Event: Command Status (0x0f) plen 4
 > ACL data: handle 46 flags 0x02 dlen 14
     L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
       Success
 > HCI Event: Read Remote Supported Features (0x0b) plen 11
 > ACL data: handle 46 flags 0x02 dlen 16
     L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
       MTU 48
< ACL data: handle 46 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x004b flags 0x00 result 0 clen 4
       Success
       MTU 48
< ACL data: handle 46 flags 0x02 dlen 17
     L2CAP(d): cid 0x004b len 13 [psm 1]
         SDP SS Req: tid 0x0 len 0x8
           pat uuid-16 0x1108 (Headset)
           max 64
           cont 00
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 46 flags 0x02 dlen 18
     L2CAP(d): cid 0x0040 len 14 [psm 1]
         SDP SS Rsp: tid 0x0 len 0x9
           count 1
           handle 0x10005
           cont 00
< ACL data: handle 46 flags 0x02 dlen 23
     L2CAP(d): cid 0x004b len 19 [psm 1]
         SDP SA Req: tid 0x1 len 0xe
           handle 0x10005
           max 65535
           aid(s) 0x0000 - 0xffff
           cont 00
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Remote Name Req Complete (0x07) plen 255
 > ACL data: handle 46 flags 0x02 dlen 27
 > ACL data: handle 46 flags 0x01 dlen 25
     L2CAP(d): cid 0x0040 len 48 [psm 1]
         SDP SA Rsp: tid 0x1 len 0x2b
           count 38
           cont 02 00 2D
< ACL data: handle 46 flags 0x02 dlen 25
     L2CAP(d): cid 0x004b len 21 [psm 1]
         SDP SA Req: tid 0x2 len 0x10
           handle 0x10005
           max 65535
           aid(s) 0x0000 - 0xffff
           cont 02 00 2D
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 46 flags 0x02 dlen 27
 > ACL data: handle 46 flags 0x01 dlen 25
     L2CAP(d): cid 0x0040 len 48 [psm 1]
         SDP SA Rsp: tid 0x2 len 0x2b
           count 38
           cont 02 00 07
< ACL data: handle 46 flags 0x02 dlen 25
     L2CAP(d): cid 0x004b len 21 [psm 1]
         SDP SA Req: tid 0x3 len 0x10
           handle 0x10005
           max 65535
           aid(s) 0x0000 - 0xffff
           cont 02 00 07
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 46 flags 0x02 dlen 19
     L2CAP(d): cid 0x0040 len 15 [psm 1]
         SDP SA Rsp: tid 0x3 len 0xa
           count 7
           aid 0x0000 (SrvRecHndl)
              uint 0x10005
           aid 0x0001 (SrvClassIDList)
              < uuid-16 0x1108 (Headset) uuid-16 0x1203 (Audio) >
           aid 0x0004 (ProtocolDescList)
              < < uuid-16 0x0100 (L2CAP) > <
              uuid-16 0x0003 (RFCOMM) uint 0x2 > >
           aid 0x0006 (LangBaseAttrIDList)
              < uint 0x656e uint 0x6a uint 0x100 >
           aid 0x0009 (BTProfileDescList)
              < < uuid-16 0x1108 (Headset) uint 0x100 > >
           aid 0x0100 (SrvName)
              str "Headset"
           aid 0x0302 (unknown)
              bool 0x1
           cont 00
< ACL data: handle 46 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 3 scid 0x0041
< ACL data: handle 46 flags 0x02 dlen 12
     L2CAP(s): Disconn req: dcid 0x004b scid 0x0040
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 46 flags 0x02 dlen 16
     L2CAP(s): Connect rsp: dcid 0x004c scid 0x0041 result 1 status 2
       Connection pending - Authorization pending
 > ACL data: handle 46 flags 0x02 dlen 12
     L2CAP(s): Disconn rsp: dcid 0x004b scid 0x0040
 > HCI Event: Link Key Request (0x17) plen 6
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
 > HCI Event: Command Complete (0x0e) plen 10
 > ACL data: handle 46 flags 0x02 dlen 16
     L2CAP(s): Connect rsp: dcid 0x004c scid 0x0041 result 0 status 0
       Connection successful
< ACL data: handle 46 flags 0x02 dlen 16
     L2CAP(s): Config req: dcid 0x004c flags 0x00 clen 4
       MTU 1013
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 46 flags 0x02 dlen 14
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 0
       Success
 > ACL data: handle 46 flags 0x02 dlen 16
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 4
       MTU 1013
< ACL data: handle 46 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x004c flags 0x00 result 0 clen 4
       Success
       MTU 1013
< ACL data: handle 46 flags 0x02 dlen 8
     L2CAP(d): cid 0x004c len 4 [psm 3]
       RFCOMM(s): SABM: cr 1 dlci 0 pf 1 ilen 0 fcs 0x1c
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 46 flags 0x02 dlen 8
     L2CAP(d): cid 0x0041 len 4 [psm 3]
       RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7
< ACL data: handle 46 flags 0x02 dlen 18
     L2CAP(d): cid 0x004c len 14 [psm 3]
       RFCOMM(s): PN CMD: cr 1 dlci 0 pf 0 ilen 10 fcs 0x70 mcc_len 8
       dlci 4 frame_type 0 credit_flow 15 pri 7 ack_timer 0
       frame_size 1008 max_retrans 0 credits 7
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 46 flags 0x02 dlen 18
     L2CAP(d): cid 0x0041 len 14 [psm 3]
       RFCOMM(s): PN RSP: cr 0 dlci 0 pf 0 ilen 10 fcs 0xaa mcc_len 8
       dlci 4 frame_type 0 credit_flow 14 pri 7 ack_timer 0
       frame_size 127 max_retrans 0 credits 0
< ACL data: handle 46 flags 0x02 dlen 8
     L2CAP(d): cid 0x004c len 4 [psm 3]
       RFCOMM(s): SABM: cr 1 dlci 4 pf 1 ilen 0 fcs 0x96
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 46 flags 0x02 dlen 8
     L2CAP(d): cid 0x0041 len 4 [psm 3]
       RFCOMM(s): UA: cr 1 dlci 4 pf 1 ilen 0 fcs 0x5d
< ACL data: handle 46 flags 0x02 dlen 12
     L2CAP(d): cid 0x004c len 8 [psm 3]
       RFCOMM(s): MSC CMD: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
       dlci 4 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 0 b2 0 b3 0 len 0
< HCI Command: Add SCO Connection (0x01|0x0007) plen 4
 > ACL data: handle 46 flags 0x02 dlen 12
     L2CAP(d): cid 0x0041 len 8 [psm 3]
       RFCOMM(s): MSC CMD: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
       dlci 4 fc 0 rtc 1 rtr 1 ic 0 dv 0 b1 0 b2 0 b3 0 len 0
< ACL data: handle 46 flags 0x02 dlen 12
     L2CAP(d): cid 0x004c len 8 [psm 3]
       RFCOMM(s): MSC RSP: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
       dlci 4 fc 0 rtc 1 rtr 1 ic 0 dv 0 b1 0 b2 0 b3 0 len 0
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Command Status (0x0f) plen 4
 > ACL data: handle 46 flags 0x02 dlen 12
     L2CAP(d): cid 0x0041 len 8 [psm 3]
       RFCOMM(s): MSC RSP: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
       dlci 4 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 0 b2 0 b3 0 len 0
< ACL data: handle 46 flags 0x02 dlen 9
     L2CAP(d): cid 0x004c len 5 [psm 3]
       RFCOMM(d): UIH: cr 1 dlci 4 pf 1 ilen 0 fcs 0x79 credits 33
 > ACL data: handle 46 flags 0x02 dlen 9
     L2CAP(d): cid 0x0041 len 5 [psm 3]
       RFCOMM(d): UIH: cr 0 dlci 4 pf 1 ilen 0 fcs 0xa3 credits 15
 > HCI Event: Encrypt Change (0x08) plen 4
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Connect Complete (0x03) plen 11
 > HCI Event: Mode Change (0x14) plen 6

Here I hear a beep and some noise in the headset, so I guess it has 
entered capture mode correctly.
But from now no more packets are dumped till I interrupt arecord with 
ctrl-c. After stopping arecord I get the diconnect sequence:

< ACL data: handle 46 flags 0x02 dlen 8
     L2CAP(d): cid 0x004c len 4 [psm 3]
       RFCOMM(s): DISC: cr 1 dlci 4 pf 1 ilen 0 fcs 0x77
< HCI Command: Disconnect (0x01|0x0006) plen 3
 > HCI Event: Command Status (0x0f) plen 4
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 46 flags 0x02 dlen 8
     L2CAP(d): cid 0x0041 len 4 [psm 3]
       RFCOMM(s): UA: cr 1 dlci 4 pf 1 ilen 0 fcs 0x5d
< ACL data: handle 46 flags 0x02 dlen 8
     L2CAP(d): cid 0x004c len 4 [psm 3]
       RFCOMM(s): DISC: cr 1 dlci 0 pf 1 ilen 0 fcs 0xfd
< ACL data: handle 46 flags 0x02 dlen 12
     L2CAP(s): Disconn req: dcid 0x004c scid 0x0041
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Disconn Complete (0x05) plen 4
 > ACL data: handle 46 flags 0x02 dlen 8
     L2CAP(d): cid 0x0041 len 4 [psm 3]
       RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7
 > ACL data: handle 46 flags 0x02 dlen 12
     L2CAP(s): Disconn rsp: dcid 0x004c scid 0x0041
< HCI Command: Disconnect (0x01|0x0006) plen 3
 > HCI Event: Command Status (0x0f) plen 4
 > HCI Event: Disconn Complete (0x05) plen 4


Is this useful?
I'm not much into bluez source code, but I'm a C programmer so if you 
give me some hints about what to look for in the sources I could try to 
solve the problem myself.


Best regards, Gabriele

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-users] Headset half working using Bluez's ALSA plugin
  2008-01-24 10:07   ` Ing. Gabriele Oberhammer
  2008-01-24 15:17     ` Brad Midgley
@ 2008-01-27 11:04     ` jayjwa
  2008-01-27 11:26       ` Gabriele Oberhammer
  1 sibling, 1 reply; 12+ messages in thread
From: jayjwa @ 2008-01-27 11:04 UTC (permalink / raw)
  To: BlueZ users


On Thu, 24 Jan 2008, Ing. Gabriele Oberhammer wrote:



-> Hi, I've successful compiled and installed 'utils' and 'libs' from today cvs
-> but now its worse then before, now playback doesn't work too :-(

I'd stick with stable, cvs stuff is usually not intended for production use. 
Sometimes you need it for a new feature or fix, but I don't think that's the 
case here.

-> Now In the preferences menu in gnome-applet there are no services listed, but
-> my headset pairs correctly.
-> Here's what I've done, please tell ma what's wrong:
-> 
-> 1. checked out latest 'utils' and 'libs' directoryes from cvs
-> 2. installed all needed development headers
-> 3. Compiled:
-> 	$ cd utils/
-> 	$ sudo ./bootstrap
-> 	$ sudo ./configure --enable-all --prefix=/usr/local/
-> 	$ sudo make
-> 
-> 	$ cd ../libs/
-> 	$ sudo ./bootstrap
-> 	$ sudo ./configure --prefix=/usr/local/
-> 	$ sudo make

You should probably install into /usr instead of use /usr/local when you are 
replacing your main system things, else you end up with two conflicting 
versions of the same thing, or apps will look in /usr and quit, ignoring 
/usr/local. You can do tricks with symlinks, or hope the apps check the local 
level, but that gets messy.


-> 8. rebooted (I know it's not needed but I did it)

MS Windows? ;)


-> 	....
-> 	[AO_ALSA] alsa-lib: pcm.c:2105:(snd_pcm_open_conf) Cannot open shared
-> library /usr/lib/alsa-lib/libasound_module_pcm_bluetooth.so
-> 	[AO_ALSA] Playback open error: No such file or directory
-> 	....

It looks in /usr not /usr/local here...

That file is built in bluez-utils, provided you have a complete and working 
Alsa install. Beware, lots of distros give you abbreviated/incomplete 
installs. You think you have the whole shbang, but likely don't, you need 
*-dev or *-devel or some other such thing. There may be plugin packages, or 
they may split one alsa source tarball into a dozen binary packages, all of 
which you might need to track down and install to actually get the full, 
working, buildable install.

I'd start with Alsa since it seems suspect. You should have stuff like:

tree /lib/modules/2.6.23.13/kernel/sound/ 
/lib/modules/2.6.23.13/kernel/sound/
|-- ac97_bus.ko.gz
|-- core
|   |-- oss
|   |   |-- snd-mixer-oss.ko.gz
|   |   `-- snd-pcm-oss.ko.gz
|   |-- seq
|   |   |-- oss
|   |   |   `-- snd-seq-oss.ko.gz
|   |   |-- snd-seq-device.ko.gz
|   |   |-- snd-seq-dummy.ko.gz
|   |   |-- snd-seq-midi-event.ko.gz
|   |   |-- snd-seq-midi.ko.gz
|   |   |-- snd-seq-virmidi.ko.gz
|   |   `-- snd-seq.ko.gz
|   |-- snd-page-alloc.ko.gz
|   |-- snd-pcm.ko.gz
|   |-- snd-rawmidi.ko.gz
|   |-- snd-rtctimer.ko.gz
|   |-- snd-timer.ko.gz
|   `-- snd.ko.gz
|-- drivers
|   |-- snd-dummy.ko.gz
|   `-- snd-virmidi.ko.gz
|-- pci
|   |-- ac97
|   |   `-- snd-ac97-codec.ko.gz
|   `-- snd-intel8x0.ko.gz
`-- soundcore.ko.gz

(unless compiled in-kernel, which is unlikely since sound isn't a boot 
requirement. Your card driver will likely be different, and the oss emulation 
stuff may not be there)

ls /usr/include/alsa

alisp.h             conv.h     instr.h         pcm_extplug.h  seq.h 
version.h
asoundef.h          error.h    mixer.h         pcm_ioplug.h   seq_event.h
asoundlib.h         global.h   mixer_abst.h    pcm_old.h      seq_midi_event.h
conf.h              hwdep.h    output.h        pcm_plugin.h   seqmid.h
control.h           iatomic.h  pcm.h           pcm_rate.h     sound/
control_external.h  input.h    pcm_external.h  rawmidi.h      timer.h

ls -l /usr/lib/libasound.*

-rw-r--r-- 1 root root 1.3M Dec 29 17:05 /usr/lib/libasound.a
-rwxr-xr-x 1 root root  819 Dec 29 17:05 /usr/lib/libasound.la*
lrwxrwxrwx 1 root root   18 Dec 29 17:05 /usr/lib/libasound.so -> libasound.so.2.0.0*
lrwxrwxrwx 1 root root   18 Dec 29 17:05 /usr/lib/libasound.so.2 -> libasound.so.2.0.0*
-rwxr-xr-x 1 root root 961K Dec 29 17:05 /usr/lib/libasound.so.2.0.0*


These I built from

linux-2.6.23.13, kernel.org

alsa-lib-1.0.15.tar.bz2
alsa-plugins-1.0.15.tar.bz2
alsa-tools-1.0.15.tar.bz2  (might not need this, I didn't)
alsa-utils-1.0.15.tar.bz2, alsa site (forgot the URL)


bluez-firmware-1.2.tar.gz
bluez-libs-3.24.tar.gz
bluez-utils-3.24.tar.gz, bluez.org


bluez-utils built with:

configure '--prefix=/usr' '--enable-static' '--enable-shared' '--enable-pie' 
'--enable-expat' '--enable-usb' '--enable-alsa' '--enable-obex' 
'--enable-glib' '--enable-audio' '--enable-input' '--enable-serial' 
'--enable-network' '--enable-sync' '--enable-echo' '--enable-hcid' 
'--enable-sdpd' '--enable-hidd' '--enable-pand' '--enable-test' 
'--enable-cups' '--enable-manpages' '--enable-configfiles' '--enable-bccmd' 
'--enable-avctrl' '--enable-hid2hci' '--enable-dfutool' '--enable-dfubabel' 
'--with-gnu-ld'

Should build:

find bluez-utils-3.24/audio -name \*.so

bluez-utils-3.24/audio/.libs/libasound_module_pcm_bluetooth.so
bluez-utils-3.24/audio/.libs/libasound_module_ctl_bluetooth.so

When the 'checking for ...' messages are going, it should list ALSA as yes or 
ok. If not, open config.log and look for the tests it used to determine if 
Alsa was OK or not, and see why it failed. The tests are usually looking for a 
file or program, or trying to compile/link/run a program.

Doing just ./configure usually isn't enough. Start with ./configure --help and 
look at all the options, and pick and choose what you want/need, then build 
with that.



bluez-utils plus alsa-plugins should give a full set like:

ls -1 /usr/lib/bluetooth

bluetoothd-service-audio*
bluetoothd-service-echo*
bluetoothd-service-input*
bluetoothd-service-network*
bluetoothd-service-serial*
bluetoothd-service-transfer


ls -1 /usr/lib/alsa-lib/*.so

/usr/lib/alsa-lib/libasound_module_ctl_bluetooth.so*
/usr/lib/alsa-lib/libasound_module_ctl_dsp_ctl.so*
/usr/lib/alsa-lib/libasound_module_ctl_oss.so*
/usr/lib/alsa-lib/libasound_module_pcm_alsa_dsp.so*
/usr/lib/alsa-lib/libasound_module_pcm_bluetooth.so*
/usr/lib/alsa-lib/libasound_module_pcm_oss.so*
/usr/lib/alsa-lib/libasound_module_pcm_upmix.so*
/usr/lib/alsa-lib/libasound_module_pcm_vdownmix.so*
/usr/lib/alsa-lib/libasound_module_rate_speexrate.so*
/usr/lib/alsa-lib/libasound_module_rate_speexrate_best.so@
/usr/lib/alsa-lib/libasound_module_rate_speexrate_medium.so@

...depending on how you configured alsa in the kernel, the stuff you have 
installed, and how you built the alsa user-space libs/utils.


Bluetooth is a plugin, libasound_module_pcm_bluetooth, so you'll need 
something like

pcm.bluetooth {
         type bluetooth
         device 00:1A:45:01:F9:42
}

in an alsa configuration file. Then you make sure the bluez-utils config 
files are set, plug in the hardware if you have this type of bluetooth 
device, start dbus, and the bluetooth servers. passkey-agent should be running 
with the PIN of your device. I find the device to the computer pairs easier 
than the other way, but that might just be my setup. After that you should be 
able to use the bluetooth pcm to play your sound file, but I haven't got this 
last part working perfectly yet.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-users] Headset half working using Bluez's ALSA plugin
  2008-01-27 11:04     ` jayjwa
@ 2008-01-27 11:26       ` Gabriele Oberhammer
  0 siblings, 0 replies; 12+ messages in thread
From: Gabriele Oberhammer @ 2008-01-27 11:26 UTC (permalink / raw)
  To: BlueZ users

Thanks a lot for a so detailed answer! :-D

I know CVS is only for development, but I tried it because in some posts 
I red that building from CVS solved a problem similar to mine for 
someone because a patch concerning audio capture was recently added in CVS.

I had already solved the problem of missing alsa-modules before reading 
your post. The module was not built because '--enable-all' switch for 
configure seems *not* to enable all!
Using configure with all the '--enable-*' (as you suggested too) 
correctly built all modules and services.
I've also installed everything under root directories (i.e. /bin, /sbin, 
/etc, /lib, etc) (obviously after removing&purging old packages).
I guess I did everything right because now all is working fine.
But the problem with headset audio capture persists, i.e. I can do 
everything but capturing my voice.

By the way, thanks you again for your time and your suggestions.
I'll keep trying to solve the problem.
Best regards, Gabriele


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2008-01-27 11:26 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-22 11:43 [Bluez-users] Headset half working using Bluez's ALSA plugin Ing. Gabriele Oberhammer
2008-01-22 16:14 ` Guillaume Bedot
2008-01-24 10:07   ` Ing. Gabriele Oberhammer
2008-01-24 15:17     ` Brad Midgley
2008-01-24 22:30       ` Ing. Gabriele Oberhammer
2008-01-24 23:20         ` Brad Midgley
2008-01-25  8:33           ` Ing. Gabriele Oberhammer
2008-01-25  9:01           ` Ing. Gabriele Oberhammer
2008-01-27 11:04     ` jayjwa
2008-01-27 11:26       ` Gabriele Oberhammer
  -- strict thread matches above, loose matches on Subject: below --
2008-01-24 13:42 pramod gurav
2008-01-24 13:54 ` Ing. Gabriele Oberhammer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox