It is not just easy to use the BLE of Samsung Galaxy Smartwatch. Because BLE of Samsung Galaxy Smartwatch is designed to work with their intended purposes, such as Samsung Flow software. Reading our previous article on GATT will help to understand the basic things we need to know to work with ESP32.
We need to obtain the BLE hardware address, Service UUID and Characteristic UUID of the server. BLE can be programmed to work either as a server or as a client. Indeed, Samsung Galaxy Smartwatch works both as client and server. For our purpose of the title, we need the Samsung Galaxy Smartwatch to work as a server. Open Google Play on your smartphone and find the application named nRF connect. Install the app. Now open the app. The application has an option to scan BLE hardware.
Now bring your Samsung Smartwatch closer to the smartphone running the application named nRF connect. Rotate the bezel to find the application named “Samsung Flow”. Tap the application to launch. Swipe through the introduction and proceed to the option “manage devices”. It will make the BLE visible to the other devices for a while. You’ll see that the Samsung Smartwatch will appear as a separate tab in the nRF Connect app. It may take a few attempts to find the watch from nRF connect. Ultimately you’ll get something like the below screenshot :
---
You can match the UUID from the official website:
1 2 3 | # https://www.bluetooth.com/specifications/gatt/services/ # |
Get the BLE hardware address from the log option of the nRF Connect application. We need to make the ESP32 to discover the Samsung Smartwatch (BLE server), connect to it and remains paired. In this way, we can set condition via code so that when the pairing will be lost then action will be performed, such as turning off of a relay or LED connected with ESP32. From this part of the guide, we can write three lines :
1 2 3 | static BLEUUID serviceUUID("paste-here"); //Service UUID static BLEUUID charUUID("paste-here"); //Characteristic UUID String My_BLE_Address = "paste-here"; //Hardware Bluetooth MAC of watch |
You can read this PDF :
1 2 3 | # https://github.com/nkolban/esp32-snippets/blob/master/Documentation/BLE%20C%2B%2B%20Guide.pdf # |
Click here to read the part II of this series.
Tagged With samsung proximity watch