tuyndv / mytracks

Automatically exported from code.google.com/p/mytracks
0 stars 0 forks source link

ANT+ error on Sony phones and ANT Radio Service v3.4 #1276

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use a Sony Xperia phone, update ANT Radio Service to current v3.4
2. Turn Bluetooth off
3. Start MyTracks and try connecting to ANT+ sensor

What is the expected output? What do you see instead?
I expect to see Sensor State 'Sending' in MyTracks, and the ANT+ icon in the 
system bar. Instead I see 'Disconnected'.
On occations I get a connection. Turning BT on helps.

What version of MyTracks are you using? On what version of Android? On what
phone?
MyTracks 2.0.4
Android 2.3.4
Sony Xperia Active

If possible please provide a log by uploading here.
Detailed instructions can be found here:
http://code.google.com/p/mytracks/wiki/HowToReportErrors

E/AntSensorManager( 1096): Unable to reset ant.
E/AntSensorManager( 1096): com.dsi.ant.a.a: Unknown ANT Interface error
E/AntSensorManager( 1096):      at com.dsi.ant.a.e(MT:978)
E/AntSensorManager( 1096):      at 
com.google.android.apps.mytracks.services.sensors.ant.AntSensorManager.requestRe
set(MT:268)
E/AntSensorManager( 1096):      at 
com.google.android.apps.mytracks.services.sensors.ant.AntSensorManager.access$5(
MT:265)
E/AntSensorManager( 1096):      at 
com.google.android.apps.mytracks.services.sensors.ant.AntSensorManager$1.onServi
ceConnected(MT:99)
E/AntSensorManager( 1096):      at com.dsi.ant.b.onServiceConnected(MT:249)
E/AntSensorManager( 1096):      at 
android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1064)
E/AntSensorManager( 1096):      at 
android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1081)
E/AntSensorManager( 1096):      at 
android.os.Handler.handleCallback(Handler.java:587)
E/AntSensorManager( 1096):      at 
android.os.Handler.dispatchMessage(Handler.java:92)
E/AntSensorManager( 1096):      at android.os.Looper.loop(Looper.java:130)
E/AntSensorManager( 1096):      at 
android.app.ActivityThread.main(ActivityThread.java:3701)
E/AntSensorManager( 1096):      at java.lang.reflect.Method.invokeNative(Native 
Method)
E/AntSensorManager( 1096):      at 
java.lang.reflect.Method.invoke(Method.java:507)
E/AntSensorManager( 1096):      at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
E/AntSensorManager( 1096):      at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:624)
E/AntSensorManager( 1096):      at dalvik.system.NativeStart.main(Native Method)

Please provide any additional information here:

The ANT Radio Service release note states that with the update, Sony phones 
'may take time to re-enable on app-start'.

SOLUTION:
Change AntSensorManager.java such that openChannel and requestReset are called 
in statusReceiver when the ANT_ENABLED_ACTION  message is received.

Original issue reported on code.google.com by achimenc...@gmail.com on 26 Mar 2013 at 12:04

GoogleCodeExporter commented 9 years ago
I have been able to reproduce this using MyTracks 2.0.4, Android 2.3.4 and with 
the most recent released ANT Radio Service v4.0.0 on a Sony Xperia Ray.

I can work on this in the upcoming weeks.

Original comment by mikmiste...@gmail.com on 18 Jun 2013 at 10:51

GoogleCodeExporter commented 9 years ago
We have seen this issue with other apps using ANT and will be fixed in the next 
release of ANT Radio Service. No change to MyTracks will be required.

Original comment by mikmiste...@gmail.com on 25 Jun 2013 at 10:01

GoogleCodeExporter commented 9 years ago
This is no longer an issue with the recent release of the ANT Radio Service 
version 4.1.0 which contains a fix for the cause of this bug. No change to 
mytracks is needed; just update to the newest ANT Radio Service version and 
this will eliminate the problem/error connecting to ANT+ sensors!

Original comment by mikmiste...@gmail.com on 19 Aug 2013 at 4:39

GoogleCodeExporter commented 9 years ago
Have you tested this on your Xperia Ray? On my Xperia Active, with ANT Radio 
Service version 4.1.0, I have still no luck. Although I was able to connect a 
sensor, after stopping and restarting MyTracks it won't connect again. On my S3 
with ANT+-USB-dongle, I get no problems.

Original comment by achimenc...@gmail.com on 20 Aug 2013 at 8:34

GoogleCodeExporter commented 9 years ago
The only difficulty I am seeing is if you start recording and immediately go to 
the sensor state activity then the state seems to get stuck in 'Connecting' 
with the logs reporting that the sensor data set being null. This happens the 
first time you start mytracks too; no need to stop/restart. Is this the 
behaviour you are seeing? This might be a separate issue than having 
difficulties connecting with BT off.

Good news is that the difficulty connecting to ANT+ sensors with BT off is gone 
having tested this on my Xperia Ray. Can you confirm this as well?

Original comment by mikmiste...@gmail.com on 20 Aug 2013 at 9:06

GoogleCodeExporter commented 9 years ago
Unfortunately, no. Just checking again on the Xperia Active: with BT off, no 
connection at all. With BT on, starting recording most of the times shows the 
ANT icon in the status bar, and sensor state activity shows sensor data. In one 
occasion, ANT+ would not start without stopping and starting the recording.

Original comment by achimenc...@gmail.com on 20 Aug 2013 at 9:36

GoogleCodeExporter commented 9 years ago
MyTracks must wait for ANT to be enabled before trying to use it (as the 
original posted solution proposes).
This would always have been an issue (not just since ANT Radio Service 3.4), 
but is more noticeable now that the ANT Radio Service does not run forever, 
requiring ANT to be enabled each time it is started.  Some devices do not 
(usually) see an issue simply because they enable quickly enough that no ANT 
requests occur before the enable is complete.

Original comment by rohanlma...@gmail.com on 21 Aug 2013 at 6:48

GoogleCodeExporter commented 9 years ago

Original comment by jshih@google.com on 14 Oct 2014 at 8:42