4.2.5.4.3 TX Power Service

The following session covers the test case scenarios that showcase the TX Power service. The TX Power service uses the Power Level characteristic to return the current transmit power level when read using the GATT Characteristic Read.

The test case covers:

  • How to use the mobile (Android) MBD application to establish the connection with PXPR curiosity board.
  • Read the TX power level using the TX Power service.
  1. In the MPLABX, open the ble_pxpr_app(Reporter) application. Compile and program the PXPR application on the curiosity board with the below configuration.

    PIC32CX-BZ3_DFP

    1.2.183

    XC32 Compiler Version:

    V4.40

    After programming (or resetting) the device will be in APP_PXPR_STATE_ADV.

    APP_PXPR_STATE_ADV - The application is waiting for a connection without bond. That too within timeout_adv_seconds(60 seconds). After the completion of the timeout the device enters APP_PXPR_STATE_IDLE state.

    timeout_adv = 60 seconds - Timeout for advertisement without bond.

    LED Behavior

    APP_PXPR_STATE_ADV = Green LED flashes once in every 3 seconds.

    APP_PXPR_STATE_IDLE = Green LED will turn off.

  2. Open the Microchip Bluetooth Data (MBD) in Android and click the “BLE Connect” sub-app.
  3. Press the “START SCAN” icon to see the nearby advertising devices. The device with the advertising name “PXPR” is the target device.
  4. Click on the “PXPR” device to establish the connection. All the supported profiles in the proximity reporter will be displayed upon connection. At the peripheral side, the PXPR curiosity board will enter APP_PXPR_STATE_CONN when the connection is established.

    The on-board green LED indicate the connection and advertisement state as following.

    APP State

    LED Behavior

    APP_PXPR_STATE_IDLE

    All LEDs are turned off.

    APP_PXPR_STATE_ADV

    The green LED flashes once every 3 seconds. (On: 50 ms, Off: 2950 ms)

    APP_PXPR_STATE_CONN

    The Green LED flashes twice every 1.5 seconds. (On: 50 ms, Off: 150 ms)

  5. On the mobile (Android), press the “TX Power Service” icon.
  6. The highlighted portion shows the read TX power level.