Overview

CySmart™ is a Bluetooth® Low Energy (BLE) or Bluetooth Smart utility developed by Cypress Semiconductor Corporation. CySmart can be used with any BLE products including BLE development kits from Cypress. It is available for Android as well as for iOS. Follow these links to download the app.

App StoreGoogle Play

To learn more about the app, download source code and to download app user guide, please visit CySmart – Mobile App.

 

Using CySmart with WICED Bluetooth devices

Though there are number of open-source mobile application that can be used with WICED application, this blog documents how to use CySmart with CYW920719Q40EVB-01 evaluation kit. Technically app can be used with any BLE compliant device as it follows Bluetooth SIG standard and hence this blog is merely a getting started guide for WICED users who are using CySmart for the first time. We will take the example of Hello Sensor application to leverage CySmart app on a peer device (iOS/Android device).   

Hello Sensor application - Hello Sensor application in WICED Studio provides paired devices with the following information (this blog uses CYW920719Q40EVB-01 evaluation kit and the user switch name is used accordingly. However, blog is valid for other boards as well and switch name shall be read accordingly):

  • A Hello Service (a proprietary service) with two proprietary characteristics:
    • The Hello Input characteristic (read-only) is used to read the number of times button (SW3) is pressed on the evaluation kit
    • The Hello Configuration read-write characteristic is used to configure the number of times an LED on the evaluation board blinks
  • A Device Information Service that provides information including:
    • Manufacturer Name
    • Model Number
    • System ID
  • A Battery Service that provides a battery-level indication

Note: Please download the CYW920719Q40EVB-01 kit user guide at www.cypress.com/cyw920719Q40EVB-01 (or respective kit guide for your target kit from kit's webpage) for download instructions for WICED Studio and to learn how to program the board with Hello Sensor application. Follow the steps and program the board with Hello Sensor application.

 

Testing Hello Sensor application with CySmart -  Once the board is programmed, please open CySmart application on your phone. It will show all available Bluetooth devices along with RSSI value. Hello Sensor application uses name "Hello" (device name can be changed in wiced_bt_cfg.c located under hello_sensor application directory in demo directory in WICED Studio). So, look for device named "Hello" (Figure 1).

 

Figure 1: Device named "Hello" appears in CySmart App

IMG_4971.PNG

Select the Hello device on the screen and it will connect to the Hello device (your kit) and take you to the next screen. Once connected, app opens services screen. CySmart detects the services supported by the device. As application has three services - Hello Sensor service (proprietary service), Device Information Service and Battery service, three services as well as GATT database options can be scrolled from left to right or vice versa on the screen (Figure 2).

 

Figure 2: Hello Sensor device services as seen by CySmart application

IMG_4991.PNGIMG_4972.PNG

IMG_4990.PNGIMG_4986.PNG

To review Hello Sensor Service, click on "GATT DB" or "Unknown service" (unknown service will eventually ask to use GATT DB as Hello Sensor is not a standard Bluetooth SIG service and can not be recognized by the app) (Figure 2). Once GATT DB is opened it will show three services supported by the device as shown in Figure 3(a). Select Unknown Service for Hello Sensor service. Two characteristics are supported by this service as mentioned earlier - a read-only characteristic "Hello Input" (Figure 3(b)) and a read/write characteristic "Hello configuration" (Figure 3(c)).

Select Read And Notify And Indicate Unknown characteristic (Hello Input) and it will lead to GATT database for this characteristic. Press read and observe value. Now press SW3 and then press read on the app and observe Hello count increases (Figure 3(d)). Now, come back to characteristic and select Read And Write Unknown characteristic (Hello Input) and it will lead to GATT database for this characteristic (Figure 3(d). Enter the hex value for the number of times you want to blink the LED on the board (Figure 3(e)). Once the value is entered and write is pressed, observe the LED on the board toggles for the number of times mentioned in the app.

 

Figure 3: (a) GATT database for Hello Sensor device services, (b) Characteristics within "Unknown Service"/customer service, (c)  Hello Input characteristic GATT database, (d) Hello configuration characteristic GATT database, (e) Writing value to control number of times LED blinks on the board

IMG_4973.PNGIMG_4974.PNGIMG_4977.PNG

IMG_4979.PNGIMG_4981.PNG

Navigate to the services screen to review Device Information Service (Figure 2). Select Device Information Service to observe device information (Figure 4).

 

Figure 4: Various Device Information Service characteristics

 

IMG_4992.PNG

Finally, navigate to the services screen to review Battery Service (Figure 2). Select the service and press Read button (Figure 5). Every time Read is clicked, battery level increases by 1% (0-6%). In Hello Sensor application, battery value is not an actual measured value. It is a dummy value that is increased on each read.

 

Figure 5: Battery level indicated by Battery Service

IMG_4987.PNG

This concludes the evaluation of Hello Sensor application with CySmart mobile application. Try changing various values in Hello_sensor.c file, program the device and observe the change in value on the app.