Author Topic: Android  (Read 68850 times)

chrismills

Re: Android
« Reply #45 on: September 13, 2015, 12:37:40 pm »
Instructions

1. Build your PilotAware box and get a licence code from Lee.
2. Download PilotAwareAndroid from the PlayStore to your phone (or tablet). This device must have GPS receiver.
3. Set up your Nav Software. This will depend on which software you have but Lee has posted instructions elsewhere on the forum.

          For SkyDemon you need to make the following changes
               Settings>Setup>Navigation Options>Other Traffic>Show Within Vertically  =  50000ft
               Settings>Setup>Connectivity Options>External GPS/Traffic Source = FLARM
               Settings>Setup>Connectivity Options>FLARM Options>Air Connect Key  =  6000

4. Power up your PilotAware box and wait patiently for it to finish booting. This takes about 20 seconds on my unit.The best way to tell is to look at you devices WiFi settings. You'll see the PilotAware WiFI access point(AP) appear. It should look something like PilotAware-1234567890

5. Connect the PilotAwareAndroid device to the PilotAware WiFi AP. This is an open network and no password is required.
6. Start the PilotAwareAndroid software. The top line of the display will confirm you are connnected to the right AP.
7. Wait for a GPS fix to be made. The rest of the PilotAwareAndroid display will be populated with live data and update regularly.

8. Connect your Nav device to the same PilotAware AP as above (PilotAware-1234567890).
9. Start your Nav software if not already.
10. Go Flying

          Again, in Skydemon when you click "Go Flying" you need to chose "FLARM location". Sometimes takes a few moments to update at this stage.
          Unless you're in a GA ADS-B rich area the most likely traffic you will see is high level commercial flights.
         Once you're happy the system is working it probably makes sense to go back and alter the >Other Traffic>Show Within Vertically setting

Hope this helps

Chris
         

Russ_H

Re: Android
« Reply #46 on: September 13, 2015, 02:54:47 pm »
Had a successfull test of Android version riding around Cardiff with it strapped to my rucksack.
Got pickups as far away as Northolt


All good apart from the attention from the old bill in a  Beemer..............careful out there

P.S. How do you take a screenshot on a Nexus7?

BobD

Re: Android
« Reply #47 on: September 13, 2015, 11:24:51 pm »
Hi Lee & Chris,

Successfully tested the Android version on my HTC ONE phone tonight, at home.  Not much commercial stuff flying above Sheffield at this time of night, but did pick up a few, so thanks for getting the Android version up and running.

BobD

Jodelman

Re: Android
« Reply #48 on: September 14, 2015, 10:17:49 am »
Thanks Lee & Chris. Now working well on my Nexus 7

onkelmuetze

Re: Android
« Reply #49 on: September 15, 2015, 04:02:53 pm »
Tried to jnstall on galaxy tab mini gt-p3100, but play store says it is not compatible. Any solution?

ianfallon

Re: Android
« Reply #50 on: September 15, 2015, 04:16:02 pm »
Works basically well on my Asus Nexus style Android tablet as well as on the iPhone. Thanks guys.

Chris - sometimes Skydemon seems to get stuck "Searching For GPS" and closing and re-running the PilotAware app on the Android tablet seems to fix it. Perhaps there are some combinations of order of startup or parts coming and going that aren't quite covered. Not sure I can accurately reproduce yet - will try and get a clear reproducer and report back.



chrismills

Re: Android
« Reply #51 on: September 15, 2015, 07:54:41 pm »
How old is the Galaxy tab mini and which version of Android are you running.  Check Settings > About Device > Android version.  Some of the code required slightly more up to  API features so older versions of Android might not work.

chrismills

Re: Android
« Reply #52 on: September 15, 2015, 08:02:47 pm »
Thanks Ian. If you manage to pin down a specific problem then let me know. There's some complicated stuff about process lifespan, pause and resume and multi threading that happens in the background of Android apps and might be responsible for dropping signal and stuff. I'm not sure i really understand it all quite yet
Also, if your device loses a gps fix PilotAwareAndroid sends null data to the PilotAware box which I guess might upset your SD.
Chris

ianfallon

Re: Android
« Reply #53 on: September 15, 2015, 08:20:33 pm »
Try this Chris:

- ensure your device will only connect to the PilotAware wifi

- get everything up and running

- pull the plug on the Pi

- plug in Pi

- Go Flying again in SkyDemon

For me I need to close and reopen PilotAwareAndroid before it will work again

chrismills

Re: Android
« Reply #54 on: September 15, 2015, 09:41:44 pm »
Ahhhaaa

So this problem I think is due to the way the software sets up the TCP socket connection. This is done once when the app starts and isn't checked again. I'll see if I can rectify. For now cancelled I suggest leaving the Pi on while the system is running. 
Chris
« Last Edit: September 16, 2015, 01:13:49 am by chrismills »

Admin

Re: Android
« Reply #55 on: September 15, 2015, 09:49:20 pm »
Ahhhaaa

So this problem I think is due to the way the software sets up the TCP socket collection. This is done once when the app starts and isn't checked again. I'll see if I can rectify. For now can I suggest leaving the Pi on while the system is running.  😉
Chris

Hi Chris
I think I see what is happening here, you need to setup a timeout on the connection, one of the annoying things with TCP that you do not worry about with UDP, UDP is connectionless, probably different in Java, but in C, I do the following for the TCP siockets

Quote
    struct timeval timeout;
    timeout.tv_sec = SOCK_TIMEOUT;
    timeout.tv_usec = 0;
    setsockopt(sockP->accfd, SOL_SOCKET, SO_SNDTIMEO, (char *)&timeout, sizeof(timeout));
    setsockopt(sockP->accfd, SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout, sizeof(timeout));

Thx
Lee

ianfallon

Re: Android
« Reply #56 on: September 15, 2015, 10:17:34 pm »
How old is the Galaxy tab mini and which version of Android are you running.  Check Settings > About Device > Android version.  Some of the code required slightly more up to  API features so older versions of Android might not work.

For info my old Asus Memopad is running 4.2.2 and is OK

I am stuck on an older version of SkyDemon though: 3.3.2.20289

rg

Re: Android
« Reply #57 on: September 16, 2015, 09:31:12 am »
Testing thismorning and I forced PilotAwareAndroid to stop after all detected and location found. I wasn't moving when I did that but Skydeamon continued quite hapily.  I could see ADS-B traffic moving my no warning that I'd lost my GPS.  Thats a bit of a concern.

ianfallon

Re: Android
« Reply #58 on: September 16, 2015, 10:40:14 am »
Testing thismorning and I forced PilotAwareAndroid to stop after all detected and location found. I wasn't moving when I did that but Skydeamon continued quite hapily.  I could see ADS-B traffic moving my no warning that I'd lost my GPS.  Thats a bit of a concern.

I noticed this too - I put it down to SkyDemon using the tablet GPS directly for its location info and PilotAware (ADS-B side) for traffic, but the ARF interface on the PilotAware would no longer be getting position information to transmit on the ARF radio side of things. Is that right ? I can't test the ARF side yet.

rg

Re: Android
« Reply #59 on: September 16, 2015, 11:02:01 am »
I'm also noticing that the ADS-B traffic seems to vanish everynow and then....I can still see the traffic in FR24 quite close by buts it no longer showing in SD.