Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Acquiring channels with PUBLIC network throws NETWORK_NOT_AVAILABLE

Rank

Total Posts: 1

Joined 2015-04-02

PM

What I am trying to accomplish:
I am trying to communicate from Android Emulator (via the ANT bridge) to an Ant-enabled Android device. I am using the SampleAcquireChannel application found on the download page of thisisant.

Problem description:
Acquiring channels with PredefinedNetwork.PUBLIC network without any other capabilities throws ChannelNotAvailableReason.NETWORK_NOT_AVAILABLE. When I try with PredefinedNetwork.ANT_FS, it does not throw, however, the Android device cannot find the emulator (gives No Device Found).

What I have tried:
http://www.thisisant.com/APIassets/Android_ANT_API/com/dsi/ant/channel/AntChannelProvider.html says that "If the reason code is ChannelNotAvailableReason.NETWORK_NOT_AVAILABLE, applications should attempt to acquire a channel again when receiving a ACTION_CHANNEL_PROVIDER_STATE_CHANGED with NEW_CHANNELS_AVAILABLE being true as a network slot may have become available as well."
I do not know to change the code to use "NEW_CHANNELS_AVAILABLE " flag on trying to acquire the channel again. How do I do this?

My environment: I have the Ant Radio Service, Ant USB service both installed and tested on the emulator and the test device. I tested both of them by connecting to Stride SDM sensor from Garmin. The emulator is running on Windows machine with the bridge enabled at port 9050. The test device is Galaxy S3 and I have a Ant USB stick with micro-to-usb cable hooked up to it so it can use Ant Radio Services.

Please help me. Any pointers are appreciated. Thank you for your time.



     
Avatar
RankRankRankRank

Total Posts: 149

Joined 2014-04-02

PM

Do you have any other apps running (or are you trying to acquire a channel with a specific network key somewhere) that could be using the network slot to connect to a private network? There are 3 network "slots" available - one for ANT+, one for ANT-FS and one shared between the Public network and Private networks.      

Signature

blackramlabs.com