Support,
I have been using the SPS for a while and it works great. I want to enable pairing. When I add: #define CFG_APP_SECURITY to the project and initiate a connection to the DA14580-EVB, the iPhone connects without requesting a pair. Did I miss a step?
I tried the ANCS demo and the phone does request to pair. So I know it can be done, but I don't see the differences.
One more request. When I do get the pairing working. Is there some information that needs to be stored afterwards in non-volatile memory to allow the next connection to remember the pairing? If you could direct me how to get the hooks for that, it would be great.
If all this is documented somewhere, please let me know.
到目前为止你已经帮助很大。
Thanks,
Rich
Keywords:
Device:
Hi Richard,
On the DSPS which is implemented on SDK 5, in order to insert the security feature all you have to do is define the CFG_APP_SECURITY, that will enable your application to request security from the master device. But the DSPS doens't have any security on its characteristics so the central will be able to read/write/notify its characteristics without performing security. So what you can do is to explictly request for security when the device gets connected, you will be able to do that by changing the .security_request_scenario member in the user_default_hnd_conf struct to DEF_SEC_REQ_ON_CONNECT. That will force the central to send you a security request upon connection.
Regarding your second question, yes there are data exchanged while security and you can store those kind of data in a non-volatile memory (the data are retained while the device stays powered but if you power down your device or the device gets reseted then the data will be lost, in that case you should store the data). Please find below some documentation that will cover the implementation of your questions.
1) On the SDK 5.0.4 all the available security implementation are demonstrated and there is an implementation of storing the bonding data in a nv memory.
2) In the tutorial section there is a special tutorial dedicated to security "Tutorial 6: Pairing, Bonding & Security".
3.) Also the Smart Tag application (its based on SDK 3) also implements security and stores the bonding data.
Thanks MT_dialog