ODK collect on emulator

Hi All,
I just want to know if it is normal on the emulator to have a sending
failed message eventhough the form has been submit to the local server.

Regards,

PC

Hi Patrice,

I ran into the same issue with using an emulator to connect to my ODK
Aggregate server. The issue arises because the form list (which your
emulator connects to using http://10.0.2.2/ODKAggregate/formList)
returns the list of forms of, but the urls to the forms are shown as:
http://localhost/ODKAggregate/myform.xml (or whatever your server url
is). The emulator then tries to connect to localhost to get the form -
but as localhost is actually the emulator OS, not your PC, the request
fails.

The way I got around it was to change the ODK Aggregate server url to
be 10.0.2.2 temporarily whilst you are downloading the forms to your
emulator - then switch back once you are done. Have a look at this
message from Mitch about to change the server url without rebuilding
the whole ODKAggregate.war file:
http://groups.google.com/group/opendatakit/browse_thread/thread/d9ce9017a3e9432c/f5466589dba20092.
Hope that makes sense, there may be better ways to do this - but it
worked for me.

For me, it would be good if the formList response used the same url
that the form list was requested on, rather than the server url as
this would then avoid these issues, but not sure how easy this is to
change in the code.

Cheers,
Alex

··· On Sep 19, 6:49 pm, Patrice CLEDO wrote: > Hi All, > I just want to know if it is normal on the emulator to have a sending > failed message eventhough the form has been submit to the local server. > > Regards, > > PC

I've created an enhancement request for this
http://code.google.com/p/opendatakit/issues/detail?id=326

If you have internet connectivity, another solution that doesn't require
continually changing the server configuration, is to make use of any of the
"dynamic DNS" services that allow you to specify one of their fully
qualified hostnames to identify your laptop and that service will forward
requests for that hostname to your laptop. To use these, you would run the
client-update program for that service immediately after connecting to your
wifi hotspots (since each wifi hotspot will assign your laptop a different
IP address). And you would configure ODK Aggregate with the service's
fully-qualified hostname for your laptop.

If you don't have internet connectivity, then you can should be able to use
the hostname of the computer during the configuration of your server. To
find your hostname, open a cmd window (Windows) or a Terminal (OSX) or xterm
(Linux). Type 'hostname' The name that is displayed should be used for the
configuration of your server.

Then, if you are connecting the phone via USB to the laptop, you should then
be able to use that hostname instead of 10.0.2.2 as the URL for the server.
Otherwise, if you are connecting the phone via wifi to the laptop, you would
want to configure the laptop to itself be a wifi access point (to accept
client connections) and connect the phone directly to the laptop via this
access point, rather than through an intermediary access point like, e.g.,
Starbucks'.

Mitch

··· On Tue, Sep 20, 2011 at 1:01 AM, Alex Little wrote:

Hi Patrice,

I ran into the same issue with using an emulator to connect to my ODK
Aggregate server. The issue arises because the form list (which your
emulator connects to using http://10.0.2.2/ODKAggregate/formList)
returns the list of forms of, but the urls to the forms are shown as:
http://localhost/ODKAggregate/myform.xml (or whatever your server url
is). The emulator then tries to connect to localhost to get the form -
but as localhost is actually the emulator OS, not your PC, the request
fails.

The way I got around it was to change the ODK Aggregate server url to
be 10.0.2.2 temporarily whilst you are downloading the forms to your
emulator - then switch back once you are done. Have a look at this
message from Mitch about to change the server url without rebuilding
the whole ODKAggregate.war file:

http://groups.google.com/group/opendatakit/browse_thread/thread/d9ce9017a3e9432c/f5466589dba20092
.
Hope that makes sense, there may be better ways to do this - but it
worked for me.

For me, it would be good if the formList response used the same url
that the form list was requested on, rather than the server url as
this would then avoid these issues, but not sure how easy this is to
change in the code.

Cheers,
Alex

On Sep 19, 6:49 pm, Patrice CLEDO masterpcl...@gmail.com wrote:

Hi All,
I just want to know if it is normal on the emulator to have a sending
failed message eventhough the form has been submit to the local server.

Regards,

PC

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Mitch Sundt
Software Engineer


University of Washington
mitchellsundt@gmail.com