BLE based Android Application

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

BLE based Android Application

1,817 Views
syed_idris
Contributor III

Hi,

How to get sensor data from KW40 to mobile through BLE ?

"Kinetis BLE Toolbox" is one option, but how to create our own android based mobile application which will show data coming from KW40?

Can we connect the sensor (like temperature sensor, CO2 sensor) to KW40, which is not in example code ? because BLE is having specific profiles, characteristics only for specific sensors.

Syed_Idris

Labels (1)
1 Reply

632 Views
carlos_neri
NXP Employee
NXP Employee

You can send any custom data as needed by your application. To achieve this, you'll need to create a custom service (128 UUID). On the KW40Z_Connectivity_Software_1.0.1 there are some example of custom services, such as OTAP, wireless UART or closer to your target application, the temperature_sensor.

For testing temperature_sensor, you'll need two KW40Z boards, (sensor and collector), since current Kinetis BLE Toolbox doesn't support it, however, the overall system is the same. KW40Z reads its internal temperature sensor with an ADC channel and sends it over BLE and the second KW40Z (on your case would be Android device) receives the data and displays it. Demo Applications User's Guide (BLEDAUG.dpf) on section 5.2.11 provides instructions on how to run and test the example.

The Applications Developer Guide (BLEADG.pdf) on its section 8 provides the information required to build a custom profile and services on KW40Z, using the temperature sensor as example.