All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ajay <ajay.kv@globaledgesoft.com>
To: Anderson Lizardo <anderson.lizardo@openbossa.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: BLE issue: Start_LE_Encryption fails
Date: Sun, 09 Dec 2012 07:29:36 +0530	[thread overview]
Message-ID: <50C3F088.2090203@globaledgesoft.com> (raw)
In-Reply-To: <CAJdJm_Miiidw08Tk2-6mtoDFQ0uhyez=H+NKRK-2UYjyTQ9d1A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3219 bytes --]

On Thursday 06 December 2012 04:20 PM, Anderson Lizardo wrote:
> Hi Ajay,
>
> On Tue, Dec 4, 2012 at 2:49 PM, Ajay <ajay.kv@globaledgesoft.com> wrote:
>> SLAVE side
>>
>> root@test:/home#  hcitool -i hci0 cmd 0x08 0x0008 03 02 01 06 \
>>
>>                          $(perl -e 'print "00 " x 28')
>> root@test:/home# hciconfig hci0  leadv
>>
>>
>> Hcidump shows ..
>>
>> < HCI Command: LE Set Advertising Data (0x08|0x0008) plen 32
>>> HCI Event: Command Complete (0x0e) plen 4
>>      LE Set Advertising Data (0x08|0x0008) ncmd 1
>>      status 0x00
>> < HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1
>>> HCI Event: Command Complete (0x0e) plen 4
>>      LE Set Advertise Enable (0x08|0x000a) ncmd 1
>>      status 0x00
>>
>>> HCI Event: LE Meta Event (0x3e) plen 19
>>      LE Connection Complete
>>        status 0x00 handle 64, role slave
>>        bdaddr 00:02:72:D6:AB:AD (Public)
>>> ACL data: handle 64 flags 0x02 dlen 11
>>      ATT: Read By Group req (0x10)
>>        start 0x0001, end 0xffff
>>        type-uuid 0x2800
>
> Your slave device is not answering to the Read By Group request,
> therefore the master side is disconnecting due to timeout.
>
> I suggest you first try using gatttool on the master side to connect
> to the slave, and run "primary" to see if it is processing GATT
> requests.
>
> The bluez log from the slave side should help (I assume you are
> running BlueZ on the slave side).
>
> Regards,
>


Hi,
     I tried  "gatttool  -i hci0 -b <remote bdaddr> --primary " on 
master side  ,which creates   LE link and very next moment disconnects . 
How can i change the security level  of the link to medium?. still 
struggling to pair the device  (atleast "smp just works") ) . Is my 
kernel supportive (3.2.5)

	  few lines of code from the kernel (/net/bluetooth/smp.c)
	

int smp_conn_security(struct l2cap_conn *conn, __u8 sec_level)
{
         struct hci_conn *hcon = conn->hcon;
         struct smp_chan *smp = conn->smp_chan;

         BT_DBG("conn %p hcon %p level 0x%2.2x", conn, hcon, sec_level);

         if (!lmp_host_le_capable(hcon->hdev))
                 return 1;

         if (sec_level == BT_SECURITY_LOW)
                 return 1;

         if (hcon->sec_level >= sec_level)
                 return 1;

         if (hcon->link_mode & HCI_LM_MASTER)
                 if (smp_ltk_encrypt(conn))
                         goto done;

         if (test_and_set_bit(HCI_CONN_LE_SMP_PEND, &hcon->pend))
                 return 0;

         smp = smp_chan_create(conn);

         if (hcon->link_mode & HCI_LM_MASTER) {
                 struct smp_cmd_pairing cp;

                 build_pairing_cmd(conn, &cp, NULL, SMP_AUTH_NONE);
                 smp->preq[0] = SMP_CMD_PAIRING_REQ;
                 memcpy(&smp->preq[1], &cp, sizeof(cp));

                 smp_send_cmd(conn, SMP_CMD_PAIRING_REQ, sizeof(cp), &cp);


	Every time on LE create connection  process 	i	,smp_conn_security() 
getting called from hci layer .
   But  if(host_le_capable(hcon->hdev))
                 return 1;
condition returns without even checking the security level . so kindly 
show me the right way..	

   	

-- 
Thanks & Regards

  AJAY KV
  GlobalEdge software Ltd
  8892753703

[-- Attachment #2: ajay_kv.vcf --]
[-- Type: text/x-vcard, Size: 74 bytes --]

begin:vcard
fn:AJAY KV
n:;AJAY
tel;cell:8892753703
version:2.1
end:vcard


  reply	other threads:[~2012-12-09  1:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-28 17:08 BLE issue: Start_LE_Encryption fails Ajay
     [not found] ` <CAJdJm_MXB71MTcbrViLh486RtpWpx+a7SDvUPdSj2VdOa1fWvw@mail.gmail.com>
2012-10-30 11:50   ` Anderson Lizardo
2012-10-29  0:30     ` Ajay
2012-10-30 13:12       ` Anderson Lizardo
2012-10-29  1:33         ` Ajay
2012-10-30 14:15           ` Anderson Lizardo
2012-12-04 18:49             ` Ajay
2012-12-06 10:50               ` Anderson Lizardo
2012-12-09  1:59                 ` Ajay [this message]
2012-12-10 15:18                   ` Anderson Lizardo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50C3F088.2090203@globaledgesoft.com \
    --to=ajay.kv@globaledgesoft.com \
    --cc=anderson.lizardo@openbossa.org \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.