Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can application get the chance to handle SecureNetworkBeacon? #402

Open
Wtoto opened this issue Mar 18, 2022 · 5 comments
Open

Can application get the chance to handle SecureNetworkBeacon? #402

Wtoto opened this issue Mar 18, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@Wtoto
Copy link

Wtoto commented Mar 18, 2022

image

The Library handle the SecureNetworkBeacon. But we want control the ivindex update by ourself. So a delegate maybe helpfule.
@philips77 philips77 added the enhancement New feature or request label Mar 18, 2022
@philips77
Copy link
Member

Btw, you may point to a code using a permalink, like that:

case .meshBeacon:
if let beaconPdu = SecureNetworkBeacon.decode(pdu, for: meshNetwork) {
logger?.i(.network, "\(beaconPdu) received (decrypted using key: \(beaconPdu.networkKey))")
handle(secureNetworkBeacon: beaconPdu)
return
}

@philips77
Copy link
Member

Why do you want to handle IVIndex update yourself, if I may ask? Do you need the current IV Index, or want to trigger IV Index Update?

@Wtoto
Copy link
Author

Wtoto commented Mar 21, 2022

We found in some case, the devices send mesh beacon to update the ivindex unexpectedly. So we just want to update ivindex by the provisoner. The ivindex is not updated as soon as the message is received.

@philips77
Copy link
Member

Hi,
I need more information to understand your case.
Are you interested in the current IvIndex? Or when it changes? Or when the Secure Network beacon is received (it may be discarded)?

So we just want to update ivindex by the provisoner. The ivindex is not updated as soon as the message is received.

Of which provisioner? The local one (the phone?)? The IvIndex is updated automatically when Secure Network beacon is received and the IvIndex can be increased (there are some rules when it can happen, see here).

@eanderlind
Copy link

Forwarding to App easy to do - anyone can extend/modify NetworkConnection.bearer(_ bearer: Bearer, didDeliverData data: Data, ofType type: PduType)

Is e.g. useful for App to monitor which subnets are avaiable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants