2012-07-05 06:00:54

by victor yeo

[permalink] [raw]
Subject: BT LMP

Hi,

Anyone know which part of linux kernel processes the LMP au_rand and
LMP not_accepted event?

I want to modify the Bluetooth kernel code so that when it receives
LMP not_accepted event, it will do re-pairing.

Thanks,
Victor


2012-07-05 10:19:19

by Keren, Doron

[permalink] [raw]
Subject: RE: BT LMP



> -----Original Message-----
> From: victor yeo [mailto:[email protected]]
> Sent: Thursday, July 05, 2012 12:10 PM
> To: Keren, Doron
> Cc: [email protected]
> Subject: Re: BT LMP
>
> On Thu, Jul 5, 2012 at 4:25 PM, Keren, Doron <[email protected]> wrote:
> > Hi Victor,
> >
> > The LMP not_accepted event will lead to Authentication failure.
> > Some devices will then initiate disconnection with error code :
> > Authentication Failure error code (0x05).
> >
> > Thanks,
> > Doron Keren
> > Texas Instruments
> >
> >> -----Original Message-----
> >> From: [email protected] [mailto:linux-bluetooth-
> >> [email protected]] On Behalf Of victor yeo
> >> Sent: Thursday, July 05, 2012 10:43 AM
> >> To: Marcel Holtmann
> >> Cc: [email protected]
> >> Subject: Re: BT LMP
> >>
> >> Hi Marcel,
> >>
> >> When LMP_not_accepted is received by Bluetooth Chip's firmware, it
> >> will send a HCI event to the linux kernel bluetooth portion. Do i
> >> understand correctly? What is the HCI event name?
> >>
> >> Thanks,
> >> Victor
> >>
> >> On Thu, Jul 5, 2012 at 3:20 PM, Marcel Holtmann <[email protected]>
> >> wrote:
> >> > Hi Victor,
> >> >
> >> >> Anyone know which part of linux kernel processes the LMP au_rand and
> >> >> LMP not_accepted event?
> >> >>
> >> >> I want to modify the Bluetooth kernel code so that when it receives
> >> >> LMP not_accepted event, it will do re-pairing.
> >> >
> >> > LMP is implemented in the Bluetooth chip's firmware and not the
> kernel.
> >> >
> >> > Regards
> >> >
> >> > Marcel
> >> >
> >> >
> >> --
>
> Hi Doron,
>
> Will the hci_auth_complete_evt() function in net/bluetooth/hci_event.c
> handle the hci error code?
>
> Thanks,
> Victor

Hi Victor,

As I can read in the code the hci_auth_complete_evt() call mgmt_auth_failed() on failure. The mgmt_auth_failed() function just prints
The fail status number. You can add your own code to do re-pairing several times.

Thanks,
Doron

2012-07-05 09:10:00

by victor yeo

[permalink] [raw]
Subject: Re: BT LMP

On Thu, Jul 5, 2012 at 4:25 PM, Keren, Doron <[email protected]> wrote:
> Hi Victor,
>
> The LMP not_accepted event will lead to Authentication failure.
> Some devices will then initiate disconnection with error code :
> Authentication Failure error code (0x05).
>
> Thanks,
> Doron Keren
> Texas Instruments
>
>> -----Original Message-----
>> From: [email protected] [mailto:linux-bluetooth-
>> [email protected]] On Behalf Of victor yeo
>> Sent: Thursday, July 05, 2012 10:43 AM
>> To: Marcel Holtmann
>> Cc: [email protected]
>> Subject: Re: BT LMP
>>
>> Hi Marcel,
>>
>> When LMP_not_accepted is received by Bluetooth Chip's firmware, it
>> will send a HCI event to the linux kernel bluetooth portion. Do i
>> understand correctly? What is the HCI event name?
>>
>> Thanks,
>> Victor
>>
>> On Thu, Jul 5, 2012 at 3:20 PM, Marcel Holtmann <[email protected]>
>> wrote:
>> > Hi Victor,
>> >
>> >> Anyone know which part of linux kernel processes the LMP au_rand and
>> >> LMP not_accepted event?
>> >>
>> >> I want to modify the Bluetooth kernel code so that when it receives
>> >> LMP not_accepted event, it will do re-pairing.
>> >
>> > LMP is implemented in the Bluetooth chip's firmware and not the kernel.
>> >
>> > Regards
>> >
>> > Marcel
>> >
>> >
>> --

Hi Doron,

Will the hci_auth_complete_evt() function in net/bluetooth/hci_event.c
handle the hci error code?

Thanks,
Victor

2012-07-05 08:25:19

by Keren, Doron

[permalink] [raw]
Subject: RE: BT LMP

Hi Victor,

The LMP not_accepted event will lead to Authentication failure.
Some devices will then initiate disconnection with error code :
Authentication Failure error code (0x05).

Thanks,
Doron Keren
Texas Instruments

> -----Original Message-----
> From: [email protected] [mailto:linux-bluetooth-
> [email protected]] On Behalf Of victor yeo
> Sent: Thursday, July 05, 2012 10:43 AM
> To: Marcel Holtmann
> Cc: [email protected]
> Subject: Re: BT LMP
>
> Hi Marcel,
>
> When LMP_not_accepted is received by Bluetooth Chip's firmware, it
> will send a HCI event to the linux kernel bluetooth portion. Do i
> understand correctly? What is the HCI event name?
>
> Thanks,
> Victor
>
> On Thu, Jul 5, 2012 at 3:20 PM, Marcel Holtmann <[email protected]>
> wrote:
> > Hi Victor,
> >
> >> Anyone know which part of linux kernel processes the LMP au_rand and
> >> LMP not_accepted event?
> >>
> >> I want to modify the Bluetooth kernel code so that when it receives
> >> LMP not_accepted event, it will do re-pairing.
> >
> > LMP is implemented in the Bluetooth chip's firmware and not the kernel.
> >
> > 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

2012-07-05 07:42:45

by victor yeo

[permalink] [raw]
Subject: Re: BT LMP

Hi Marcel,

When LMP_not_accepted is received by Bluetooth Chip's firmware, it
will send a HCI event to the linux kernel bluetooth portion. Do i
understand correctly? What is the HCI event name?

Thanks,
Victor

On Thu, Jul 5, 2012 at 3:20 PM, Marcel Holtmann <[email protected]> wrote:
> Hi Victor,
>
>> Anyone know which part of linux kernel processes the LMP au_rand and
>> LMP not_accepted event?
>>
>> I want to modify the Bluetooth kernel code so that when it receives
>> LMP not_accepted event, it will do re-pairing.
>
> LMP is implemented in the Bluetooth chip's firmware and not the kernel.
>
> Regards
>
> Marcel
>
>

2012-07-05 07:20:48

by Marcel Holtmann

[permalink] [raw]
Subject: Re: BT LMP

Hi Victor,

> Anyone know which part of linux kernel processes the LMP au_rand and
> LMP not_accepted event?
>
> I want to modify the Bluetooth kernel code so that when it receives
> LMP not_accepted event, it will do re-pairing.

LMP is implemented in the Bluetooth chip's firmware and not the kernel.

Regards

Marcel