PAN1322
Application Note
33
Revision 1.2, 2013-12-18
Design Guide
Since the Smart Phones uses different operating systems they need their own App implementations to
connect to an accessory. Also the behavior and requirement of the Smart Phones may differ
depending on both operating system and version. Included here are the basics for securing easy set-up
and compatibility with the major Smart Phones and OS’s.
5.2.1
Android Smart Phones
To keep up compatibility with Android Smart Phones using specific Bluetooth Apps there are a couple
things to keep in mind both for the Accessory and App development. The below is valid for 4.x versions
and possibly also older versions of Android but it cannot be guaranteed.
5.2.1.1
Registering service for Android compatibility
An Android application that shall work with an Accessory (eUniStone) solution can either use a UUID
containing the
Serial Port Profile UUID
or a it can use the
random UUID
which only is used for
accessories (or other Apps) connecting to specific Android Apps. In either case it is important that the
chosen UUID is registered in eUniStone and used in the Android application. It is recommended to use
a CoD other than 0x000000, since some Smart Phones with specific Android versions, will require this.
The
Serial Port Profile UUID
, CoD, service name and port number of the service is registered with the
command AT+JRLS, and the values shall be written to eUniStone as initialization. The below example
should work with most Android Smart Phones. The service is called “Serial port” and set to port 0x01.
The name and port number can be chosen to be different to the example.
Registering a UUID containing the serial port profile:
AT+JRLS=32,11,000
0110100001000800000805F9B34FB,Serial port,01,240704
What CoD to choose depends on the specified behavior of the accessory. However, in some cases it is
also important to use info from the field on what works. Details about CoD can be found on
https://www.bluetooth.org under the section called “Assigned numbers, Baseband”.
Random UUID
can be used if the Accessory (eUniStone) only shall work with a specific Android Smart
Phone App. If eUniStone uses a random UUID, an Android Smart Phone App needs to be developed
which use the same specific random UUID. The specific accessory with eUniStone and the Android
Smart Phone App will then more easily be associated in a way so that this Android Smart Phone App
will only connect to the accessory using that specific random UUID.
Registering a random UUID:
AT+JRLS=32,11,D2CA6960F6A042308BE980CF63B25BAF,Serial port,01,240704
Observe that the long random UUID is only generated randomly once during development of the
accessory and Smart Phone App. Most programing languages and tools contain functions for
generating a long random UUID. UUID generators can for example be found in Java. Also there are
online webpages that can generate random UUID’s.