Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Ant command failed exception while sending burst data

Rank

Total Posts: 5

Joined 2016-04-01

PM

Hi,

I am getting following exception while sending burst data from master (android smart phone S6) to slave (ant device).

com.dsi.ant.channel.AntCommandFailedExceptionANT Service responded with failure reasonTRANSFER_FAILED
 W
/System.err:     at com.dsi.ant.channel.AntChannel.checkResult(AntChannel.java:895)
 
W/System.err:     at com.dsi.ant.channel.AntChannel.burstTransfer(AntChannel.java:732)
 
W/System.err:     at com.belwith.srbridgeapp.common.ChannelController$ChannelEventCallback.onReceiveMessage(ChannelController.java:338)
 
W/System.err:     at com.dsi.ant.channel.AntChannel$ChannelEventDispatcher.onReceiveMessage(AntChannel.java:148)
 
W/System.err:     at com.dsi.ant.channel.ipc.aidl.AntChannelCommunicatorAidl.onRxAntMessage(AntChannelCommunicatorAidl.java:206)
 
W/System.err:     at com.dsi.ant.channel.ipc.aidl.AntChannelCommunicatorAidl$AntIpcEventReceiver.handleMessage(AntChannelCommunicatorAidl.java:131)
 
W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:102)
 
W/System.err:     at android.os.Looper.loop(Looper.java:158)
 
W/System.err:     at android.os.HandlerThread.run(HandlerThread.java:61


and then getting TRANSFER_TX_FAILED message at onReceiveMessage callback.

Below is the hex data which i am transferring as burst data. (in multiple of 8 bytes. total bytes 48)

01012D1699977A29037805147471765169323237474A3846656A417A656A6B6345413631657A6749617A664F775754E1


Here is the code for the same :

mAntChannel.burstTransfer(finalDataOperationReq); 


Is there anything which i am missing here or doing wrong ?

Thanks in advance.

     
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Does every attempt to send a burst transfer fail?

Could you list your channel parameters for both the master and the slave?

Are your acknowledged or broadcast messages coming over fine?

Transfer failures are an expected occurrence but it's not clear here if you are retrying after the failure.      
Rank

Total Posts: 5

Joined 2016-04-01

PM

Thanks Harrison

Now TRANSFER_FAILED error is not coming but after sending burst data TRANSFER_TX_START and TRANSFER_TX_COMPLETED callback coming at the same time(09-28 17:31:35.713). see my log :

09-28 17:31:35.713 E/ChannelController: TRANSFER_TX_START
09-28 17:31:35.713 E/ChannelController: TRANSFER_TX_COMPLETED


and this is happening every time i send burst data. also i am getting TRANSFER_TX_COMPLETED event as mentioned above but my slave device is not receiving that data.

Also acknowledge and broadcast Rx is coming fine.

My question is that TRANSFER_TX_START and TRANSFER_TX_COMPLETED event coming at the same time so does that mean my burst data is not transmitted actually ?

This is parameter i set for master:

mAntChannel.setChannelId(channelId);   //  set channle id
mAntChannel.setPeriod(CHANNEL_PROOF_PERIOD);  //set period
mAntChannel.setRfFrequency(CHANNEL_PROOF_FREQUENCY); //set frequency
LibConfig libConfig = new LibConfig(truetruetrue);  //this is for getting extended data
mAntChannel.setAdapterWideLibConfig(libConfig);
mAntChannel.open(); 


Thanks      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Hi,

I sent a direct message as well, but if you could take a look at this post on how to enable ANT Serial Logging, I would appreciate it greatly if you could send some logs with this enabled as the API is stating the messages are being sent...      
Rank

Total Posts: 4

Joined 2017-07-09

PM

Harrison - 29 September 2016 09:50 AM
Hi,

I sent a direct message as well, but if you could take a look at this post on how to enable ANT Serial Logging, I would appreciate it greatly if you could send some logs with this enabled as the API is stating the messages are being sent...


Hi,

Do you have any update why happened this?
I'm experiencing the same on Samsung S7      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Hi,

A serial message log from logcat would help us diagnose the issue quicker, but is the behaviour your seeing related to consistent TRANSFER_FAILURE's, or is it something else?      
Rank

Total Posts: 4

Joined 2017-07-09

PM

Harrison - 21 March 2018 09:48 AM
Hi,

A serial message log from logcat would help us diagnose the issue quicker, but is the behaviour your seeing related to consistent TRANSFER_FAILURE's, or is it something else?


Sorry, I was wrong. My problem is that when I want to send burst data from mobile it fails in total random cases.
I attached a logcat log about a ManualTransfer communication. You can see that it fails with 0x06 response code. Sometimes it works as expected but in many other cases it fails and when I try to re-send it fails again and finally on third times I can send it. Why? How can I fix it?

In my code before every burst sending I do a Thread.sleep with 125 milisec.
The channel parameters:
frequency 50
period 8hz (4096)
device number: 0
device type: 0
transmission type: 0
authentication: pass-through authentication
event buffer disabled
Channel type: bidirectional slave      

File Attachments