0

Bluetoothing to Android Tablet

Today I tried pairing my UART-to-Bluetooth adapter to a Nexus 7 tablet to see how it works. On the tablet I used BlueTerm, an open-source terminal emulator for communicating with any serial device using a bluetooth serial adapter.

I connected my Bluetooth adapter through a USB/UART adapter to a PC. On the PC in a terminal emulator the following sequence of commands is sent to the BT adapter:

///
at*agln="PIP-Watch",0
at*agfp="1234",0
at*addm

The three slashes are an escape sequence to put the adapter into the AT-mode. Then we set BT device name and a PIN. Finally we exit the AT-mode, entering data mode. The adapter now awaits BT connections.

On a tablet or phone we search for BT devices in the vicinity. The BT module should appear in the list, and we pair the tablet with it. Android may ask for a PIN number, which is 1234. After pairing it is possible to connect to the adapter using, for instance, the BlueTerm app in android.

On a slightly separate note, I also tried creating my first Android app. I just followed a tutorial on developer.android.com and everything worked just fine, even thou I am running ‘bleeding-edge’ Fedora 20 on the PC. The only problem was with access permissions to an android device in Linux. The adb (android debug server) reported error “(?????? no permissions)”, but this post on stackoverflow.com solves the issue.

Links:

 

Jarda

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.