Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Invalid length Network Kety

Rank

Total Posts: 1

Joined 2015-07-03

PM

I'm a newbie to the ANT world. I'm trying to get the Sample_AcquireChannels project to connect to an ANT device using a private network key. I can connect to the device using ANTWare II and the network key. But when I try to pass in the NetworkKey to acquireChannelOnPrivateNetwork, I receive an Exception
Received network key that is null or has invalid length
.

Here is the code I'm using (with a fake network key):
mNetworkKey = new NetworkKey(new byte[]{(byte)0xB3, (byte)0xA20x130x430x7D0x22, (byte)0xD10x11});
mAntChannel mAntChannelProvider.acquireChannelOnPrivateNetwork(thismNetworkKey); 


Am I doing something wrong with the byte array?      
Avatar
RankRankRankRank

Total Posts: 744

Joined 2012-09-14

PM

Your code is correct but your network key length is not. Network keys on MMC devices used in most mobile devices are not 8 bytes long.

If you require the mobile friendly version of your private network key, please contact ANT Wireless Support directly at support @thisisant.com.

Cheers