For debugging or for reporting errors it is often useful to retrieve the logs of the ANT serial communication to investigate the contents and ordering of the ANT packets directly.
To enable serial logging, before you open your connection to the device:
requires a define and two function calls:*
---C++ if using DSIANTDevice---
requires calling member function:*
void DSIANTDevice::SetDebug(BOOL bDebugOn_, const char *pcDirectory_)
requires a single function call:
requires using an additional app to get the serial info output to logcat:
-Download the ANT Service Settings APK from the SDK (https://github.com/ant-wireless/ANT-Android-SDKs/tree/master/ANT_Android_SDK/Tools
-Run the app and change the ‘All Logging’ setting to ‘Enabled’
(if you don’t want all the logging, then only enable the serial logging option)
-All the service logging and ANT serial messaging should now show in the logcat output
*Additionally, if you are building the libraries from source, you need to compile with the DEBUG_FILE defined. It is not defined by default in most code we release.