Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

using sensor simulator data as input for my app on android emulator

Avatar
Rank

Total Posts: 4

Joined 0

PM

I have seen the android api demo is working fine except I can't receive data since I don't have any sensors but one Garmin USB stick. So I was thinking to replace the emulator bridge with sensor simulator program with my modifications to include a server socket which tries to send data to the emulator but no luck. I can see that emulator is being accepted by my socket but on the emulator side not. What is exactly I need to send to the emulator so that the emulator will be connected and will be receiving data??      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

Do you have an ANT enabled phone as well, or do you only have one ANT USB stick and have been doing your work with the emulator.
To be able to test an ANT connection, you need two ANT enabled devices, so that would be

1) ANT+ Simulator connected to ANT USB stick
2) Android Emulator connected to ANT USB stick running ANT+ demo
OR
ANT enabled phone running ANT+ demo

You do not need to do any changes to the simulator to be able to simulate a sensor, all you need is the software and a USB stick.

So if you only have one USB stick, you will need to get a second one for your development.      
Avatar
Rank

Total Posts: 4

Joined 0

PM

Hi,
Thanks for your quick reply. I have only one USB and the software including the emulator bridge. I understand what you have explained but I need atleast to display fake data that can be sent from the sensor simulator with single USB.      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

We highly recommend to use a second USB stick for your development. Trying to fake out the high application level data without a working ANT connection will not really provide your application a proper test of how it would work with a real sensor. You do need two ANT nodes for a working ANT connection.      
Rank

Total Posts: 8

Joined 0

PM

alejandra - 08 November 2012 08:50 AM
Do you have an ANT enabled phone as well, or do you only have one ANT USB stick and have been doing your work with the emulator.
To be able to test an ANT connection, you need two ANT enabled devices, so that would be

1) ANT+ Simulator connected to ANT USB stick
2) Android Emulator connected to ANT USB stick running ANT+ demo
OR
ANT enabled phone running ANT+ demo

You do not need to do any changes to the simulator to be able to simulate a sensor, all you need is the software and a USB stick.

So if you only have one USB stick, you will need to get a second one for your development.



So exactly what is the second ant sub stick doing for us? Why is it needed? On a real Android device I would plug in a single usb stick and be good to go.

My overall question is how do I setup two usb ant sticks on my pc, using the android emulator, and the ant sensor simulator?

For a more verbose discussion of my situation read below.

I'm working on an Android app that will make use of a Ant USB2 stick. My goal is to use the Android Emulator and plug the one Suunto MoveStick Mini usb stick I have and run the simulator to have my Android app pickup the data. I ran into a issue though as outlined below.

I was able to validate the sensor simulator with just my usb stick will generate data and the usb will pick it up so I'm good as far as basic setup goes. My problems come in when I try to do things with the Android emulator. I have the emulator bridge setup and working. When I run the Ant+ demo on the emulator it opens and waits for data. But when I run the simulator and try to connect to the usb stick I get an error in the simulator that says "ANT Initialization Failure". My high level guess is the bridge to android has basically a lock on the usb stick so the sensor simulator can't get a handle to it. So it appears I need a second ant usb stick.

If I do need another one do I just plug it in and point the sensor simulator to it and it will forward it's data to the usb stick that the android bridge has?

Any help would be great.

Thanks      
RankRankRankRank

Total Posts: 122

Joined 2010-10-25

PM

You use something like the sensor simulator to make one ANT USB stick transmit data in a controlled manner. You use the other ANT USB stick with the Android Simulator bridge to recive the data and get the data into the Android simulator and you running your Android code on.

The reasson for this is simply that the PC hosted applications can only have a single application talking to a single stick. As you want to generate data you need one stick for the Sensor simulator and as you want to receive the data you need another stick for the Android Simulator bridge.

Ifor