Adding a Bluetooth Data Source User Guide

Adding a Bluetooth Data Source User Guide

What is Bluetooth?

Bluetooth is one of the external data sources that can be used on the Kuika platform and provides flexibility in data transfer. Connecting an existing Bluetooth database to an application developed in Kuika is quick and easy. This tutorial describes the steps to add a data source and optimize this connection using Bluetooth technology.

In order to use Bluetooth connectivity, your subscription plan must support Bluetooth integration. For more information, please visit the Pricing Page.

The content of this course consists of the following topics:

  • Connecting a data source to your app via Bluetooth
  • Adding a new method for Bluetooth connection
  • Adding Methop Input
Add a Data Source Connection To Your App With Bluetooth
  1. After logging in to the  Kuika platform, open the Mobile project you will work on from the “Apps” screen.
  2. Go to the “Datasources”  module. In the Datasources module, you can view the data sources, actions and tables in the application you have developed, add a new data source, a new action and a new table.
  1. To add a new data source to your application, click on the “+” icon next to the “Sources” heading on the left side of the Datasources module.
  1. Select “Bluetooth” as the Datasources type and give it a name.
  2. Then click on the “CREATE” button.
  1. On the screen that opens, fill in the Device Name, Device ID and Device Address fields.
  • Device Name : The name of the device visible to the user.
It is mandatory to enter the Device Name field.
  • Device ID: The unique ID of the device.
  • Device Address: The Bluetooth address of the device. For example, the address of a Bluetooth device: “00:1A:2B:3C:4D:5E.

It is not mandatory to enter the Device ID and Device Address.

     7. Then click on the “CREATE” button.

Add a New Method for Bluetooth Connection to Your Application

Characteristics are used to accurately distinguish and make sense of data measurements between Bluetooth devices. Each characteristic represents a specific type of data.

  1. After adding the Bluetooth data source, click the ADD NEW METHOD button.
  1. GATT (Generic Attribute Profile) is the standard protocol that regulates the data communication of BLE devices. Fill in the following fields when adding a new method:
  • Name Method name
  • Characteristic ID: Unique ID that identifies the data
  • Service ID Service ID of BLE devices
  • Characteristic Type: UUID indicating the type of data (Read, write, etc.) Each characteristic is identified by a UUID (Universally Unique Identifier) and can allow operations such as read (Read), write (Write) or mark (Notify or Indicate).
  1. Save your method by clicking the SAVE button.
  2. Select your method and add an action by clicking the ADD ACTION button in the Properties panel.
  • Sub Array: Used to select a specific part of the data. For example, click +ADD ACTION > Sub Array to ensure that the first two values read from a device are converted to Byte (divide by 128) and converted to temperature value. Click Symbol Picker in Sub Array.
  • In the “Count” field, enter the value “2” since the first two values are requested.
  • Click “+ADD ACTION>Arithmetic>Divide” for byte conversion.
  • Divide: Allows data conversion by dividing by a specific value. Click the Symbol Picker in Value in Divide and select Action Results>Sub Array to call the value from Sub Array. Then type “128” in the value2 field.

Complete the process by clicking the UPDATE button.

Add Method Input

Method Input defines the inputs required for the Bluetooth method to work.

  1. Click the ADD METHOD INPUT button in the Properties panel.
  2. In the screen that opens, fill in the following fields:
    • Input Name: Name of the input (“temperature” etc.)
    • Type: Data type of the input (“String”, “Integer” etc.)
  3. Add the input by clicking the CREATE button.

Once these steps are complete, your Bluetooth data source connection is ready and can be effectively used in your applications on the Kuika platform. To learn more about Bluetooth actions and how to integrate them into your applications, check out our Getting Started with Bluetooth Actions content.

Glossary

No items found.

Alt Başlıklar