ESP32 128-bit UUID

surajnagulamalyala
Posts: 24
Joined: Tue Jul 27, 2021 2:18 pm

ESP32 128-bit UUID

Postby surajnagulamalyala » Wed May 25, 2022 2:02 pm

Greetings of the day,

Present am working on Gatt Client Example from ESP-IDF V4.4.1, am trying to connect to server by using 128-bit Service UUID
am using below structure method given in example code to copy 16bytes into structure member

static esp_bt_uuid_t remote_filter_service_uuid= {
.len = ESP_UUID_LEN_128,
.uuid = {.uuid128 = {0xfb,0x34,0x9b,0x5f,0x80,0x00,0x00,0x80,0x00,0x10,0x00,0x00,0xe9,0xfe,0x00,0x00 },},
};
using "memcmp(remote_filter_service_uuid.uuid.uuid128, gatts_service_uuid128, ESP_UUID_LEN_128)" to copy all bytes
Is this the correct method to copy array of elements into structure variable ? and am unable to read "128-bit Service UUID"

1)Can I use memcpy function to copy all bytes or is there any other process to copy bytes into structure member ?
2) There are 2 methods provided in ESPRESSIF forum, can i go through using README.MD or Gatt Client Example ?
please provide me the solution as soon as possible, this could help me alot to come out of these issue.


Thanking you sir,
Suraj,N

ESP_Minatel
Posts: 361
Joined: Mon Jan 04, 2021 2:06 pm

Re: ESP32 128-bit UUID

Postby ESP_Minatel » Wed Jun 01, 2022 9:53 am

Hi,

Our example describes the 128-bit UUID. Have you tried already?

surajnagulamalyala
Posts: 24
Joined: Tue Jul 27, 2021 2:18 pm

Re: ESP32 128-bit UUID

Postby surajnagulamalyala » Wed Jun 01, 2022 10:10 am

Greetings of the day,

Yes, I made changes as per example code you provided, but am unable to read/get packet from BLE Server (QN9080 MCU) to BLE Client (ESP32), what are the changes need to be done beyond provided in example code ? to enable Client Notification, Receive packet/data in client,

1) Is memcpy function necessary when using 128-bit UUID ?, How to use or define 128-bit UUID ?

2) There are 2 methods provided in ESPRESSIF getting started guide, Can i go through using README.MD or Gatt Client Example tutorial? there is a bit difference in both of them ...

Please try to solve my issue ASAP

Thanking you
Suraj, N

surajnagulamalyala
Posts: 24
Joined: Tue Jul 27, 2021 2:18 pm

Re: ESP32 128-bit UUID

Postby surajnagulamalyala » Wed Jun 22, 2022 12:34 pm

Greetings of the day,

Yes, I made changes as per example code you provided, but am unable to read/get packet from BLE Server (QN9080 MCU) to BLE Client (ESP32), what are the changes need to be done beyond provided in example code ? to enable Client Notification, Receive packet/data in client,

1) Is memcpy function necessary when using 128-bit UUID ?, How to use or define 128-bit UUID ?

2) There are 2 methods provided in ESPRESSIF getting started guide, Can i go through using README.MD or Gatt Client Example tutorial? there is a bit difference in both of them ...

Please try to solve my issue ASAP

Thanking you
Suraj, N

Craige Hales
Posts: 94
Joined: Tue Sep 07, 2021 12:07 pm

Re: ESP32 128-bit UUID

Postby Craige Hales » Wed Jun 22, 2022 1:30 pm

make sure you are using memcpy, not memcmp.
using "memcmp(remote_filter_service
Craige

surajnagulamalyala
Posts: 24
Joined: Tue Jul 27, 2021 2:18 pm

Re: ESP32 128-bit UUID

Postby surajnagulamalyala » Wed Jun 22, 2022 2:10 pm

Hi Craige Hales,

Greetings of the day,

Yes, am using memcpy function as you said, am able to connect to server but am not able to find remote service id's (128-bit)
Please once check the below code (main.c file) and data out in serial terminal also (log.txt)

Please try to solve my issue ASAP

Thanking you
Suraj,N
Attachments
LOG.PNG
LOG.PNG (16.74 KiB) Viewed 8466 times
main.c
(25.48 KiB) Downloaded 213 times

Who is online

Users browsing this forum: Baidu [Spider], Majestic-12 [Bot], StuartsProjects and 106 guests