How to encrypt the "gatt_server" Bluetooth program?

Daniel
Posts: 28
Joined: Tue Jan 09, 2018 12:55 pm

How to encrypt the "gatt_server" Bluetooth program?

Postby Daniel » Sat Dec 15, 2018 1:39 am

How to encrypt the "gatt_server" https://github.com/espressif/esp-idf/tr ... att_serverBluetooth program? Just like the example "gatt_security_serverhttps://github.com/espressif/esp-idf/tr ... ity_server".

thanks,
Daniel
Last edited by Daniel on Mon Dec 17, 2018 1:16 am, edited 1 time in total.

chegewara
Posts: 2376
Joined: Wed Jun 14, 2017 9:00 pm

Re: How to encrypt the "gatt_server" Bluetooth program with two Bluetooth services?

Postby chegewara » Sat Dec 15, 2018 11:37 am

Here is your answer.
Daniel wrote: Just like the example "gatt_security_serverhttps://github.com/espressif/esp-idf/tr ... ity_server".
What else do you want to know or what you dont understand?

Daniel
Posts: 28
Joined: Tue Jan 09, 2018 12:55 pm

Re: How to encrypt the "gatt_server" Bluetooth program with two Bluetooth services?

Postby Daniel » Mon Dec 17, 2018 1:27 am

chegewara wrote:
Sat Dec 15, 2018 11:37 am
Here is your answer.
Daniel wrote: Just like the example "gatt_security_serverhttps://github.com/espressif/esp-idf/tr ... ity_server".
What else do you want to know or what you dont understand?
When I encrypt with two services Bluetooth, there are two cases:
On the IOS system: the first connection is successful, but the second time you must ignore the device in the settings, otherwise you will not be able to connect to it again the second time.
On Android: Everything is connected properly on Android.
The software used is "nrf connect".
This is my previous result.
But now,when I wrote the encrypted program, I found that I didn't know how to put the encrypted code in the right place. It is also very different from the encryption of "gatt_security_server"https://github.com/espressif/esp-idf/tr ... ity_server .
My question is that if I want to encrypt the "gatt_server" demo,how do I put the encryption code in the correct location, just like "gatt_security_server"? I think their encryption methods are very different, because the Bluetooth encryption of a service is very different from the two services.
Thanks
Daniel

chegewara
Posts: 2376
Joined: Wed Jun 14, 2017 9:00 pm

Re: How to encrypt the "gatt_server" Bluetooth program?

Postby chegewara » Mon Dec 17, 2018 9:15 am

Hi,
there is no difference between setting up secure connection for one or many services, because you dont secure services. Service is just logical unit that aggregates characteristics.

Now, you may want or not to secure characteristics and descriptors with proper permission access (read/write with or without authentication). When you setup characteristic with authentication then authentication process will start on first read/write characteristic. Therefor you have also gap authentication process you may want or not to add. In this case authentication will be requested on connection.

Daniel
Posts: 28
Joined: Tue Jan 09, 2018 12:55 pm

Re: How to encrypt the "gatt_server" Bluetooth program with two Bluetooth services?

Postby Daniel » Tue Mar 05, 2019 7:07 am

Daniel wrote:
Mon Dec 17, 2018 1:27 am
chegewara wrote:
Sat Dec 15, 2018 11:37 am
Here is your answer.
Daniel wrote: Just like the example "gatt_security_serverhttps://github.com/espressif/esp-idf/tr ... ity_server".
What else do you want to know or what you dont understand?
When I encrypt with two services Bluetooth, there are two cases:
On the IOS system: the first connection is successful, but the second time you must ignore the device in the settings, otherwise you will not be able to connect to it again the second time.
On Android: Everything is connected properly on Android.
The software used is "nrf connect".
This is my previous result.
But now,when I wrote the encrypted program, I found that I didn't know how to put the encrypted code in the right place. It is also very different from the encryption of "gatt_security_server"https://github.com/espressif/esp-idf/tr ... ity_server .
My question is that if I want to encrypt the "gatt_server" demo,how do I put the encryption code in the correct location, just like "gatt_security_server"? I think their encryption methods are very different, because the Bluetooth encryption of a service is very different from the two services.
Thanks
Daniel

Here is the answer ,https://github.com/DanielXie00/gatt_server_3.1.1

Who is online

Users browsing this forum: Bing [Bot] and 76 guests