Hi,

I am trying to modify audio gateway codes to comply the handsfree
profile. So I move some audio gateway functions into a application and
try to run it in application level. In far, the acl connection seems to
be ok, but the establishment of sco link fails. After I call
OpenAudioChannel, the btscosnd driver try to establish a sco link by
calling the InitSco (). In the debug output, the part of reading the
device voice setting succeed, but the part of writing device voice
setting failed. The error is BT_ERROR_COMMAND_DISALLOWED ( in
StatusToError (), it is translated to system error
ERROR_CALL_NOT_IMPLEMENTED). If I skip the voice setting writting, it
fails in EstablishScoConnection. The debug output is

BTSCOSND:: [ERROR] "Call UCT_CONNECT failed 1450"
BTSCOSND:: [ERROR] "EstablishScoConnection FAILED 1450"

Does anyone knows that if the voice setting writting must be executed?
What is the possible reason of the fail of the sco link establishment?

Any suggestions would be appreciated.

Re: btscosnd error by K

K
Mon Oct 31 00:51:42 CST 2005

Which transpotation layer driver for BT Radio do you use??
Via USB, Serial or somthing else??
There is some registry setting for enabling the SCO conneciton for USB Iso.
transfer.

There are also somoe registry setting for AG that will inform the AG not to
connect via PCM bus.

[HKEY_LOCAL_MACHINE\Software\Microsoft\Bluetooth\AudioGateway]
"MapAudioToPcmMode"=dword:0
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Bluetooth\AudioGateway\Devices\1]
"Direction"=dword:0
"AirCoding"=dword:0
"ConnectInTimeout"=dword:10000
"8BitSignedSamples"=dword:1


"Robert Lo" <RobertLoX@gmail.com> ¼¶¼g©ó¶l¥ó·s»D:1130469235.537845.231300@g44g2000cwa.googlegroups.com...
> Hi,
>
> I am trying to modify audio gateway codes to comply the handsfree
> profile. So I move some audio gateway functions into a application and
> try to run it in application level. In far, the acl connection seems to
> be ok, but the establishment of sco link fails. After I call
> OpenAudioChannel, the btscosnd driver try to establish a sco link by
> calling the InitSco (). In the debug output, the part of reading the
> device voice setting succeed, but the part of writing device voice
> setting failed. The error is BT_ERROR_COMMAND_DISALLOWED ( in
> StatusToError (), it is translated to system error
> ERROR_CALL_NOT_IMPLEMENTED). If I skip the voice setting writting, it
> fails in EstablishScoConnection. The debug output is
>
> BTSCOSND:: [ERROR] "Call UCT_CONNECT failed 1450"
> BTSCOSND:: [ERROR] "EstablishScoConnection FAILED 1450"
>
> Does anyone knows that if the voice setting writting must be executed?
> What is the possible reason of the fail of the sco link establishment?
>
> Any suggestions would be appreciated.
>



Re: btscosnd error by Robert

Robert
Mon Oct 31 20:02:12 CST 2005

Thanks a lot.

We use USB dongle so I select USB transport layer. I found that this
fail is caused by the registry MapAudioToPcmMode. It's default value is
true( in the source code), but we need to set it false (I create my own
registrys but not add this registry).

I donot have any documents about these registry. Did you know where to
get these informations?


Re: btscosnd error by K

K
Mon Oct 31 20:26:21 CST 2005

Search the keyword MapAudioToPcmMode in on-line help or just browse
Windows CE Features > Communication Services and Networking > Networking -
Personal Area Network (PAN) > Bluetooth > Bluetooth Registry Settings
If the documents is absent, you may need to update your help file.

"Robert Lo" <RobertLoX@gmail.com>
???????:1130810532.186782.256110@g43g2000cwa.googlegroups.com...
> Thanks a lot.
>
> We use USB dongle so I select USB transport layer. I found that this
> fail is caused by the registry MapAudioToPcmMode. It's default value is
> true( in the source code), but we need to set it false (I create my own
> registrys but not add this registry).
>
> I donot have any documents about these registry. Did you know where to
> get these informations?
>



Re: btscosnd error by Robert

Robert
Tue Nov 01 02:19:34 CST 2005

Thanks a lot.

But the documents did not contain the meaning of registry in
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Bluetooth\AudioGateway\Devices\1",
though the default value in common.reg is workable now. Did you know
where to get these informations?


Re: btscosnd error by K

K
Tue Nov 01 22:42:44 CST 2005

It seems that this setting is *not* in th eon-line help.
But you may get some idea from the source code of btscosnd.dll driver.
You could access the source code under
$(_WINCEROOT)\PUBLIC\COMMON\OAK\DRIVERS\BLUETOOTH\SAMPLES\BTSCOSND\

"Robert Lo" <RobertLoX@gmail.com>
???????:1130833174.457980.211860@g43g2000cwa.googlegroups.com...
> Thanks a lot.
>
> But the documents did not contain the meaning of registry in
> "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Bluetooth\AudioGateway\Devices\1",
> though the default value in common.reg is workable now. Did you know
> where to get these informations?
>



Re: btscosnd error by jing

jing
Tue Nov 08 19:38:09 CST 2005


below is my understanding on how the keys were used

Direction
0 - initiate sco connection
1 - waits and accept sco connection

AirCoding
0 - CVSD (default)
1 - uLaw
2 - aLaw

ConnectInTimeout
10000 - default
<others> - time to wait for incoming sco connection request

8BitSignedSamples - determines how data will be processed
0 - false
1 - true

AddressIn
bd_addr - accept connection only from this device
<not provided> or <all zeroes> - accept all

Address
bd_addr - address of remote device to connect to

So far, only the AirCoding value was used when writing the voice setting.
I think the 8BitSignedSamples should also be reflected in the voice setting
to write.
But since my bluetooth device does not allow unsigned input data format, I
use the default setting retrived from the read voice setting that is 2's
compliment.

Another thing you should take note is these keys were written in
\\Bluetooth\\AudioGateway\\Devices\\1
the entire key is deleted when you disable the headset/handsfree service
from the current default device or delete the device from your list of
parterned devices.
With this, InitSco() will always fail to proceed since the "Direction" key
can no longer be found.

hope this helps

btw, how did you open the bluetooth logs? and where can i find the headset
and handsfree icons you mentioned from earlier posts?

jing


"Robert Lo" wrote:

> Thanks a lot.
>
> But the documents did not contain the meaning of registry in
> "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Bluetooth\AudioGateway\Devices\1",
> though the default value in common.reg is workable now. Did you know
> where to get these informations?
>
>

Re: btscosnd error by K

K
Tue Nov 08 21:27:36 CST 2005

To enable the bluetooth log, you'll need to have a debug build for your OS
iamge or at least the BT relative modules, and enable the following registry
[Software\Microsoft\Bluetooth\Debug]
"mask" = dword:<zone mask>
"console"=dword:0|1|2

or you could refer to the on-line help documents in
Developing a Device Driver > Windows Mobile-based Device Drivers > Bluetooth
HCI Transport Driver > Bluetooth Protocol Stack > Common Layer
Characteristics

"jing" <jing@discussions.microsoft.com> ¼¶¼g©ó¶l¥ó·s»D:55C2E009-7237-4C1F-8B5F-30E764EAFD03@microsoft.com...
>
> below is my understanding on how the keys were used
>
> Direction
> 0 - initiate sco connection
> 1 - waits and accept sco connection
>
> AirCoding
> 0 - CVSD (default)
> 1 - uLaw
> 2 - aLaw
>
> ConnectInTimeout
> 10000 - default
> <others> - time to wait for incoming sco connection request
>
> 8BitSignedSamples - determines how data will be processed
> 0 - false
> 1 - true
>
> AddressIn
> bd_addr - accept connection only from this device
> <not provided> or <all zeroes> - accept all
>
> Address
> bd_addr - address of remote device to connect to
>
> So far, only the AirCoding value was used when writing the voice setting.
> I think the 8BitSignedSamples should also be reflected in the voice
> setting
> to write.
> But since my bluetooth device does not allow unsigned input data format, I
> use the default setting retrived from the read voice setting that is 2's
> compliment.
>
> Another thing you should take note is these keys were written in
> \\Bluetooth\\AudioGateway\\Devices\\1
> the entire key is deleted when you disable the headset/handsfree service
> from the current default device or delete the device from your list of
> parterned devices.
> With this, InitSco() will always fail to proceed since the "Direction" key
> can no longer be found.
>
> hope this helps
>
> btw, how did you open the bluetooth logs? and where can i find the headset
> and handsfree icons you mentioned from earlier posts?
>
> jing
>
>
> "Robert Lo" wrote:
>
>> Thanks a lot.
>>
>> But the documents did not contain the meaning of registry in
>> "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Bluetooth\AudioGateway\Devices\1",
>> though the default value in common.reg is workable now. Did you know
>> where to get these informations?
>>
>>



Re: btscosnd error by jing

jing
Wed Nov 09 21:29:02 CST 2005


I can only create a retail build. Will this work?
Where should i expect to get the log? Don't i need to enable the celog?
What is the "console" key for?

thanks


"K. S. Huang" wrote:

> To enable the bluetooth log, you'll need to have a debug build for your OS
> iamge or at least the BT relative modules, and enable the following registry
> [Software\Microsoft\Bluetooth\Debug]
> "mask" = dword:<zone mask>
> "console"=dword:0|1|2
>
> or you could refer to the on-line help documents in
> Developing a Device Driver > Windows Mobile-based Device Drivers > Bluetooth
> HCI Transport Driver > Bluetooth Protocol Stack > Common Layer
> Characteristics
>
> "jing" <jing@discussions.microsoft.com> ¼¶¼g©ó¶l¥ó·s»D:55C2E009-7237-4C1F-8B5F-30E764EAFD03@microsoft.com...
> >
> > below is my understanding on how the keys were used
> >
> > Direction
> > 0 - initiate sco connection
> > 1 - waits and accept sco connection
> >
> > AirCoding
> > 0 - CVSD (default)
> > 1 - uLaw
> > 2 - aLaw
> >
> > ConnectInTimeout
> > 10000 - default
> > <others> - time to wait for incoming sco connection request
> >
> > 8BitSignedSamples - determines how data will be processed
> > 0 - false
> > 1 - true
> >
> > AddressIn
> > bd_addr - accept connection only from this device
> > <not provided> or <all zeroes> - accept all
> >
> > Address
> > bd_addr - address of remote device to connect to
> >
> > So far, only the AirCoding value was used when writing the voice setting.
> > I think the 8BitSignedSamples should also be reflected in the voice
> > setting
> > to write.
> > But since my bluetooth device does not allow unsigned input data format, I
> > use the default setting retrived from the read voice setting that is 2's
> > compliment.
> >
> > Another thing you should take note is these keys were written in
> > \\Bluetooth\\AudioGateway\\Devices\\1
> > the entire key is deleted when you disable the headset/handsfree service
> > from the current default device or delete the device from your list of
> > parterned devices.
> > With this, InitSco() will always fail to proceed since the "Direction" key
> > can no longer be found.
> >
> > hope this helps
> >
> > btw, how did you open the bluetooth logs? and where can i find the headset
> > and handsfree icons you mentioned from earlier posts?
> >
> > jing
> >
> >
> > "Robert Lo" wrote:
> >
> >> Thanks a lot.
> >>
> >> But the documents did not contain the meaning of registry in
> >> "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Bluetooth\AudioGateway\Devices\1",
> >> though the default value in common.reg is workable now. Did you know
> >> where to get these informations?
> >>
> >>
>
>
>

Re: btscosnd error by K

K
Wed Nov 09 23:19:58 CST 2005

I did *not* try this under retail build.
The following table shows the definition for the console reg value.

OUTPUT_MODE_DEBUG 0
OUTPUT_MODE_CONSOLE 1
OUTPUT_MODE_FILE 2


"jing" <jing@discussions.microsoft.com> ¼¶¼g©ó¶l¥ó·s»D:42ABE284-37A6-4793-915B-88440591B5F4@microsoft.com...
>
> I can only create a retail build. Will this work?
> Where should i expect to get the log? Don't i need to enable the celog?
> What is the "console" key for?
>
> thanks
>
>
> "K. S. Huang" wrote:
>
>> To enable the bluetooth log, you'll need to have a debug build for your
>> OS
>> iamge or at least the BT relative modules, and enable the following
>> registry
>> [Software\Microsoft\Bluetooth\Debug]
>> "mask" = dword:<zone mask>
>> "console"=dword:0|1|2
>>
>> or you could refer to the on-line help documents in
>> Developing a Device Driver > Windows Mobile-based Device Drivers >
>> Bluetooth
>> HCI Transport Driver > Bluetooth Protocol Stack > Common Layer
>> Characteristics
>>
>> "jing" <jing@discussions.microsoft.com> ???gco?l¢Do¡Ps?D:55C2E009-7237-4C1F-8B5F-30E764EAFD03@microsoft.com...
>>
>> >
>> > below is my understanding on how the keys were used
>> >
>> > Direction
>> > 0 - initiate sco connection
>> > 1 - waits and accept sco connection
>> >
>> > AirCoding
>> > 0 - CVSD (default)
>> > 1 - uLaw
>> > 2 - aLaw
>> >
>> > ConnectInTimeout
>> > 10000 - default
>> > <others> - time to wait for incoming sco connection request
>> >
>> > 8BitSignedSamples - determines how data will be processed
>> > 0 - false
>> > 1 - true
>> >
>> > AddressIn
>> > bd_addr - accept connection only from this device
>> > <not provided> or <all zeroes> - accept all
>> >
>> > Address
>> > bd_addr - address of remote device to connect to
>> >
>> > So far, only the AirCoding value was used when writing the voice
>> > setting.
>> > I think the 8BitSignedSamples should also be reflected in the voice
>> > setting
>> > to write.
>> > But since my bluetooth device does not allow unsigned input data
>> > format, I
>> > use the default setting retrived from the read voice setting that is
>> > 2's
>> > compliment.
>> >
>> > Another thing you should take note is these keys were written in
>> > \\Bluetooth\\AudioGateway\\Devices\\1
>> > the entire key is deleted when you disable the headset/handsfree
>> > service
>> > from the current default device or delete the device from your list of
>> > parterned devices.
>> > With this, InitSco() will always fail to proceed since the "Direction"
>> > key
>> > can no longer be found.
>> >
>> > hope this helps
>> >
>> > btw, how did you open the bluetooth logs? and where can i find the
>> > headset
>> > and handsfree icons you mentioned from earlier posts?
>> >
>> > jing
>> >
>> >
>> > "Robert Lo" wrote:
>> >
>> >> Thanks a lot.
>> >>
>> >> But the documents did not contain the meaning of registry in
>> >> "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Bluetooth\AudioGateway\Devices\1",
>> >> though the default value in common.reg is workable now. Did you know
>> >> where to get these informations?
>> >>
>> >>
>>
>>
>>



Re: btscosnd error by afterthat

afterthat
Thu Dec 29 21:21:02 CST 2005

if u want to establish a sco link ,it needs to set pcm enable and fomat
parameters on your bluetooth chip,