#!/bin/sh ########################################################################### # # Copyright (c) 2021-2023 Diality Inc. - All Rights Reserved. # # THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN # WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. # # @file bluetooth_paired_query.sh # # @author (last) Behrouz NematiPour # @date (last) 12-Dec-2021 # @author (original) Behrouz NematiPour # @date (original) 11-Nov-2021 # ############################################################################ # @details # This file is called by UI Software to query the Blood Pressure paired Bluetooth device. # There should be only one device paired at a time regarding our design. # The returned value is the devive mac address and the name assigned to it in the system. #test code #PAIRED_DEVICE_INFO="28:FF:B2:78:5B:BF BP7000" #PAIRED_DEVICE_INFO="" PAIRED_DEVICE_INFO=$(echo "paired-devices" | bluetoothctl | grep ^Device | cut -b 8-125) echo $PAIRED_DEVICE_INFO