Bluetooth Accessories
Bluetooth Classic
Syrus 4 supports up to Bluetooth 5.1
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 Sensors
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.
Scan using apx-bbs tool
Make sure to use the apx-bbs system tool when scanning nearby beacons and not the apx-bt scan.
# scan for nearby bluetooth beacons $ apx-bbs set --scan_time=60 --enabled=true # see results of the scan with the status command $ apx-bbs status [{"mac":"D49F85C1B247","name":"L ID 00439D","alias":"Presence1","timestamp":1686588049}]
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.
BlazonLabs Drum Sensor
Syrus can interact with TM Drum Rotation Sensor to detect when the drum is mixing, idle, or unloading. Syrus can also read temperature and battery data from the sensor.
Syrus 4 configuration:
## Enable the ble service
apx-bbs enable
## Add the desired BLE device and assign an alias
apx-bbs add --mac=AABBCCDDEEFF --alias=BlazonDRS
## Enable BLE service and set scanning time
apx-bbs set --scan_time=60 --enabled=true
Installation / Wiring Diagrams
See the User Manual
BlazonLabs Angle and Tilt Sensor
Syrus can interact with BlazonLabs Angle and Tilt Sensor to detect the operational movement of the mechanical arms, hoppers, or locks of yellow machinery and heavy vehicles.
Syrus 4 configuration:
##################### Blazon DRS Example ######################
## Enable the ble service
apx-bbs enable
## Add the desired BLE device and assign an alias
apx-bbs add --mac=AABBCCDDEEFF --alias=BlazonDRS
## Enable BLE service and set scanning time
apx-bbs set --scan_time=60 --enabled=true
define fieldset default fields=CV04:$ble.BlazonATS.degree_x,CV05:$ble.BlazonATS.degree_y,CV06:$ble.BlazonATS.battery
# - Signals
## FOR ANGLE AND INCLINATION SENSOR
define signal sg_loading_x $ble.BlazonATS.degree_x < 90
define signal sg_unloading_x $ble.BlazonATS.degree_x > 90
define signal sg_loading_y $ble.BlazonATS.degree_y < 90
define signal sg_unloading_y $ble.BlazonATS.degree_y > 90
# - Events
define event ev_loading group=tracking fieldset=default label=loading code=77 trigger=sg_loading_x,sg_loading_y,or
define event ev_unloading group=tracking fieldset=default label=unloading code=78 trigger=sg_unloading_x,sg_unloading_y,or
Blazon Engine RPM Sensor
Syrus can interact with Blazonlabs Engine RPM Sensor to monitor engine RPM via electric signals from Alternator of the vehicle. Measured value is proportional to the engine RPM, hance a small calibration is required.
The following example shows a sample implementation using SyrusJ
##################### Blazon DRS Example ######################
Enable the ble service
## apx-bbs enable
Add the desired BLE device and assign an alias
## apx-bbs add --mac=AABBCCDDEEFF --alias=BlazonDRS
Enable BLE service and set scanning time
## apx-bbs set --scan_time=60 --enabled=true
define fieldset default fields=CV01:$ble.BlazonERPM.erpm,CV02:$ble.BlazonERPM.voltage,CV03:$ble.BlazonERPM.temperature,OE:$ble.BlazonERPM.erpm
# - Signals
define signal sg_stopped $ble.BlazonERPM.erpm == 0
define signal sg_lowrpm $ble.BlazonERPM.erpm < 2000
define signal sg_highrpm $ble.BlazonERPM.erpm < 4000
define signal sg_lowbat $ble.BlazonERPM.voltage < 12000
define signal sg_charging $ble.BlazonERPM.charging > 14500
define signal sg_hightemp $ble.BlazonERPM.temperature > 50
define signal sg_lowtemp $ble.BlazonERPM.temperature < 20
# - Events
define event ev_stop group=tracking fieldset=default label=stop code=70 trigger=sg_stopped
define event ev_lowrpm group=tracking fieldset=default label=lowrpm code=71 trigger=sg_lowrpm
define event ev_highrpm group=tracking fieldset=default label=highrpm code=72 trigger=sg_highrpm
define event ev_lowbat group=tracking fieldset=default label=lowbat code=73 trigger=sg_lowbat
define event ev_charging group=tracking fieldset=default label=charging code=74 trigger=sg_charging
define event ev_hightemp group=tracking fieldset=default label=hightemp code=75 trigger=sg_hightemp
define event ev_lowtemp group=tracking fieldset=default label=lowtemp code=76 trigger=sg_lowtemp
See the Manual User
Updated 4 months ago