[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bluetooth-dev] voice Connection



Hi!

Here's an example for voice connection.
I'm not sure the operation.
I'm tesing the code using CSR CASIRA kits.
I just confirmed successful SCO connection without real voice testing.

1) for users of apps/bluetooth/btd /btd
o in file btd.c
void bt_sco_connection(int bt_cfd, unsigned int hci_hdl); //declare
void bt_sco_connection(int bt_cfd, unsigned int hci_hdl)  //define
{
   #ifndef BTD_USERSTACK
      ioctl(bt_cfd, HCIADDSCOCONNECTION, &hci_hdl)
   #else
      hci_add_sco_connection(hci_hdl);
    #endif
}

-add followings in function process_cmd()
else if(sscanf(buf, "sco_conn %d", &tmp[0])==1)
{
    bt_sco_connection (bt_cfd, tmp[0]);
}
-add sco_conn menu in variable "char *menu[]"
 " sco_conn <con_hdl> :,

o in file btcommon.h
#define HCIADDSCOCONNECTION _IOWR(BT_IOC_MAGIC, 0x17,u8[4]);

o in file bluetooth.c

-add followings in function  bt_ioctl()
case HCIADDSCOCONNECTION:
   u32 param;
   s32 result;
   copy_from_user(&param, (u8*)arg, size);
   result=hci_add_sco_connection(param);
   put_user(result, (s32*)arg);
   break;

o in file hci.c
-in function hci_add_sco_connections()
  set HV1 packet type

  c_pkt.data[2]=0x20;   //HV1    [0x20, 0x40, 0x80]=[HV1,HV2,HV3]

2) for users of apps/bluetooth/experimental/btdm
o in file bttest.c
void bt_sco_connection(int bt_cfd, unsigned int hci_hdl)  //define
{
   #ifndef BTD_USERSTACK
      ioctl(bt_cfd, HCIADDSCOCONNECTION, &hci_hdl)
   #else
      hci_add_sco_connection(hci_hdl);
    #endif
}
-add followings in function process_cmd()
else if(sscanf(buf, "sco_conn %d", &tmp[0])==1)
{
    bt_sco_connection (bt_cfd, tmp[0]);
}
-add sco_conn menu in variable "char *menu[]"
 " sco_conn <con_hdl> :,

o in file bt_if.c
void bt_sco_connection(int bt_cfd, unsigned int hci_hdl)  //define
{
   #ifndef BTD_USERSTACK
      ioctl(bt_cfd, HCIADDSCOCONNECTION, &hci_hdl)
   #else
      hci_add_sco_connection(hci_hdl);
    #endif
}
o in file bt_if.h
void bt_sco_connection(int bt_cfd, unsigned int hci_hdl) ;
o in file bluetooth.c
 -add followings in function  bt_ioctl()
case HCIADDSCOCONNECTION:
   u32 param;
   s32 result;
   copy_from_user(&param, (u8*)arg, size);
   result=hci_add_sco_connection(param);
   put_user(result, (s32*)arg);
   break;


After rf_conn connection, execute "sco_conn <con_hdl>" .

Regards

Yanggi Kang

"Buttler, Markus" wrote:

> Hello,
>
> I'm currently try to setup a voice connection ( headset profile )
> with a Ericsson R520m Mobile.
>
> What do i have to do to get this working ?
>
> I try to:
>
> - Create ACL Connection ( which works )
> - Add SCO Connection ( which doesn't )
>
> I get different error messages depending on the previously set Air Coding
> in the Voice Settings.
>
> If set to ?Law or aLaw:
> SCO Air Mode rejected
>
> If set to CVSD:
> Host rejected due to limited resources
>
> I'm currently using the Ericsson BT Starter Kit.
>
> --
> Markus Buttler
>
> -----------------------------------------------------------
> This Mail has been checked for Viruses
> Attention: Encrypted Mails can NOT be checked !
>
> ***
>
> Diese Mail wurde auf Viren ueberprueft
> Hinweis: Verschluesselte Mails koennen NICHT geprueft werden!
> ------------------------------------------------------------
> -
> To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
> the body of a message to majordomo@xxxxxxx.com
begin:vcard 
n:Kang;Yang Gi
tel;cell:017-421-5415
tel;fax:+82-42-487-9229
tel;home:+82-42-864-3824
tel;work:+82-42-487-1117
x-mozilla-html:FALSE
adr:;;;;;;
version:2.1
email;internet:ygkang@xxxxxxx.kr
fn:Yang Gi Kang
end:vcard