Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Android USB stick support

RankRankRankRank

Total Posts: 122

Joined 2010-10-25

PM

OK so we have a press release about Android usb stick support on the front page.

http://www.thisisant.com/news/stories/first-ulp-sensor-technology-to-connect-android=powered-smartphone-and-tablet-platforms

I can not find anything technical though and I see no update for ANT Radio Services, which I would of expected unless the alpha code was just perfect.

Any further information availible that would alow me to test this with my app.      
Avatar
RankRankRankRank

Total Posts: 129

Joined 2010-11-30

PM

An update to the ANT Radio Service and a new ANT USB Service have been published on the Google Play Store. Once they become available you should receive an update notification.

An updated ANT Android SDK download is also available at http://www.thisisant.com/pages/developer-zone/android-api
This will be a straight drop-in change to your existing apps (hasAntSupport() has been modified).      
RankRankRankRank

Total Posts: 122

Joined 2010-10-25

PM

Thanks for the update.

In have done a bit of digging.

Working out if a phone is USB Host mode capable looks to be a nightmare this USB Host Diagnostics app looks like it may help. It looks like it will be very hard to say phone X will work as the firmware versions look to be very varied at least at the moment.

To use a usb stick I would then need a micro USB OTG style conector. The stick would need to be one of the new USB2 ones.

Looks like I want be able to do a test myself very easily, which makes me a bit worried but I will probobly do the update for my app.

Is there any easy way to tell if the ANT support is coming from a built in chipset or via a USB stick? If I release somthing I would like to have some analitics about devices it is working with.      
Avatar
RankRankRankRank

Total Posts: 129

Joined 2010-11-30

PM

Hi ifor,

You can check if the phone support USB Host by checking for the USB Host Feature:

PackageManager pm this.getPackageManager();
        if (
pm.hasSystemFeature(PackageManager.FEATURE_USB_HOST))
        
{
            
// Device has USB Host
        
}
        
else
        
{
            
// Device does not have USB Host
        


PackageManager.FEATURE_USB_HOST is not defined before Android API Level 12, but the ANT+ Demo source shows how to work around this.

You will either require a USB OTG cable, or be using a tablet with a full-sized USB-A host port.

The ANT API updates were done in such a way that existing apps would not require any redevelopment effort to support USB sticks. The new API which is in the works will handle this better.

Until then, you can send an ANT Version request message and check the first three letters for the chip family of "AOV" or "AUM". This covers the currently available built-in chips.

One caveat that has not yet been documented is how we handle the fact that an Android bug means the USB_ATTACHED event never occurs. We will manually perform a scan for newly attached USB sticks if none were available during an enable, so you will probably want to add an enable/disable button to your GUI.      
RankRankRankRank

Total Posts: 122

Joined 2010-10-25

PM

I have released an update for my Apps. IpBike, IpSensorMan and IpPeloton. The only real changes I have put in are in IpSensorMan. I have removed the uses library clause in the manifest. If the phone is not reporting ANT capable but is USB Host mode capable I bring up a dialog which will link to the ANT USB Service with some suitable text. For now the only other thing is to add USB Host mode capabilities to the analitics I have.

I don't have access to a USB Host mode capable device so have not been able to do any testing. It would be reasuring to know it is working.

I am trying to put together some end user type information see here.
What is the situation with regard to third party ANT USB sticks? The Garmin one is far more availible then the Dynastream one and I belive there are other options as well. It would be good have a fairly good list.      
Avatar
RankRankRankRank

Total Posts: 129

Joined 2010-11-30

PM

I can confirm IpBike will collect ANT+ sensor data with a USB stick.

Regarding which USB sticks to use; there is no problem with using a third-party stick, and they will appear exactly the same to an application (all are an ANT USB Stick 2). Personally I would recommend one of the mini sticks, which at this point is only the Suunto Movestick Mini. DC Rainmaker gives his analysis here: http://www.dcrainmaker.com/2012/02/much-better-usb-ant-stick-for-your.html      
RankRankRankRank

Total Posts: 122

Joined 2010-10-25

PM

Thanks for the third party ANT stick clarification and doing some testing for me. I see in the analitics a TPA60W pairing a good selection of devices.

Also from the analitics yesterday after the update it looks like there are a number of the newer more popular phones showing up as Host mode capable. I can see Galaxy SII, SIII, Galaxy Note and Galaxy Nexus. The Note and the Nexus are both good with IpBike as they have a pressure sensor that I use for improved altitude.

It looks like the Sony Active with the ICS update has host mode support. So the question is with a phone with built in ANT support and Host mode support and an ANT stick pluged in is there any way to make sure the ANT stick is used? Probobly not to big a problem from the end user point of view but from a personal testing point of view it would be nice to be able to test with my Active.      
Rank

Total Posts: 25

Joined 0

PM

as it has been written, the current solution is for smartphones that support the Host mode. At the moment there are no many Android smartphones that support that.

In our company, we have developed an Android accessory that, using the Google ADK, acts as USB host and provides the ANT+ capabilities to any Android smartphone with Android with version number higher than 2.3.4

We are currently planning the line of products. If you want to know more visit our website (http://www.selfloops.com) and give us feedback or comments.
Thanks.

Cheers,
Christian      
RankRankRankRank

Total Posts: 122

Joined 2010-10-25

PM

OK I look to of had some users trying things looking at the analitics. Unfortunatly they do not all look to be being sucessfull.

As best as I can tell the init process is going though to the enable() call and I am getting an AntInterfaceException ,Unknown ANT Interface error. With built in support this is normaly the case when in Airplane mode although I sometimes see it the first time after a reboot.

If the user has the ANT USB service installed but has not plugged in the ANT stick how will the failure occur? If I can work out this case I can give a more sensible error message.

My real problem is not being able to test this myself. When my Sony Active gets it's ICS update it looks like it will have host mode support. Is there a way of forcing host mode and an ANT stick over built in ANT?      
Avatar
RankRankRankRank

Total Posts: 129

Joined 2010-11-30

PM

With the ANT USB Service installed, but no ANT stick inserted, any enable call will fail. If an ANT stick is then inserted, with the current implementation the next enable call will also fail. It will however trigger the ANT USB Service to check for any new inserted sticks (to handle the Android bug of not notifying apps when a USB stick is inserted) and after that an ENABLED intent will be sent out when the stick is usable. The user must agree to give the ANT USB Service permissions to use the stick.

Currently a built-in ANT chip will always take priority over a removable stick, and a Sony Active with USB Host mode will not use the USB stick.      
Rank

Total Posts: 1

Joined 0

PM

Hi There,

I'm testing with an USB ANT+ stick with no luck yet, have anyone idea what to try to make it work?

Here are some details:

Using a Galaxy Nexus with Jelly Bean, the USB Host seems to work, as I can connect a mouse/keyboard/memory using my OTG cable.

I already installed the USB Service and the ANT+ Service, when I connect the USB stick it gets powered and I see the device showing using the USB Host Controller application, but running the ANT Demo app I just see the "Enable ->" text but seems it is not recognized, I'm using the Nordic USB Ant+ Stick (https://www.sparkfun.com/products/8840).

Any help?      
Avatar
RankRankRankRank

Total Posts: 129

Joined 2010-11-30

PM

That USB stick (AP1) is not currently supported by the ANT USB Service, and you require an AP2 (with 8 channels) or newer stick.      
Rank

Total Posts: 1

Joined 0

PM

Hi there.

Did anyone manage to succefully connect a Garmin ANT+ USB2 stick to a Samsung Galaxy S2 via an OTG cable?

I have the following setup, what could be wrong?

Galaxy SII (not rooted, running Android 4.0.3) + OTG cable (able to connect a pendrive and read its contents) + Garmin ANT USB 2 stick (working fine when connected to the PC to upload workouts from my Garmin Forerunner 310XT watch).

I have installed both ANT radio service, ANT USB service and restarted my phone several times. On ANT+ demo, I am can't enable ANT+.

%%%%%%%%%%%%%%%%%%%%% EDIT %%%%%%%%%%%%%%%%%%%%%

Good news! With an Android update (now running 4.0.4), my setup works flawlessly :D      
Rank

Total Posts: 22

Joined 0

PM

What should be a market enabler looks more like a support mine field at the moment.

There are too many variations of SW updates from the phone manufacturers and platform variations.

I looked on here:

http://usbhost.chainfire.eu/

Most of the "double greens" i.e. "it works" are for tablets and not true mobile devices that can be used on a bike with ease / safety. Only exceptions being Samsung as noted above.

Cheers Rob      
Rank

Total Posts: 1

Joined 2013-02-25

PM

I have a Galaxy S III and I managed to make Garmin USB2 Ant+ stick + micro usb OTG adapter work.

I had to enable "USB debugging" in "Settings" - "Developer options" everything went fine, Ant+ Demo recognized my USB stick and I was able to connect with my hrm belt.

Unfortunately Endomondo still can't connect with Ant+ stick, seems it need some update...      
Rank

Total Posts: 3

Joined 2013-03-03

PM

I'm having great difficulty as well connecting my ANT+ sensors (Garmin HRM and Speed/Cadence Sensor) to my phone as well. This is my setup:

Suunto Movestick Mini, OTG cable, HTC 4G LTE running Android 4.1.1 (not rooted) with the latest ANT Radio Service and ANT USB Service. Starting ANT+ Demo just hangs at "Enable ANT" and nothing ever happens. The same thing happens with IP Bike and IP Sensor Man. I never get the option to search for sensors, and when I start ANT Service all I get is "Ant USB Stick connected?" I am doing something wrong? In addition, I've tried using my wireless keyboard and mouse on my phone using the OTG cable and all works well. Please advice and point me in the right direction. Thanks.