This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Mesh v2.0.1 and the light switch proxy server app and provisioning using iOS app - gatt table change issue

Hi

Using the iOS 'nrf Mesh' application I can provision a PCA10056 succesfully.

I have written fimware image that sniffs for mesh related becaons, and when I power up the light switch proxy server app I can see it send PB_ADV beacons and also the PB_GATT beacons.

Great.

Then I provision and I see that at some point the softdevice is reset so that Mesh Proxy beacons are sent which the phone uses to establish the connection and then proceeds to complete the provisioning of the foundation model.

Great.

This means that from beginning to end, the gatt table started with 'mesh provisioning service' and then ended with 'mesh proxy service'. I saw it advertise the appropriate beacons to invite connections from the phone.

The Mesh Profile specification states that both these service shall NOT be present at the same time.

Which means part way through the provisioning process, the softdevice & ble stack was disabled and re-enabled so that the gatt table could be changed.

Because of this gatt table change in my own firmware I can only achieve that by restarting my device by doing a warm reset.

And I find that I can achieve the first part of the provisioning but can never see it complete because the iOS app seems to be getting confused.

I can recreate that in the sample app as follows:-

1) Flash erase the PCA10056

2) open the light switch proxy server application

3) Go to the function prov_evt_handler() in mesh_provisionee.c and comment out the line where gatt_database_reset(); is called

4) Build the app and then run it

5) Start provisioning from phone app

6) see that it gets to about 75% and never goes beyond

7) stop the app in the debugger and exit debug mode

8) now uncomment  gatt_database_reset() so that everything is as it was

9) rebuild and run

10) in the phone app you will see the device when you go to the 'network' screen

11) Reconnect and try to provision -- nothing happens.

I was expecting the phone app to be able to allow me to continue the provisioning process.

You might say that this is an invalid use case. Unfortunately I cannot disable/enable/install new gatt table because I have various context objects that will become invalidated and I have no way of updating them other than by doing a warm reset.

I am hoping that the problem here is that the phone app needs to be able to cater for this.

Look forward to hearing from you

Kind regards

Mahendra

Parents Reply Children
No Data
Related