You are here: Forum Home → ANT Developers Forums → ANT General Questions → Thread
device0 = null;
device0 = new ANT_Device(); // Create a device instance using the automatic constructor (automatic detection of USB device number and baud rate)
device0.ResetUSB();
device0.ResetSystem();
Thread.Sleep(500);
device0.setNetworkKey(USER_NETWORK_NUM, USER_NETWORK_KEY, 500);
device0.enableRxExtendedMessages(true);
device0.deviceResponse += new ANT_Device.dDeviceResponseHandler(DeviceResponse); // Add device response function to receive protocol event messages
device0.serialError += OnSerialError;
var c1 = device0.getChannel(0);
c1.channelResponse += new dChannelResponseHandler(ChannelResponse);
c1.assignChannel(ANT_ReferenceLibrary.ChannelType.BASE_Slave_Receive_0x00, USER_NETWORK_NUM, 500);
c1.setChannelID(42747, false, 11, 0, 500);
c1.setChannelPeriod(8070, 500);
c1.setChannelSearchPriority(0);
c1.setChannelFreq(57, 500);
if (c1.openChannel(500)){
Trace.WriteLine("Open power channel");
}
Channel: Received BROADCAST_DATA_0x4E
:: 4e, 00-52-FF-58-FA-27-00-05-94-80-FB-A6-0B-05
Chan ID(0,42747,11,5) - type device : powerRx:(0): 52-FF-58-FA-27-00-05-94
Channel: EVENT_RX_FAIL_0x02
:: 40, 00-01-02
Rx Fail
Channel: EVENT_RX_FAIL_0x02
:: 40, 00-01-02
Rx Fail
Channel: EVENT_RX_FAIL_0x02
:: 40, 00-01-02
Rx Fail
Channel: EVENT_RX_FAIL_0x02
:: 40, 00-01-02
Rx Fail
Channel: EVENT_RX_FAIL_0x02
:: 40, 00-01-02
Rx Fail
Channel: EVENT_RX_FAIL_0x02
:: 40, 00-01-02
Rx Fail
Channel: EVENT_RX_FAIL_0x02
:: 40, 00-01-02
Rx Fail
Channel: EVENT_RX_FAIL_0x02
:: 40, 00-01-02
Rx Fail
Channel: EVENT_RX_FAIL_GO_TO_SEARCH_0x08
:: 40, 00-01-08
Ian Haigh