Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

ANT service messages are freeze

Rank

Total Posts: 3

Joined 2024-03-12

PM

Android 14, Garmin USB ANT+ stick via OTG, latest version of ANT Radio Service and ANT USB Service. Using "restricted" ANT SDK.

SimulANT+ from PC or a real ANT sensor - no matter how it goes.

Very often, during the developing of an App (based on Sample_AcquireChannels App from SDK), messages from the service stop coming.
App opens a channel, within 5-10 seconds receives several messages and then nothing. There are no any event received anymore (by IAntChannelEventHandler.onReceiveMessage). I made an additional handler that re-opens the channel if there are no messages for a period of time. So, when the app calls channel.close(), it immediately receives a large package of previous messages. After this, the channel opens again, works for 5-10 seconds and freezes again.

Sometimes it even happens on channel.open() - no feedback from the service, i.e. It just didn't seem to open anything.

Sometimes connecting/disconnecting the USB stick helps, sometimes you have to restart the phone for everything to be work normally.

Log file is attached. As you can see in the log:

12:40:07.139 open channel
12
:40:09.247-12:40:11.479 receives messages

freeze until 12
:40:32.119 (23 seconds)

force the channel close
And immediately App receives 50 messages within a 1/10 of a second.

then open the channel again... 


What's the problem and how to fix it?
Thanks

p.s. All sample Apps from ANT+ or another Apps which are support ANT devices works in the same way: missing data, freezing and etc.

     

File Attachments

  • log1.txt (File Size: 9KB - Downloads: 110)
Rank

Total Posts: 3

Joined 2024-03-12

PM

Checked on another phone (Android 10), different OTG, different USB ANT+ stick.
Result is the same: working few seconds then freeze. Call the close method of the channel and got all lost packets... Original ANT+ Plugin sampler works in the same way (traffic just freeze after few seconds)
     
Rank

Total Posts: 5

Joined 2023-10-26

PM

@geometry dash subzero
stunlkr - 29 March 2024 06:25 AM
Checked on another phone (Android 10), different OTG, different USB ANT+ stick.
Result is the same: working few seconds then freeze. Call the close method of the channel and got all lost packets... Original ANT+ Plugin sampler works in the same way (traffic just freeze after few seconds)

Great sharing. My problem is also solved      
Rank

Total Posts: 3

Joined 2024-03-12

PM

coolburritos - 04 April 2024 07:29 PM
@geometry dash subzero
stunlkr - 29 March 2024 06:25 AM
Checked on another phone (Android 10), different OTG, different USB ANT+ stick.
Result is the same: working few seconds then freeze. Call the close method of the channel and got all lost packets... Original ANT+ Plugin sampler works in the same way (traffic just freeze after few seconds)

Great sharing. My problem is also solved

What problem was solved and how?      
Rank

Total Posts: 2

Joined 2024-03-04

PM

stunlkr - 29 March 2024 06:25 AM
Checked on another phone (Android 10), different OTG, different USB ANT+ stick.
Result is the same: working few seconds then freeze. Call the close method of the channel and got all lost packets... Original ANT+ Plugin sampler works in the same way (traffic just freeze after few seconds)mario games


It doesn't work for me.. Or maybe I did some wrong step      
Rank

Total Posts: 1

Joined 2024-11-04

PM

I can relate to what you’re experiencing with the ANT service freezing. I’ve been tinkering with a similar setup, and I've run into the same freezing issues when using the ANT USB stick. Here are a couple of things I’ve tried that might help:

1. Monitoring Battery Optimization: Make sure to check your phone’s battery settings. If the ANT radio service is being optimized for battery, it could lead to interruptions. I turned off battery optimization for my app, and it seemed to help with message consistency.
2. Test with Basic Setup: If you haven't already, try running just the basic Sample_AcquireChannels app without any additional handlers or modifications to see if the freezing occurs. Sometimes starting fresh allows you to identify if the problem lies within your specific implementation.
3. Use Different Devices and Cables: I noticed that changing the USB OTG cable sometimes helped. Certain cables could be causing instability in data transfer. If you have other cables and devices, give those a shot to see if things improve.
4. Logs Analysis: You already mentioned you attached logs, which is great! Sometimes, reviewing those logs line-by-line can reveal patterns or additional errors that occur right before the freeze happens.

Let’s keep sharing our findings! Looking forward to seeing if anyone has a workaround for this!      

Signature

Turning ideas into reality, one byte at a time in football bros.