Get BLE UUID for iOS pairing
Get BLE UUID for iOS pairing
Hi! I'm developing an iOS app and i'm trying to establish BLE connection with the esp32 board but i need a UUID. My main idea is create a random UUID, display it on a QR code, read with the app and go directly to pair with my board. Any idea is really welcomed.
Thanks in advance!
Thanks in advance!
Re: Get BLE UUID for iOS pairing
Does this help? https://www.guidgenerator.com/
Re: Get BLE UUID for iOS pairing
Thank you Franco. My issue is more about how can i set ESP32's UUID and and use that UUID to connect my iOS app directly.
Re: Get BLE UUID for iOS pairing
This is the UUID i'm talking about, I attach this image. Any idea?
Thanks in advance!!
Thanks in advance!!
- Attachments
-
- IMG_1013.jpg (221.12 KiB) Viewed 19000 times
Re: Get BLE UUID for iOS pairing
If you want to set the UUID of the ESP32,You only need to modify the value of uuid.The specific operation depends on the DEMO we provide.
Code: Select all
/* Disable OOB security for SILabs Android app */
static esp_ble_mesh_prov_t provision = {
.uuid = dev_uuid,
#if 0
.output_size = 4,
.output_actions = ESP_BLE_MESH_DISPLAY_NUMBER,
.input_actions = ESP_BLE_MESH_PUSH,
.input_size = 4,
#else
.output_size = 0,
.output_actions = 0,
#endif
};
-
- Posts: 4
- Joined: Fri Apr 03, 2020 2:58 pm
Re: Get BLE UUID for iOS pairing
Is there a way to get the default UUID of the device?
For example the mac I can get default mac using esp_read_mac if no mac was set.
For example the mac I can get default mac using esp_read_mac if no mac was set.
Re: Get BLE UUID for iOS pairing
There is no such thing like default UUID. UUID is set in application.
Re: Get BLE UUID for iOS pairing
Sorry for bringing the topic back on, but the original poster has a point:
While scanning for an ESP32 Advertising device using nRF Scanner (or BLE Scanner) - on Android Phones, you indeed get the MAC address of the device.
However, when you scan for it in iOS using the same apps, you don't get the MAC address, but an UUID of the device (the one highlighted in the screenshot above), which is not service nor characteristic UUID, but some UUID that seems to be embedded in the device's memory somewhere.
While you can use esp_bt_dev_get_address() to get the MAC address, there's no such similar function for the device's UUID (at least not to my knowledge).
That's what the original poster asked, and that's what I'm looking for too - a way to find that UUID using the code (and not external scanning)...
Thanks.
While scanning for an ESP32 Advertising device using nRF Scanner (or BLE Scanner) - on Android Phones, you indeed get the MAC address of the device.
However, when you scan for it in iOS using the same apps, you don't get the MAC address, but an UUID of the device (the one highlighted in the screenshot above), which is not service nor characteristic UUID, but some UUID that seems to be embedded in the device's memory somewhere.
While you can use esp_bt_dev_get_address() to get the MAC address, there's no such similar function for the device's UUID (at least not to my knowledge).
That's what the original poster asked, and that's what I'm looking for too - a way to find that UUID using the code (and not external scanning)...
Thanks.
Re: Get BLE UUID for iOS pairing
16 bit UUIDs are standardized and published by the Bluetooth SIG. So they are known before-hand. They deal with measurements of health, time, temperatures, velocity, etc. Standard stuff useful for everybody.
Nobody could publish all the 32-bit UUIDs. There are more of them than there are stars in the sky. So you need an external interface control document (ICD) or API. Or it needs to be printed on the device. Or a bar code, etc.
But, on the other hand, you don’t need a SIG to approve your UUID. You can invent your own.
It’s a blessing and a curse.
I hope this is what you’re asking.
Nobody could publish all the 32-bit UUIDs. There are more of them than there are stars in the sky. So you need an external interface control document (ICD) or API. Or it needs to be printed on the device. Or a bar code, etc.
But, on the other hand, you don’t need a SIG to approve your UUID. You can invent your own.
It’s a blessing and a curse.
I hope this is what you’re asking.
Re: Get BLE UUID for iOS pairing
Mechanism you described here is internal apple idea for "privacy protection", because using random mac is not good enough to them. It is guid, if I remember correctly, generated by iOS based on something, maybe on device mac, maybe something else. The point is it has nothing to do with bluetooth.adelinu wrote: ↑Sat Jan 16, 2021 9:18 amSorry for bringing the topic back on, but the original poster has a point:
While scanning for an ESP32 Advertising device using nRF Scanner (or BLE Scanner) - on Android Phones, you indeed get the MAC address of the device.
However, when you scan for it in iOS using the same apps, you don't get the MAC address, but an UUID of the device (the one highlighted in the screenshot above), which is not service nor characteristic UUID, but some UUID that seems to be embedded in the device's memory somewhere.
While you can use esp_bt_dev_get_address() to get the MAC address, there's no such similar function for the device's UUID (at least not to my knowledge).
That's what the original poster asked, and that's what I'm looking for too - a way to find that UUID using the code (and not external scanning)...
Thanks.
Of course you can write your own code, which can generate similarly guid and create QR code with it, then you can add such guid in advertising packet or do whatever you want with it.
Who is online
Users browsing this forum: Google [Bot] and 120 guests