• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Samsung Smartwatch as Proximity Switch : Part III

By Abhishek Ghosh February 20, 2020 9:56 am Updated on March 9, 2020

Samsung Smartwatch as Proximity Switch : Part III

Advertisement

Instead of publishing a single article on a complex matter, we split into parts. This methodology makes the thing boring to the initial readers but in the long term, the readers can browse our website and fix themselves. In the previous two parts of this topic (here is part I and here is part II), we created the base with theory and practical so that even an unused reader does not get confused or need to web search to get our code working.

In this part of the guide, we are providing a basic code which will respond to any nearby BLE device including Samsung Smartwatch. This code has no MAC address filtering. We found this code on GitHub as Gist published by wybiral.

Upload the above code to ESP32 configured as Arduino. Whenever you’ll bring your Samsung Smartwatch (with Bluetooth ON) closer to it, the onboard blue LED of ESP32 will glow. The code is non-specific to the MAC address of Samsung Smartwatch. The code gives the idea “It Works!”. The variable “const int CUTOFF” is for adjusting the distance. -60 is a value which is quite closer.

Advertisement

---

Samsung Smartwatch as Proximity Switch

How we will filter the devices and make ESP32 respond to only our watch? We have to inform the ESP32 about the BLE address, Service and characteristic UUID that we obtained through the nRF connect mobile application as explained in the previous guides. Part of the extra snippets will look like below :

Vim
1
2
3
static BLEUUID serviceUUID("paste-the-number"); //Service UUID of the watch we got through nRF connect mobile application, optional to pair
static BLEUUID charUUID("paste-the-number"); //Characteristic UUID of the watch we got through nRF connect mobile application, optional to pair
String My_BLE_Address = "paste-the-number"; //Hardware Bluetooth MAC address of the watch,

Now, when our watch will find the devices by scanning, our code should start to check if the discovered BLE address matches with the one which we entered in the code. But, ultimately we have to make the ESP32 to act as a client and then connect to the address of the BLE server.

Click here to read the forth part of this series.

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Samsung Smartwatch as Proximity Switch : Part III

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • Samsung Smartwatch as Proximity Switch : Part I

    We Can Use BLE of Samsung Smartwatch to Work as Proximity Switch Created With ESP32 Arduino for Automation of Lights in a Room.

  • Samsung Smartwatch as Proximity Switch : Part IV

    In the previous part of this topic (here is part III), we provided a sample code to create a basic BLE scanner. The code makes the ESP32’s on-board LED to turn on whenever the watch comes in proximity. In our earlier parts of this series, we talked about filtering the MAC address and practical matters […]

  • Samsung Smartwatch as Proximity Switch : Part II

    This second part of the guide (here is the first part) ideally should have the working code matching with the title! But, ESP32 with Arduino IDE is not completely bug-free with BLE. So, instead of directly going to the topic, it will be practical for us to show some basic example codes which the readers […]

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy