Is it possible to have more than 1 Generic Ant Channel operating at the same time?
I would like to collect data from 2 to 4 Moxy sensors at the same time.
When I try to open a second channel, I get "Unable to acquire channel."
I want to connect multiple power meters with a view to performing field comparison tests.
..... assign sensor numbers for each ANT channel.....Assuming you can do this, how do you stop the channel from picking up another sensor? As far as I can figure, you can only choose to ignore an incorrect sensor, and re-initiate the pairing process. So you have to keep moving the items around, and keep your fingers crossed. In short, the process is essentially random, and that is unprofessional IMHO. You just wanna train.... users should not have to do a pairing dance :)
class MoxyField extends App.AppBase
{
var mSensor;
var mSensor2;
function onStart()
{
mSensor = new MO2Sensor();
mSensor.open();
mSensor2 = new MO2Sensor2();
mSensor2.open();
}
function getInitialView()
{
return [new MO2Field(mSensor, mSensor2)];
}
function onStop()
{
return false;
}
}
mDeviceConfig = new Ant.DeviceConfig({
:deviceNumber => sensorId, // This would be set from the App Settings
:deviceType => CONFIG_DEVICE_TYPE,
:transmissionType => CONFIG_TRANSMISSION_TYPE,
:messagePeriod => CONFIG_MESSAGE_PERIOD,
:radioFrequency => CONFIG_RADIO_FREQUENCY, // Ant+ Frequency
:searchTimeoutLowPriority => CONFIG_SEARCH_TIMEOUT_LOW_PRIO, // Timeout in 25s
:searchTimeoutHighPriority => CONFIG_SEARCH_TIMEOUT_HIGH_PRIO, // Timeout in 5s
:searchThreshold => searchThreshold // 0 if Sensor Number is known, otherwise Proximity Pair
});
My thought is that although you can specify the device id, you have to wait until a device connects to check that id.
I thought that if you specified the device id, other devices would not be found (possibly assuming the searchThreshold value is set to 0). Am I not remembering this stuff correctly?Sounds right to me, but that's on the face of things. Surely an incorrect device has to connect, get checked, then dropped. So I guess I'm questioning if there is a way to prevent the same unwanted sensor from being picked up. I was thinking of the lists, then realized they probably have to work in the same fashion. So I think that leaves us with proximity, or like Roger said, you can do the sensor dance and get them to pair. The dance (moving the watch to the next device) is a hack in my opinion. Does incrementing the proximity value provide a solution?