VS-ECG Programming Guide (V1.0)

8.0 VSH101connection with BlueZ library

BlueZ is the linux official bluetooth stack. Most of the health care system is built from a linux platform. VitalSigns provide  the source code and sample application (VsAPP) for developers to create his own health care center with Bluz Library

8.1 Prepare your VSH101 device

Before strting, make sure that the VSH101 has been powered on. Just need to press the power button  for 5 seconds and release the button. The device will be ready for use and make sure the firmware of your VSH101 is up to date.

8.2 Prepare ubuntu 20.04 platform

This example is based on a linux platform with ubuntu 20.04. Please make sure  the following packages are well-installed.

$ sudo apt-get install build-essential
$ sudo apt-get install git
$ sudo apt-get install libgtk-3-dev
$ sudo apt-get install bluez bluetooth libbluetooth-dev

8.3 Prepare a BT5.0 USB adapter

This example is based on a general purpose BT5.0 USB dongle and we used the ASUS USB-BT500 for example. Please plug in the USB adapter to your platform.

Please enter the followin command to check if the ASUS BT500 is well installed.

$ hciconfig -a

If the device is well-installed, you shall be able to see the following inforamtion.  You can see the Manufacturer to be ‘Realtek semiconductor ‘.

8.4 Download the sample code VsApp from GitHub

Please download the source code with the following git command listed.

$ git clone https://github.com/juangjl/vs-ecg.git

And enter the VsApp folder. It is in the path of ./vs-ecg/VsApp

8.5 make and run the VsAPP project

Please enter the following commands to  make the VsApp project

$ make clean
$ make all

After you see the link successful, please enter the following command to run the sample application

$ ./script/start.sh

Please change to the GATT view and click scan start. In this example, we select the VSH101-JL-DBG and in  your case,  you can select the device you have in hands.

The next step is to run the ECG waveform. Please connect the button open. After the BLE connection is build. Please click the ‘Start’ button to measure the ECG signals.

8.6 Conclusion

Now, you have every  thing  you need to create  a health center in a linux platform with BlueZ stack. All the source code is open and you can find every thing you need from the source code in the  git hub listed.