Introduction: Solving LinkIt ONE’s Bluetooth Connectivity

About: Biomedical Engineer

As many of you should know by now, the LinkIt ONE has quite a lot of features, including internal WiFi, bluetooth, GSM and GPRS, but in a few of the Instructables here, I saw that people were using the external HC-05 bluetooth module, in place of the LinkIt ONE’s internal bluetooth. This was because few Android apps are compatible with the LinkIt ONE’s bluetooth.

I myself could not connect my LinkIt ONE via bluetooth to the BlueTerm application, so then I had to find an alternate one. Using the hints in the Mediatek Developers Guide, I modified the Bluetooth chat sample app and made an application which could interact with the LinkIt ONE.

Note: The main change which enables BT apps to work with the LinkIt ONE is given in the developers guide. I have attached a screen-shot of that above. You can look at that and change it in your own apps, as advised by Instructable user "IAmBruce". Along with that, I have also changed the interface of the bluetooth chat application according to the material design guidelines, which is completely optional if you want to make your apps work with the LinkIt ONE's internal bluetooth.

In this Instructable, I will tell you how to overcome the connection problem, by using my bluetooth terminal Android application for the LinkIt ONE. This way, you will not need to connect other external bluetooth modules to your LinkIt ONE, rather you can use the LinkIt ONE’s internal bluetooth, as intended by MediaTek.

Step 1: Installing the Application

Download the attached apk and then install it. Make sure you have enabled installing 3rd party applications, in your device settings.

Note: This application will work only with Android 4.0.3 and above.

Once you have installed the application successfully, move on.

Step 2: Testing the Application

We need a way to test the application. For that, take out your LinkIt ONE and upload the attached code to it. Do not forget to connect the WiFi/BT antenna to your LinkIt ONE.

The code will make the LinkIt ONE initialize a bluetooth server and when a connected client sends “On” or “Off”, the LED on pin 13 will be switched on and off respectively. I have commented on nearly each line of the code to help you understand it, so that you can make modifications to it as necessary.

Remember to select the correct COM Port, by confirming it from the Device Manager first, before uploading it otherwise it will not work. Open the serial monitor after the code is uploaded and then if you see retrying, read on

Note: Pair your LinkIt ONE with your Android device before opening my application.

Open the application your Android Device. It will prompt you to switch on bluetooth, if it is not already on. Allow it to do so. Then touch the bluetooth icon on the top right of the screen. I will show you a list of your paired devices, select the Linkit ONE from that. It should be “My_BTServer”, if you have not modified my code. It will connect and then you will see “Connected to My_BTServer”. Then type “On” and press ‘Send’. Hopefully, the LED on LinkIT ONE will light up and you will receive a message from the LinkIt that the “LED is on”. Sending “Off” will switch off the LED and you will receive a message that the “LED is off”.

So this was pretty easy and it provides you with an application which in my opinion looks better than the BlueTerm app’s blue and white interface and small font.

Because this is an Android application, and Android devices vary a lot, I cannot guarantee that this will work for everyone perfectly. So if you have any problems, please leave a comment and I will help you out.