2009-01-29 08:17:47

by X-PELAGE.Patrick

[permalink] [raw]
Subject: RE: csr_h4.c

Thanks!

I am reading and try to udestand the csr_h4.c source file.
=20
1- What is the "varid" argument of "csr_read" and "csr_write"
functions? is it the HCI packet type, identified in HCI UART TRANSPORT =
LAYER?
2- How to used the csr_h4.c file? that is to say, the main function, if =
I want to send an HCI packet using H4?
3- What is the meaning of "uin16_t command" in "do_command" function?=20
4- What is the description and specification of the csr_read_h4() input =
parameters? Same questions for csr_write_h4()? So if I have to send a =
HCI frame, what I have to do with these functions, according their input =
parameters?

King regards

Patrick

> -----Message d'origine-----
> De : Marcel Holtmann [mailto:[email protected]]=20
> Envoy=E9 : jeudi 29 janvier 2009 09:12
> =C0 : X-PELAGE.Patrick
> Objet : Re: csr_h4.c
>=20
> Hi,
>=20
> >=20
> > I am reading and try to udestand the csr_h4.c source file.
> > =20
> > 1- What is the "varid" argument of "csr_read" and "csr_write"
> > functions? is it the HCI packet type, identified in HCI=20
> UART TRANSPORT=20
> > LAYER?
> > 2- How to used the csr_h4.c file? that is to say, the main=20
> function,=20
> > if I want to send an HCI packet using H4?
> > 3- What is the meaning of "uin16_t command" in "do_command"=20
> function?
>=20
> use [email protected] for such questions.
>=20
> Regards
>=20
> Marcel
>=20
>=20
>=20


2009-01-29 09:29:47

by David Thornton

[permalink] [raw]
Subject: Re: csr_h4.c


On 29/01/2009, at 7:17 PM, X-PELAGE.Patrick wrote:

> Thanks!
>
> I am reading and try to udestand the csr_h4.c source file.
>
> 1- What is the "varid" argument of "csr_read" and "csr_write"
> functions? is it the HCI packet type, identified in HCI UART
> TRANSPORT LAYER?

no it is the variable id of a pskey to be set/retrieved.

>
> 2- How to used the csr_h4.c file? that is to say, the main function,
> if I want to send an HCI packet using H4?

you dont

> 3- What is the meaning of "uin16_t command" in "do_command" function?

send a 16 bit command? (i dont know, i would have to look it up)

> 4- What is the description and specification of the csr_read_h4()
> input parameters? Same questions for csr_write_h4()? So if I have to
> send a HCI frame, what I have to do with these functions, according
> their input parameters?
>
no no no - you have this *all wrong* this source file you've looked
at, is used for sending BCCMDs that is to say BlueCore commands to a
Cambridge Silicon Radio BlueCore Bluetooth chip. BCCMDS are NOT HCI,
but in fact a protocol used to setup/initialise a bluecore chip.

to send HCI packets, you barely even need Bluez, you pretty much
write() to your chip the raw data packets...

you dont need this to send HCI commands, and definitely not if your bt
controller is not a CSR chip

Thanks
David

> King regards
>
> Patrick
>
>> -----Message d'origine-----
>> De : Marcel Holtmann [mailto:[email protected]]
>> Envoy? : jeudi 29 janvier 2009 09:12
>> ? : X-PELAGE.Patrick
>> Objet : Re: csr_h4.c
>>
>> Hi,
>>
>>>
>>> I am reading and try to udestand the csr_h4.c source file.
>>>
>>> 1- What is the "varid" argument of "csr_read" and "csr_write"
>>> functions? is it the HCI packet type, identified in HCI
>> UART TRANSPORT
>>> LAYER?
>>> 2- How to used the csr_h4.c file? that is to say, the main
>> function,
>>> if I want to send an HCI packet using H4?
>>> 3- What is the meaning of "uin16_t command" in "do_command"
>> function?
>>
>> use [email protected] for such questions.
>>
>> Regards
>>
>> Marcel
>>
>>
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-
> bluetooth" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>