2006-11-06 14:08:15

by Chafik Moalem

[permalink] [raw]
Subject: [Bluez-devel] btsco/alsa-plugins Kernel 2.6.18-mh7 (and mh4-fch)

Dear Marcel, Dear Fabien,

ok ... my latest try was with vanilla 2.6.18-mh4 and fabiens (2006-10-12) patch :
1. on my gentoo with gcc 3.4.5-r1 the applied mh4 patch leads to a compilation error on linux/net/bluetooth/l2cap.c? ==>? I? had to? comment out? the? prototype "static inline int l2cap_do_send_rfc( ..)" and to? move? the? implementation? block? to? just? before? l2cap_retransmission_timer(..) where it is used the first time ....
for applying fabiens patch from 2006-10-12 some more work had to be done ... since the formatting of the patch and (strangely) the ranges of the hunks where not that precise (fuzz up to 6 and one line offset of 10 and some manual delete /copy /paste stuff) ... finally everything was complete and compiled fine with no warnings ;)

2. on 2.6.18-mh4-fch I just followed the new instructions with alsa-plugin method ... FAILS with running headsetd and aplay with following messages :

?messages :
Nov? 6 14:24:05 chmo headsetd[18692]: Configuration phase ended: target bdaddr is 00:17:91:01:00:08, timeout is 6000 ms
Nov? 6 14:24:05 chmo headsetd[18692]: unable to create bluetooth L2CAP socket: Operation now in progress
Nov? 6 14:24:05 chmo l2cap_sock_create: sock db74f9c0
Nov? 6 14:24:05 chmo l2cap_sock_init: sk cd75ca00
Nov? 6 14:24:05 chmo l2cap_sock_connect: sk cd75ca00
Nov? 6 14:24:05 chmo l2cap_do_connect: 00:00:00:00:00:00 -> 08:00:01:91:17:00 psm 0x01
Nov? 6 14:24:05 chmo l2cap_conn_add: hcon c0e49400 conn dcadf7c0
Nov? 6 14:24:05 chmo __l2cap_chan_add: conn dcadf7c0, psm 0x01, dcid 0x0000
Nov? 6 14:24:05 chmo l2cap_sock_set_timer: sk cd75ca00 state 5 timeout 40000
Nov? 6 14:24:05 chmo l2cap_sock_release: sock db74f9c0, sk cd75ca00
Nov? 6 14:24:05 chmo l2cap_sock_shutdown: sock db74f9c0, sk cd75ca00
Nov? 6 14:24:05 chmo l2cap_sock_clear_timer: sock cd75ca00 state 5
Nov? 6 14:24:05 chmo __l2cap_sock_close: sk cd75ca00 state 5 socket db74f9c0
Nov? 6 14:24:05 chmo l2cap_sock_clear_timer: sock cd75ca00 state 5
Nov? 6 14:24:05 chmo l2cap_chan_del: sk cd75ca00, conn dcadf7c0, err 0
Nov? 6 14:24:05 chmo l2cap_sock_kill: sk cd75ca00 state 9
Nov? 6 14:24:05 chmo l2cap_sock_destruct: sk cd75ca00
Nov? 6 14:24:05 chmo l2cap_connect_cfm: hcon c0e49400 bdaddr 08:00:01:91:17:00 status 2
Nov? 6 14:24:05 chmo l2cap_conn_del: hcon c0e49400 conn dcadf7c0, err 107

aplay :
aplay -D headset 400Hz.wav
DEBUG: _snd_pcm_sco_open: Starting pcm_sco plugin.
DEBUG: _snd_pcm_sco_open: Open mode is for Playback.
ALSA lib pcm_sco.c:485:(do_cfg) Unexpected packet type received: type = 2
aplay: main:550: audio open error: Das Argument ist ung?ltig

By the way the l2cap socket problem AND the static inline problem exist? the same way? in an? 2.6.18-mh7(!)? kernel? with? no fch? modifications?? (and no? manual? poking by myself ;)? )?

bluez libs und utils are 3.7? ... alsa lib and utils 1.0.13
pairing works (!) at least with the snd_bt_sco / btsco-method and passkey-agent --default 1bla45
(verified with hcidump )? ... but this method delivers only SILENCE in the headset (though the sco-data seems to contain something valid in hcidump -X AND though using alsamixer to pump up the volume )

aarggh ... is the l2cap_do_connect correct ?? why is source 00:00:00:00:00:00

btw : l2test to that headset delivers a nice :
l2test -z 00:17:91:01:00:08
Connectionless MTU size is 670
Extended feature mask is 0x0000

and :
Nov? 6 14:46:16 chmo l2cap_sock_create: sock db74fb40
Nov? 6 14:46:16 chmo l2cap_sock_init: sk d31e2600
Nov? 6 14:46:16 chmo l2cap_sock_bind: sk d31e2600, 00:00:00:00:00:00 0
Nov? 6 14:46:16 chmo l2cap_sock_connect: sk d31e2600
Nov? 6 14:46:16 chmo l2cap_do_connect: 00:00:00:00:00:00 -> 08:00:01:91:17:00 psm 0x00
Nov? 6 14:46:16 chmo l2cap_conn_add: hcon dd582400 conn de6fa240
Nov? 6 14:46:16 chmo __l2cap_chan_add: conn de6fa240, psm 0x00, dcid 0x0000
Nov? 6 14:46:16 chmo l2cap_sock_set_timer: sk d31e2600 state 5 timeout 40000
Nov? 6 14:46:17 chmo l2cap_connect_cfm: hcon dd582400 bdaddr 08:00:01:91:17:00 status 0
Nov? 6 14:46:17 chmo l2cap_conn_ready: conn de6fa240
Nov? 6 14:46:17 chmo l2cap_sock_clear_timer: sock d31e2600 state 5
Nov? 6 14:46:17 chmo l2cap_sock_sendmsg: sock db74fb40, sk d31e2600
Nov? 6 14:46:17 chmo l2cap_do_send: sk d31e2600 len 6
Nov? 6 14:46:17 chmo l2cap_recv_acldata: conn de6fa240 len 14 flags 0x2
Nov? 6 14:46:17 chmo l2cap_recv_frame: len 10, cid 0x0001
Nov? 6 14:46:17 chmo l2cap_raw_recv: conn de6fa240
Nov? 6 14:46:17 chmo l2cap_sig_channel: code 0x0b len 6 id 0x2a
Nov? 6 14:46:17 chmo l2cap_information_rsp: type 0x0001 result 0x00 ident 42
Nov? 6 14:46:17 chmo l2cap_sock_sendmsg: sock db74fb40, sk d31e2600
Nov? 6 14:46:17 chmo l2cap_do_send: sk d31e2600 len 6
Nov? 6 14:46:17 chmo l2cap_recv_acldata: conn de6fa240 len 16 flags 0x2
Nov? 6 14:46:17 chmo l2cap_recv_frame: len 12, cid 0x0001
Nov? 6 14:46:17 chmo l2cap_raw_recv: conn de6fa240
Nov? 6 14:46:17 chmo l2cap_sig_channel: code 0x0b len 8 id 0x2a
Nov? 6 14:46:17 chmo l2cap_information_rsp: type 0x0002 result 0x00 ident 42
Nov? 6 14:46:17 chmo l2cap_sock_release: sock db74fb40, sk d31e2600
Nov? 6 14:46:17 chmo l2cap_sock_shutdown: sock db74fb40, sk d31e2600
Nov? 6 14:46:17 chmo l2cap_sock_clear_timer: sock d31e2600 state 1
Nov? 6 14:46:17 chmo __l2cap_sock_close: sk d31e2600 state 1 socket db74fb40
Nov? 6 14:46:17 chmo l2cap_sock_clear_timer: sock d31e2600 state 1
Nov? 6 14:46:17 chmo l2cap_chan_del: sk d31e2600, conn de6fa240, err 0
Nov? 6 14:46:17 chmo l2cap_sock_kill: sk d31e2600 state 9
Nov? 6 14:46:17 chmo l2cap_sock_destruct: sk d31e2600
Nov? 6 14:46:19 chmo l2cap_disconn_ind: hcon dd582400 reason 22
Nov? 6 14:46:19 chmo l2cap_conn_del: hcon dd582400 conn de6fa240, err 103

after sock_set_timer
here everything is fine ... hmm is it more on fabiens side ??

btw : with a kernel 2.6.17.r8 everything was ok with BOTH btsco AND alsa-plugin? (but i? just? WANT to? enable? flow control? ... so? therefore? mh patches? AND (?)? fch? patches? !!

I really appreciate your efforts ... and thank you a lot.? My impression is that a proper implementation for extended SCO is REALLY needed (isn't it what you are heading to?) and nobody really has had positive results so far ... it would be great? if bluez would do it first! (i will test/report as much as possible)
please help!

Fabien :
where can i find your scotest.c ??

best regards
Chafik


Attachments:
(No filename) (6.18 kB)
(No filename) (7.23 kB)
(No filename) (373.00 B)
(No filename) (164.00 B)
Download all attachments