Bluetooth Accessories

Bluetooth Classic

You can pair bluetooth classic accessories with the Syrus 4 device such as a bluetooth speaker/headset. Compatible headsets are one's that support HFP Hands Free Profile only. Other bluetooth profile variations like JL-HFP, or HSP.HFP are not supported at the moment.

To pair a bluetooth speakerphone you can use the apx-bt tool or the management tool User Interface.

Scan for nearby bluetooth devices for 10 seconds

$ sudo apx-bt scan 10

List discovered devices

$ sudo apx-bt list_discovered
{"94D4690CB081":"SpeakerPhone","A0E6F8D3A66E":"Syrus 3GBT 05949","D89C679A0B5A":"B88BMQ2","28EC9A706924":"<UNKNOWN>","7C6456A13E51":"[TV] Samsung Frame (43)","FC65DE2040E1":"Echo Show-1SN","94D4690CB17B":"CP-8845"}

Pair to bluetooth device

$ sudo apx-bt pair 94D4690CB081

Once paired you can use the apx-tts to send a message via the bluetooth handsfree speakerphone.

Speak 'hello world' over speakerphone

$ sudo apx-tts en-US "hello world"

Bluetooth Beacons

Bluetooth Low Energy sensors or beacons, can be connected to the Syrus 4 to read sensor data wirelessly. ELA produces some BLE sensors that can read temperature, humidity, and movement.

Prerequisites

  • Have the latest version of Apex installed (23.03.1 or newer)
  • Have some ELA device, be it environment, temperature, movement, or id.

Get MAC address
Move the BLE sensor and scan using Syrus Management tool.

Configuration in APEX
Add the device with an optional alias

# be sure to replace MAC_ADDRESS with the MAC of the sensor, note you don't need a colon in MAC address
# sudo apx-bbs add --mac=MAC_ADDRESS --alias=NAME

$ sudo apx-bbs add --mac=E50E24DCCA9E --alias=cooler

Set scan time and enable BLUE module (update the information each 60 seconds)

# updates data every 60 seconds
$ sudo apx-bbs set --scan_time=60 --enabled=true

Get devices added

$ sudo apx-bbs get_all | jq

Verify the state of the last scans

$ sudo apx-bbs status
[
  {
    "mac": "DA161CAD5ADF",
    "name": "P RHT 902520",
    "alias": "lab",
    "timestamp": 1674157402,
    "payload": {
      "2A6E": "0A59",
      "2A6F": "0027"
    }
  }
]

Now that the sensors are added, all that's left is to trigger some events and actions using Syruslang, click here for more info.