Skip to content

Windows 10 BLE

Timothy Woo edited this page Dec 17, 2017 · 11 revisions

In this section we will be experimenting with how to communicate with your BLE device with a Windows computer that has built-in Bluetooth 4.0. I've personally tested this with an Asus UX303LN laptop that has Bluetooth 4.0. If you have a PC without built-in Bluetooth you can get a cheap BT 4.0 dongle on Amazon for around $5.

Turn on Bluetooth

This is pretty obvious, but don't forget to do it! To turn on Bluetooth in Windows go to the task bar at the bottom right, click the little "expand" arrow and double click the Bluetooth icon.

[[]]

Alternatively you can go to the Start menu and search "Bluetooth" and click on the first result that pops up.

[[]]

This should now bring you to the Bluetooth settings window:

[[]]

Turn on Bluetooth by clicking the little slide switch so that it's blue:

[[]]

Pair with Reflowduino

Now that you have Bluetooth turned on, click "Add Bluetooth or other device" at the top. This should bring up a window which shows available Bluetooth devices nearby, including your Reflowduino.

[[]]

Click on "Reflowduino" and it will prompt you to enter a passcode to pair with it. Enter "123456" (without quotes) and click "Connect":

[[]]

You should now see the Reflowduino appear in the list of "Other devices":

[[]]

Windows BLE Application

Unfortunately by default we can't just create a Bluetooth COM port and talk with the module directly as we could do with traditional Bluetooth 2.0. Instead, we need to get a program that scans and connects to nearby BLE devices. A nice free one I found that works is Bluetooth LE Lab which has a clean interface and works great! Open the link in Microsoft Store, download and install it, and open it. You should be greeted by a screen that shows the Reflowduino.

[[]]

Select the Reflowduino and you will see a list of services and characteristics. Look for the characteristic "0000FFE1-0000-1000-8000-00805F9B34FB". Note that you can deselect the "services" box to make it easier to locate this characteristic.

[[]]

Optionally at the top right you can rename the characteristic to something like "TX/RX" to make it easier to identify in the future:

[[]]

Now you're ready to start communicating with the Reflowduino via Bluetooth, but let's get some stuff set up on the Reflowduino board first so that we can verify that the two parties are actually communicating!

Reflowduino Setup

Open the code "BT_PC_Control" example sketch and upload it to the Reflowduino. After it uploads, open the serial monitor on the appropriate COM port. This code reads incoming data from the Reflowduino's BLE module and writes it in the serial monitor. You can also send "H" and "L" to turn on/off the red debug LED.

Connect and start communicating!

Now that everything's set up, go back to the Bluetooth LE Lab window and under the characteristic mentioned earlier, make sure "UTF8" or "UTF16" is select, not "Auto":

[[]]

Next, type any letter in the "Writing" field and press "Write" to send the letter to the Reflowduino!

[[]]

In the serial monitor you should see the letter appear:

[[]]

Experiment with different things and have fun!

Clone this wiki locally