Search found 35 matches

by User4356
Sun May 30, 2021 9:22 pm
Forum: General Discussion
Topic: ESP_GATTS_DISCONNECT_EVT event does not occur
Replies: 0
Views: 1724

ESP_GATTS_DISCONNECT_EVT event does not occur

Hello. In my project, the esp32 device acts as a server and the client program connects to it from the phone on the android. If the program on android crashes, the remote esp32 device thinks that the connection is still open and the ESP_GATTS_DISCONNECT_EVT event does not occur. Tell me, how can I d...
by User4356
Thu Apr 22, 2021 3:42 pm
Forum: ESP-IDF
Topic: How GATT server can distinguish between connecting devices
Replies: 12
Views: 11593

Re: How GATT server can distinguish between connecting devices

I've read the Espressif tutorials several times already, but your first tutorial is very helpful! Wonderful! Sumptuously! You know, I saw your questions on github in 2017, it's a shame that people there were trying to answer your questions instead of showing this amazing Tutorial! It was very bad of...
by User4356
Thu Apr 22, 2021 2:13 am
Forum: ESP-IDF
Topic: How GATT server can distinguish between connecting devices
Replies: 12
Views: 11593

Re: How GATT server can distinguish between connecting devices

Let's read the specification carefully: https://www.oreilly.com/library/view/getting-started-with/9781491900550/ch04.html#gatt_svc_disc Additionally, CCCDs have two special properties that separate them from other attributes: Their values are unique per connection In multi-connection scenarios, in w...
by User4356
Wed Apr 21, 2021 8:53 pm
Forum: ESP-IDF
Topic: How GATT server can distinguish between connecting devices
Replies: 12
Views: 11593

Re: How GATT server can distinguish between connecting devices

Thank you for reply. As I understand it, the table of characteristics is one for the entire device. And after writing to the CCC descriptor by one client, the server will not be able to determine which client did it. At the time of writing, server can get the id of the connection, but this is approx...
by User4356
Wed Apr 21, 2021 6:13 pm
Forum: ESP-IDF
Topic: How GATT server can distinguish between connecting devices
Replies: 12
Views: 11593

Re: How GATT server can distinguish between connecting devices

I ask you twice for a reason. The esp32 API function for sending notifications has a connection id parameter: esp_ble_gatts_send_indicate(gatts_if, conn_id, attr_handle, value_len, value, need_confirm); What is it for there, if the server sends notifications broadcast? Maybe this is some other notif...
by User4356
Tue Apr 20, 2021 11:34 pm
Forum: ESP-IDF
Topic: How GATT server can distinguish between connecting devices
Replies: 12
Views: 11593

Re: How GATT server can distinguish between connecting devices

Does this mean that the server sends notifications to everyone at once, broadcast? Or does the server store the ids of connections of devices that want to listen to the notification and sends the data personally to each client?
by User4356
Tue Apr 20, 2021 5:12 pm
Forum: ESP-IDF
Topic: How GATT server can distinguish between connecting devices
Replies: 12
Views: 11593

Re: How GATT server can distinguish between connecting devices

Yes, it looks very logical. I didn’t do that, because I’m not sure about how libraries work, and I have nowhere to ask. Will the server be sure to send a notification to the client that requested notifications, or will it send notifications to all clients? The characteristic has only a descriptor fo...
by User4356
Tue Apr 20, 2021 3:53 pm
Forum: ESP-IDF
Topic: How GATT server can distinguish between connecting devices
Replies: 12
Views: 11593

Re: How GATT server can distinguish between connecting devices

In my project, two clients are connected to the same server at the same time (thanks for esp32 that allows this). One of the clients sends values ​​to the server, and the server must send notifications to the other client. The task is for the server to know who is who of its clients and send notific...
by User4356
Tue Apr 20, 2021 3:43 pm
Forum: ESP-IDF
Topic: How can I read attribute property?
Replies: 2
Views: 3358

Re: How can I read attribute property?

Thank you for reply. Does the characteristic is the exacly what I wrote in gatts_profile_inst table? Than why exist esp_ble_gatts_set_attr_value and esp_ble_gatts_get_attr_value functions? is there any difference in the fact that I will directly read and write characteristic values (.value) to the s...
by User4356
Mon Apr 12, 2021 2:16 am
Forum: ESP-IDF
Topic: How GATT server can distinguish between connecting devices
Replies: 12
Views: 11593

How GATT server can distinguish between connecting devices

There is a GATT server. Different GATT clients connect to it at different times. Is there a way to find out the name of the client's device or otherwise distinguish them?