[Home]

Summary:ASTERISK-10297: The same noise problem from bluetooth to asterisk
Reporter:gfdsa (gfdsa)Labels:
Date Opened:2007-09-14 07:03:36Date Closed:2008-01-11 17:47:56.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Addons/chan_mobile
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) bt-log.txt
Description:It was already reported previously, but the bug was marked "closed" and I don't see any way to reopen it.
0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
LG-310 phone
Asterisk SVN-trunk-r81632M
chan_mobile.c:
Last Changed Author: tilghman
Last Changed Rev: 437
Last Changed Date: 2007-09-03 05:32:29 +0200 (Mon, 03 Sep 2007)
hci_scodata_packet: hci0 SCO packet for unknown connection handle 44

I'll try various bt/phone combinations ASAP, but does somebody have a hint where to dig?
Comments:By: gfdsa (gfdsa) 2007-09-14 07:05:13

oops, the version in the report description is oncorrect.
I have SVN-trunk-r81632M

By: Dave Bowerman (dbowerman) 2007-09-14 19:17:59

gfdsa:

This is most likely the firmware rev of you bluetooth adapter. Early revisions have a bug which causes a bit misalignment of the sco audio and the result is 'white noise'.

could you post the output of 'hciconfig -a' on your machine.

also, what kernel and version of bluez-libs are you using? There are a lot of bug fixes in the up-to-date versions. kernel ~ 2.6.20 and above and bluez-libs 3.18 are the ones to use.

By: gfdsa (gfdsa) 2007-09-15 02:02:01

sorry, had to add it in the first note:

hci0:   Type: USB
       BD Address: 00:15:83:01:51:E4 ACL MTU: 310:10 SCO MTU: 64:8
       UP RUNNING PSCAN ISCAN INQUIRY
       RX bytes:5759 acl:125 sco:0 events:515 errors:0
       TX bytes:3785 acl:100 sco:0 commands:204 errors:0
       Features: 0xff 0xff 0x8f 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: 0x3e0100
       Service Classes: Networking, Rendering, Capturing
       Device Class: Computer, Uncategorized
       HCI Ver: 2.0 (0x3) HCI Rev: 0xc5c LMP Ver: 2.0 (0x3) LMP Subver: 0xc5c
       Manufacturer: Cambridge Silicon Radio (10)

the kernel is 2.6.20 and the bluez-libs is 2.25
so I  will try to update both of them to see if it helps
thanks for the hint!

By: Dave Bowerman (dbowerman) 2007-09-15 02:34:33

update to the latest asterisk-addons too.

By: gfdsa (gfdsa) 2007-09-15 05:00:07

same story
UA -> asterisk A -> IAX -> asterisk B -> Mobile -> Nokia e60 or LG 310 -> PSTN

PSTN hears UA great, UA hears noice

tried also other combinations of the chain, still get noise, so the problem is clearly local (chan_mobile/bluez/sco/dongle)

updated:
kernel 2.6.22
bluez-libs and bluez-utils 3.18
asterisk and asterisk addons to head

[Sep 15 12:12:26] DEBUG[16567]: chan_iax2.c:3629 iax2_answer: Answering IAX2 call
[Sep 15 12:12:26] DEBUG[16567]: chan_mobile.c:811 mbl_devicestate: Checking device state for device LG-310
[Sep 15 12:12:26] DEBUG[16567]: chan_iax2.c:7542 socket_process: Ooh, voice format changed to 4
[Sep 15 12:12:27] DEBUG[16567]: chan_iax2.c:8362 socket_process: Received VNAK: resending outstanding frames
[Sep 15 12:12:27] DEBUG[16567]: chan_iax2.c:8362 socket_process: Received VNAK: resending outstanding frames
[Sep 15 12:12:34] DEBUG[16567]: chan_iax2.c:7885 socket_process: Immediately destroying 3, having received hangup
[Sep 15 12:12:34] DEBUG[16567]: channel.c:3902 ast_generic_bridge: Didn't get a frame from channel: IAX2/markoz-3
[Sep 15 12:12:34] DEBUG[16567]: channel.c:4234 ast_channel_bridge: Bridge stops bridging channels IAX2/markoz-3 and Mobile/LG-310
[Sep 15 12:12:34] DEBUG[16567]: channel.c:1460 ast_hangup: Hanging up channel 'Mobile/LG-310'
[Sep 15 12:12:34] DEBUG[16567]: chan_mobile.c:616 mbl_hangup: Hanging up device LG-310.
]Sep 15 12:12:34] DEBUG[16567]: chan_mobile.c:878 rfcomm_write: rfcomm_write() (LG-310) [AT+CHUP

hci_scodata_packet: hci0 SCO packet for unknown connection handle 42
hci0:   Type: USB
       BD Address: 00:15:83:01:51:E4 ACL MTU: 310:10 SCO MTU: 64:8
       UP RUNNING PSCAN ISCAN
       RX bytes:3552305 acl:287 sco:69222 events:477 errors:0
       TX bytes:2760124 acl:197 sco:54025 commands:133 errors:0
       Features: 0xff 0xff 0x8f 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: 0x000100
       Service Classes: Unspecified
       Device Class: Computer, Uncategorized
       HCI Ver: 2.0 (0x3) HCI Rev: 0xc5c LMP Ver: 2.0 (0x3) LMP Subver: 0xc5c
       Manufacturer: Cambridge Silicon Radio (10)

By: gfdsa (gfdsa) 2007-09-15 05:23:11

applied http://www.holtmann.org/linux/kernel/patch-2.6.22-mh3.gz linked from http://www.bluez.org/patches.html

no sound at all on both ends

hci_scodata_packet: hci0 SCO packet for unknown connection handle

By: Dave Bowerman (dbowerman) 2007-09-15 05:37:38

any chance you could try :-

UA -> asterisk B -> Mobile -> Nokia e60 or LG 310 -> PSTN ?

By: gfdsa (gfdsa) 2007-09-15 05:52:19

sure, did it already yesterday and did again today
no difference

By: gfdsa (gfdsa) 2007-09-15 06:00:24

just noted:
RX bytes:280683 acl:61 sco:5327 events:171 errors:0
TX bytes:1932 acl:44 sco:0 commands:87 errors:0

sco TX is 0
thats after the patches

bloody dongle, the thing is that I bought it because it had tux on the package, so I am a PR victim now ...

By: Dave Bowerman (dbowerman) 2007-09-15 06:11:07

so it sounds like static does it?

By: gfdsa (gfdsa) 2007-09-15 06:17:43

It did before, now after I've patched the kernel it is silent on both ends
will recompile the kernel w/o the patches...

also I've noticed that I have:
       < ACL 00:19:A1:63:84:B1 handle 43 state 1 lm SLAVE
       > SCO 00:19:A1:63:84:B1 handle 0 state 5 lm SLAVE
when in the log the scodata complains about handle 42 ...
I understand that it should be the handle 0, right?

Dave, thanks for being so responsive

By: gfdsa (gfdsa) 2007-09-15 07:53:53

strange, recompiled the kernel w/o patched and the handles problem is no more
It started working.
The sound quality is awful however. Any advices for improvement?

By: Dave Bowerman (dbowerman) 2007-09-16 03:10:27

just as a matter of interest whats it like now with

UA -> asterisk B -> Mobile -> Nokia e60 or LG 310 -> PSTN ?

By: gfdsa (gfdsa) 2007-09-16 03:38:33

Dave,
my last note refers to UA -> asterisk B -> Mobile -> Nokia e60 or LG 310 -> PSTN
since I've already have it configured the test are done locally
with nokia the audio is a bit better compared to LG, but with some static noises on the PSTN side, with lg the voice is not "smooth" has "holes" or "interrupts" on both sides
I know little about BT, but a wild guess, could it be SCO MTU? dunno also if I can change it...
Also, is there some recoding taking place? as far as I see from googling around, SCO is running on ulaw, right?

By: Dave Bowerman (dbowerman) 2007-09-16 06:57:29

nope the raw sco audio is linear.

what frame size is your ua using 20ms ?

By: gfdsa (gfdsa) 2007-09-16 07:10:46

I think it is correct
It seems to call it "preferred payload size" and it is set to 20ms

By: Dave Bowerman (dbowerman) 2007-09-28 19:54:02

gfdsa:

could you retest with latest trunk? have a look at configs/mobile.conf.sample for alignmentdetection=yes
turn it on for your adapter.

By: Russell Bryant (russell) 2008-01-11 17:47:56.000-0600

Closed due to lack of feedback, and just assuming that it was fixed ...