Closed antoniovillanova closed 4 years ago
Hi @antoniovillanova , so I gave this a try and i was unable to reproduce the same issue as you are facing. I can detail the steps I took just like you had mentioned.
I repeated the process 3 times and it worked 3 out of 3 times. Also I extended the test process by
All messages worked as it should. Have you checked if you are encrypting your message properly on the fw side? If you want me to test against your fw you can create a private ticket on devzone
HI @roshanrajaratnam,
a couple of things about the steps you mentioned.
Thank you!
Furthermore, reading Bluetooth spec about Mesh Message encryption, both sequence number and IV Index are involved.
I know there will be a patch next week involving a bug fix you have on IV index handling. So both this and restoring Android previous provisioner (and its sequence number) could possibly cause the exception. Am i right?
Thank you again.
// FYI: IV Index Update has now been fix in the iOS library. It's on develop branch, not pushed to master yet. We are working on implementing the same on Android.
@antoniovillanova the current iv index patch will not affect this as long as you don't have run out of sequence numbers. I don't think this is the case for you since your issue occurs right after provisioning and for an IV Index update to take place the network have to function at least around 192 hours if i'm not completely wrong so I will exclude this case. Coming back to your original issue I will try to give this a spin this evening and if not first thing in the morning tomorrow. Also it will be really helpful if you can give me a detailed description of the exact steps to reproduce this. For now I will try with the steps you suggested previously by binding keys using Android.
Controlling vendor model was done with an unacked message but I don't remember to be honest so I can re-run it for you.
When switching back to the Android device it is the same original provisioner used for provisioning process.
However I should note that you cannot use the same provisioner in two different devices. It has to be two different provisioners as the sequence number is not exported in Json file, i.e. provision on Android with one provisioner and after importing on iOS it has to be a different provisioner that has to send your message. The sample iOS app handles this automatically when importing a network which means that a new provisioner will be created.
We're using two different provisioners. The thing is:
When exporting sequence number from iOS, do you get the value from UserDefaults at key "S\(address.hex)"
(mind the S
inside)?
I'll add methods to obtain and update sequence numbers on iOS.
When exporting sequence number from iOS, do you get the value from UserDefaults at key
"S\(address.hex)"
(mind theS
inside)?
Hi, on iOS we recreate a new provisioner with a different address each time, hence I don't read or write any sequence. I just keep the android sequence on the cloud backup without modifying it.
I'll add methods to obtain and update sequence numbers on iOS.
This would certainly help. Do you think this issue is caused by this cross platform sequence management?
Thanks
I don't know but you requested it anyway. I will discourage using it on doc, but want people to use it correctly.
@fiveagle @antoniovillanova sorry for the delay but have been a bit busy with handling the IV Index update. I believe it's something to do with cross platform sequence management don't know for sure though. In-order to clarify do you know if the same happens with SigModels? or does this happen only on VendorModels?
I couldn't test with SigModels. Could you please provide me more details on how i can execute this test?
Furthermore i've some other question:
Thank you.
@antoniovillanova I was referring to the same test you did on vendor models.
- Not sure what you mean exactly here.
Yep, sorry i edited.
If you'll manage to find the issue, will be released a patch for the actual version too?
Thank you
@antoniovillanova I have retried to reproduce this issue but it does not happen in our side. After configuring and controlling from Android and importing to iOS, the iOS app uses the default provisioner created in the app. We do not export sequence numbers and is not recommended so there is no chance of using the same provisioner that was used on the Android side. After switching to the Android phone the app it will continue using the same provisioner and the same sequence number as it last used so there will be no new provisioner created.
I have updated the api in this case where you can set the sequence number of a provisioner node. So you do not have to re-create the same provisioner as @fiveagle has mentioned. You can use the provisionerUuid
to locate the node of the provisioner from the node list in the network and call node.setSequenceNumber
to update the sequence number of that node.
I also suggest to try out 2.2.2 version of the library once it's released as it will contain some important fixes related to Secure Network Beacon handling.
@antoniovillanova have you managed to solve your issue?
@antoniovillanova closing due to inactivity!
Describe the bug We have the scenario in which same Mesh Network can be edited on both Android and iOS devices. We managed to successfully restore Mesh Network with import and export built-in procedures, by creating different provisioners for each device and platform. The issue we're facing is that after iOS can succesfully get the response after sending a Vendor Model Message, Android receives the Exception i reported below in Logs / Screenshots section. Only powering the BT peripheral off and back on seems to fix the issue on the Android side.
To Reproduce Steps to reproduce the behavior:
Expected behavior Successfully read response value
Platform details:
Logs / Screenshots