Sunday, September 7, 2014

Accessing an RFduino using BLE GUI

I was asked how you would access the RFduino using the BLE GUI.  Below are step by step instructions that worked for me.

RFduino Setup

Open the Temperature example sketch in the Arduino IDE and compile and load the sketch.

Reading a Value from the RFduino

Run the BLE GUI software.  This can be done via the icon on the desktop or through the program menu.

When the software runs it will display a windows as shown below.

image

The software should have the COM port that was installed listed as shown in the first red circle.  As long as the right COM port is showing the next step is to select the Attach button as shown in the second red circle.  I was able to use the default baud rate.

When you are successfully connected the Attach button should change to a Detach button and next to the button should be a green Connected as shown below.

image

After you successfully connect to the BLED112 you should select the Start button to start scanning.  The GUI should update and list your RFduino device as shown below.  I only have one BLE device so I am not sure how it would look if you had multiple devices that were all broadcasting.

image

The log window will also show results of the scan.

image

Next you should select the Connect button to connect to the RFduino.

image

Once you are connected the Connect button will change to Disconnect and you should select the GATT button.

image

When the GATT button is selected it will update the GUI including additional commands and a window where the results will be shared.  You should select the Descriptors Discover.

image

The GUI will update and show all the descriptors it found on the RFduino.

image

You can scroll down and select Handle 14.  By selecting the Read button you will read data from the RFduino.  In this case it will be the core temperature.

image

The GUI will update with the Raw value stored at Handle 14 and will also print the result in the log window.

image

You have now successfully read the RFduino via your BLED112.

You will want to select the Disconnect button to disconnect from the RFduino and the Detach button to disconnect the GUI from the BLED112.

Thanks to Bluegiga and RFduino for their products and documentation.  If you find something that doesn’t work for you or you have questions please post them as comments and I will get back to you as soon as I can.

4 comments:

Anonymous said...

Hi,

Thank you for your post about connecting RFduino to PC. I am working on project with RFduino as well and I am trying to send data from RFduino to PC.

My question is:
After using BLED112, can you receive those data that you send from RFduino and show it on terminal program (such as Putty or hyperterminal)?

Thank you so much

digitalhack said...


I expect you could send data to a terminal program like putty or hyperterminal but it wouldn't be easy.

What are you trying to do?

digitalhack

Unknown said...

Hi digitalhack!

I was wondering about using MATLAB for reading from the serial port, instead of using the SDK directly, or a terminal program like in the comments above.

The advantages are plenty, isn't it? But would it be necessary to port the SDK for use with MATLAB, or can it be used right away?

digitalhack said...

Anirudh,

I don't have any experience with MATLAB but as long as you can send and receive binary data to and from a serial port it should work. You wouldn't need to port the SDK but you would need to figure out someway to send and receive packets like the SDK does.

Hope this helps,

digitalhack