Linux bluetooth development
 help / color / mirror / Atom feed
From: "Stotland, Inga" <inga.stotland@intel.com>
To: "anupam.r@samsung.com" <anupam.r@samsung.com>
Cc: "dh79.pyun@samsung.com" <dh79.pyun@samsung.com>,
	"semun.lee@samsung.com" <semun.lee@samsung.com>,
	"nitin.j@samsung.com" <nitin.j@samsung.com>,
	"linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>,
	"amit.jaiswal@samsung.com" <amit.jaiswal@samsung.com>
Subject: Re: RE: Re: Mesh Key Refreshment procedure from Config client
Date: Mon, 30 Mar 2020 06:04:58 +0000	[thread overview]
Message-ID: <f10ab3eeb9691d20544d0a65b08027fe2de3c26a.camel@intel.com> (raw)
In-Reply-To: <20200327134742epcms5p46a971a1f5653956a287898e01a296dee@epcms5p4>

Hi Anupam,

On Fri, 2020-03-27 at 19:17 +0530, Anupam Roy wrote:
>  
> Hi Inga,
> 
> > --------- Original Message ---------
> > Sender : Anupam Roy <
> > anupam.r@samsung.com
> > > Staff Engineer/Application S/W Group /SRI-Delhi/Samsung
> > Electronics
> > Date : 2020-03-27 11:07 (GMT+5:30)
> > Title : RE: Re: Mesh Key Refreshment procedure from Config client
> > 
> > Hi Inga,
> > 
> > > Hi Anupam,
> > > 
> > > On Thu, 2020-03-26 at 20:22 +0530, Anupam Roy wrote:
> > > > Hi ,
> > > >  Presently, I am trying to check *Key Refreshment Procedure*
> > > > from Mesh Config client.
> > > > 
> > > > For checking the operation, I did following steps
> > > >  - Create Subnet in Config client at Net index 1
> > > >  - Add SubNetKey to Local Node at Net Index 1
> > > >  - Add SubNetKey to Remote Node at Net Index 1
> > > > 
> > > 
> > > Please try to add two steps more here:
> > >   - Update Subnet 1 (subnet-update command in main menu)
> > 
> > I missed mentioning above step in my email. Actually, before
> > updating netkey to remote, I did update local subnet.
> > But yes, I missed out below step (Updating netkey to local node).
> > Will give it a try now. Much thanks!
> > 
> 
> After updating the Netkey to the local node(config client) and then
> to the remote node, I monitored the beaconing key used by local
> config client.
> Please note that since, only two netkeys are at presently configured
> in both the nodes, therefore, the key ID's are 1 (for primary netkey
> at index 0), 2(For Netkey at index 1) & 3(For new NetKey at index 1).
> 
> After NetKey update, The KR phase in both sides are set to 1, but it
> seems, the new key id (which is 3 in this case) is still *NOT used
> for beaconing, by the 'Config Client node'
> Config Client still keeps on beaconing with key ID 1 & 2. Sharing a
> bit of logs for your reference.
> 
> During NetKey Update-
> mesh/cfgmod-server.c:cfg_srv_pkt() CONFIG-SRV-opcode 0x8045 size 18
> idx 000
> key refresh phase 1: Key ID 3
> 
> Beacon Keys after NetKey update on remote Node -
> mesh/net-keys.c:snb_timeout() beacon 2 for 1 nodes, period 30, obs 2,
> exp 3
> mesh/net-keys.c:snb_timeout() beacon 1 for 1 nodes, period 20, obs 2,
> exp 2
> 
> Please share your opinion to check the issue further. Thank You

Indeed, there's a missing functionality in mesh-cfgclient tool: key
refresh phase commands.
The patch set  that I posted today should address the issue:
[PATCH BlueZ 1/2] tools/mesh-cfgclient: Save subnet key refresh phase
[PATCH BlueZ 2/2] tools/mesh-cfgclient: Add commands for Key Refresh
Phase

The beaconing will start  updated network key once the Key Refresh
procedure advances to phase 2:
1. "subnet-set_phase <net_index> 2" from the main menu
2. "kr_phase_set <net_index> 2" from  the config menu (sent to either
local or remote node or both).
     The transition to phase 2 can happen either as a result of a
directly setting a phase on a node or by
     detecting a beacon with KR bit set (which, of course assumes that
at least one node got it's phase set
    directly and that that node has beaconing enabled) .

Similar steps to finish Key Refresh procedure: set phase 3 for subnet
and send phase command to node(s)


>  
> > >   - Update NetKey 1 for a local node (switch to config menu)
> > > 
> > > >  - Update Netkey to remote Node in Net index 1
> > > > 
> > > > After updating the Netkey, I believe, config client has to
> > > > either send out SNB with KeyRefreshment(KR) Flag=1 & secured
> > > > with updated NetKey (i.e by subnet->net_key_upd id)
> > > > or send out "Config Key Refresh Phase Set" with transition
> > > > parameter, set to 2. I could not find the later provision in
> > > > cfgclient menu.
> > > > However, Config Client seems to be not sending out Secure
> > > > Network Beacon as well. So KR procedure seems to be not
> > > > progressing at my setup at present.
> > > > 
> > > > Any hint of what could be missing will be really helpful! Thank
> > > > You.
> > > > 
> > > 
> > > Best Regards,
> > > Inga
> 
> BR,
> -Anupam Roy

  reply	other threads:[~2020-03-30  6:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200304153920epcms5p47e26659f715177b0244f18c71e4b5fed@epcms5p4>
     [not found] ` <CGME20200302125344epcms5p3e31d97ef6263e0513b94f6306536269b@epcms5p2>
     [not found]   ` <20200326144743epcms5p401053700dae86ae93749df5fc77a2807@epcms5p4>
2020-03-26 14:52     ` Mesh Key Refreshment procedure from Config client Anupam Roy
2020-03-27  5:10       ` Stotland, Inga
2020-03-27  5:35         ` Anupam Roy
2020-03-27 13:47           ` Anupam Roy
2020-03-30  6:04             ` Stotland, Inga [this message]
2020-03-31  8:05               ` Anupam Roy
     [not found] <CGME20200302125344epcms5p3e31d97ef6263e0513b94f6306536269b@epcms5p3>
2020-03-02 12:53 ` Regarding OOB authentication method & action for Mesh provisioner Anupam Roy
2020-03-02 14:22   ` Michał Lowas-Rzechonek
2020-03-02 14:55     ` Anupam Roy
2020-03-02 16:56       ` Gix, Brian
2020-03-02 17:15         ` Stotland, Inga
2020-03-02 17:31           ` Gix, Brian
2020-03-03  8:55             ` michal.lowas-rzechonek
2020-03-03  9:18           ` Re: " Anupam Roy
2020-03-03 18:26             ` Gix, Brian
2020-03-04 14:52               ` Anupam Roy

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=f10ab3eeb9691d20544d0a65b08027fe2de3c26a.camel@intel.com \
    --to=inga.stotland@intel.com \
    --cc=amit.jaiswal@samsung.com \
    --cc=anupam.r@samsung.com \
    --cc=dh79.pyun@samsung.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=nitin.j@samsung.com \
    --cc=semun.lee@samsung.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox