Hello,
I have implemented a gatt server in esp-idf V4.3.3 on WROOM module. This server is emulating a BLE SPP server as per esp-idf gatt server example so that smartphones (with the right software) can connect to it. I have implemented pairing + bonding between the module and the smartphone.
Everything is working fine.
Now, I would like to be able to retrieve the name of the client (smartphone) which is connected to my gatt server. So far, I only have its mac address.
I could not find an easy way to get this name.
Could you please help me ?
Many thanks
Thierry
How a gatt server can get th name of a connected gatt client
-
- Posts: 11
- Joined: Tue Jul 23, 2019 12:52 pm
Re: How a gatt server can get th name of a connected gatt client
I went through this same issue previously. I wanted to show a "Bonded Devices" list on my ESP32 product with the names of i.e. cellphones that had paired to it.
I didn't find a standard way to do that. I think it is up to you to add a method at the application level to send a name to the GATT server (peripheral). I.e. add a characteristic that your mobile app can write a string to.
I didn't find a standard way to do that. I think it is up to you to add a method at the application level to send a name to the GATT server (peripheral). I.e. add a characteristic that your mobile app can write a string to.
Re: How a gatt server can get th name of a connected gatt client
Your question made me curious so read a little on gatt connections. It appears like the g... Att... Structure is designed to support what you describe. Here is what I read: https://docs.silabs.com/bluetooth/5.0/g ... ient-roles
Tom
Tom
IT Professional, Maker
Santiago, Dominican Republic
Santiago, Dominican Republic
-
- Posts: 11
- Joined: Tue Jul 23, 2019 12:52 pm
Re: How a gatt server can get th name of a connected gatt client
Thanks Phapaul - I was thinking that there would be some "nominal way" to do this ... But your suggestion makes a lot a sense I will implement it.phatpaul wrote: ↑Thu Apr 20, 2023 6:42 pmI went through this same issue previously. I wanted to show a "Bonded Devices" list on my ESP32 product with the names of i.e. cellphones that had paired to it.
I didn't find a standard way to do that. I think it is up to you to add a method at the application level to send a name to the GATT server (peripheral). I.e. add a characteristic that your mobile app can write a string to.
Best Regards
Who is online
Users browsing this forum: Majestic-12 [Bot] and 146 guests