Loghorn / ant-plus

A node module for ANT+
MIT License
138 stars 70 forks source link

RSSI (Received Signal Strength Indicator) #59

Open makerstorage opened 3 months ago

makerstorage commented 3 months ago

Hi

I hope this message finds you well. I am using the ant-plus library to capture heart rate data from a Polar Verity Sense sensor. While I can successfully log the heart rate data, I am having trouble extracting the RSSI (Received Signal Strength Indicator) value.

Could you please provide guidance on how to correctly obtain the RSSI value with this sensor?

Thank you for your assistance.

Best regards, Nuri

makerstorage commented 3 months ago

the code I am running:

var Ant = require('ant-plus');
var stick = new Ant.GarminStick3;
var scanner = new Ant.HeartRateScanner(stick);

scanner.on('hbData', function (data) {
    console.log('Heart Rate Data:', data);
});

stick.on('startup', function () {
    console.log('ANT+ stick startup');
    scanner.scan();
});

if (!stick.open()) {
    console.log('Stick not found!');
}

output:

Heart Rate Data: HeartRateScannerState {
  DeviceID: 14850,
  BeatTime: 43225,
  BeatCount: 59,
  ComputedHeartRate: 86,
  HwVersion: 1,
  SwVersion: 11,
  ModelNum: 4,
  BatteryLevel: 43,
  BatteryVoltage: 15.99609375,
  BatteryStatus: 'Ok'
}