Author Topic: Change PAW to join a network rather than act as a hotspot  (Read 8806 times)

gwyn_carwardine

Change PAW to join a network rather than act as a hotspot
« on: April 12, 2017, 12:10:19 pm »
Just got my PAW and got it up and running and my only complaint is that I want to join an existing Wifi network rather than hosting an access point.

I guess it must be possible to change the OS files to configure the WiFi to join an existing SSID, possibly with a static IP?

What I don't know though is how SkyDemon would locate it as we don't give it any IP details. Presumably related to the 6000 we type into SD configuration?

Why do I want to do this? 1. I want to be able to connect the PAW to an existing network on the ground (use as ground station) and 2. In the air I want my phone/tablet connected to the Internet as well as PAW.

I even have a 4G router that I would keep under the bonnet purely to establish local internet hotspot within the plane.

I work in IT with lots of OS & programming experience so I only need a few pointers.

Cheers

Admin

Re: Change PAW to join a network rather than act as a hotspot
« Reply #1 on: April 12, 2017, 03:25:33 pm »
Hi
The WiFi is only configured to run as a SoftAP (Access Point)

but of course there is a wired connection as well, you can connect this to your ethernet port and I would recommend configuring for dynamic IP Address.
Then go look at your router for the allocated IP.

From your network you can then (for example) pickup the Flarm messages intended for the NAV Device
$ telnet <ip-address> 2000

thx
Lee

gwyn_carwardine

Re: Change PAW to join a network rather than act as a hotspot
« Reply #2 on: April 12, 2017, 06:13:18 pm »
The Wifi configuration can be presumably changed though by going into the Pi and changing it? It's a WiFi dongle so it should be capable or hosting or joining a network and not running an access point and DHCP server.

But the next question is going to then be - how do you then tell SkyDemon where to find the FLARM data? Is SkyDemon hardcoded to telnet 192.168.1.1 : 2000 ? And therefore the FLARM must always have the IP Address 192.168.1.1 ??

I asked SkyDemon but they were positively unhelpful.

As an aside - what are the login credentials for the raspberry pi? I guess you log in as pi and sudo root... I tried pi / raspberry which seems standard and that didn't work
« Last Edit: April 12, 2017, 07:26:17 pm by gwyn_carwardine »

Paul_Sengupta

Re: Change PAW to join a network rather than act as a hotspot
« Reply #3 on: April 12, 2017, 09:13:59 pm »
Is SkyDemon hardcoded to telnet 192.168.1.1 : 2000 ? And therefore the FLARM must always have the IP Address 192.168.1.1 ??

Yes.

I asked SkyDemon but they were positively unhelpful.

I think you need to know the question properly before getting the answer. If your question is "But the next question is going to then be - how do you then tell SkyDemon where to find the FLARM data?" - the answer is you don't, it just does find it, on the correct IP address (192.168.1.1, port 2000, as you say). I don't think they're unhelpful, they're just trying to tell you that you link the two together and it works.

But like I said on the Flyer thread, you can have both the Static/DHCP address on the ethernet port *and* 192.168.1.1 on the ethernet port if you plug in the Wifi dongle while connected to an ethernet network. Sky Demon, connected to your home network, will then find it. That's assuming your router isn't on 192.168.1.1.

To use it as a ground station you need to either plug it into an ethernet port, or connect directly to the PAW's wifi hotspot.

As an aside - what are the login credentials for the raspberry pi? I guess you log in as pi and sudo root... I tried pi / raspberry which seems standard and that didn't work

Logging in is not available as the software is locked down. You're not allowed in. It's not supposed to be user configurable apart from through the web interface.
« Last Edit: April 12, 2017, 09:16:05 pm by Paul_Sengupta »

gwyn_carwardine

Re: Change PAW to join a network rather than act as a hotspot
« Reply #4 on: April 13, 2017, 11:37:29 am »
I now have PAW working on 192.168.1.234

It has to be in the subnet 192.168.1.* to join the home network - [most home networks default to this]

You can't then have the Wifi dongle plugged in at the same time as that will create a new 192.168.1.* subnet with and that is going to create a conflict.

So for the demands of in-cockpit internet available alongside PAW I think what I need to do is:

Purchase a 3G/4G wifi enabled portable router with an RJ45 port - or a combination of a USB stick and portable wifi router as you don't seem to get many pocket all-in-one devices with an RJ45 socket

So for example one of these (for the mobile connectivity)
https://www.amazon.co.uk/d/Shops/Huawei-Unlocked-E3372-Mbps-Dongle/B011BRKPLE/ref=sr_1_16?ie=UTF8&qid=1492077548&sr=8-16&keywords=4g+wifi+router
and one of these (for the wifi)
https://www.amazon.co.uk/TP-Link-Portable-Support-Configuration-Required/dp/B00634PLTW/ref=sr_1_3?ie=UTF8&qid=1492077548&sr=8-3&keywords=4g+wifi+router

I can then buy a SIM card (either PAYG or cheap contract) and put it in the 4G dongle.

Now I can configure the TPLink to have an address of 192.168.1.2 and give out DHCP addresses except for 192.168.1.1
The PAW can now be configured to static address 192.168.1.1 and be plugged into the the TPLink with an ethernet cable

Now I can connect any devices in the cockpit to the TPLink wifi network and SD will then successfully locate PAW on 192.168.1.1

There are some mobile comms devices that enable you to plug a cheap lightweight aerial in to get better coverage (not the USB stick I listed above).

[ It has been suggested elsewhere "why don't you get a tablet with a SIM in it?" but AFAIK that does not work. It certainly doesn't work on the phone - if you connect to a wifi network then you no longer have access to mobile data. Perhaps that's just my Android phone. Perhaps iPads are different. But I can't imagine it... ]

Paul - you said something elsewhere about not using mobile devices in the air - AFAIK that was an old complaint that doesn't apply anymore as they now have some sort of protection/mitigation in the cell towers to prevent problems. Is it still a problem? More importantly - are there any rules against it? The boffin at Vodafone I used to deal with (he had the entire Vodafone ecosystem modeled in his lab) suggested not an issue any more (this is going back a few years now too) and also said that the coverage in the air would be getting better with the newer technology.

JCurtis

Re: Change PAW to join a network rather than act as a hotspot
« Reply #5 on: April 13, 2017, 12:49:04 pm »
[ It has been suggested elsewhere "why don't you get a tablet with a SIM in it?" but AFAIK that does not work. It certainly doesn't work on the phone - if you connect to a wifi network then you no longer have access to mobile data. Perhaps that's just my Android phone. Perhaps iPads are different. But I can't imagine it... ]

You should find the way that PAW provides the IP address to the device it should permit things to work that way.

If you connect to a general WiFi network then yes it will take precedence over the Mobile Data, have you tried connected to the PAW WiFi network and then see if you can get to anything else?  It should work just fine.
Designer and maker of charge4.harkwood.co.uk, smart universal USB chargers designed for aviation.  USB Type-A and USB-C power without the RF interference. Approved for EASA installs under CS-STAN too.

gwyn_carwardine

Re: Change PAW to join a network rather than act as a hotspot
« Reply #6 on: April 13, 2017, 02:05:14 pm »
You should find the way that PAW provides the IP address to the device it should permit things to work that way.

If you connect to a general WiFi network then yes it will take precedence over the Mobile Data, have you tried connected to the PAW WiFi network and then see if you can get to anything else?  It should work just fine.

It is a general wifi network - your phone connects to it and will be given an IP address and a gateway of that same PAW IP address. The phone now needs to know where to route requests outside of the network and so it uses the gateway - which is the called such because it is the way out of the local network. You will notice if your phone ever annoyingly connects to a wifi hotspot in a hotel or similar where you need to somehow authenticate - your mobile data stops working.. it will now only use the wifi - even though you have no internet connection through that. There is no preferential routing along one path and then down another path if that doesn't work.

Try it and see

Paul_Sengupta

Re: Change PAW to join a network rather than act as a hotspot
« Reply #7 on: April 13, 2017, 02:31:09 pm »
I now have PAW working on 192.168.1.234. It has to be in the subnet 192.168.1.* to join the home network - [most home networks default to this] You can't then have the Wifi dongle plugged in at the same time as that will create a new 192.168.1.* subnet with and that is going to create a conflict.

It'll only create a conflict if your home router is on 192.168.1.1. If you plug in the wifi dongle, it'll make the address of 192.168.1.1 available on your home network as well as the DHCP allocated one/static one for the ethernet port. This takes advantage of the home network also being on the 192.168.1.* subnet. My PlusNet router I think is on 192.168.1.254 or 253 or something, not there at the moment to check.

It has been suggested elsewhere "why don't you get a tablet with a SIM in it?" but AFAIK that does not work. It certainly doesn't work on the phone - if you connect to a wifi network then you no longer have access to mobile data. Perhaps that's just my Android phone. Perhaps iPads are different. But I can't imagine it...

I think it works on iPads from what I read on the forum. Have you tried bluetoothing your tablet to your phone?

Paul - you said something elsewhere about not using mobile devices in the air - AFAIK that was an old complaint that doesn't apply anymore as they now have some sort of protection/mitigation in the cell towers to prevent problems. Is it still a problem? More importantly - are there any rules against it? The boffin at Vodafone I used to deal with (he had the entire Vodafone ecosystem modeled in his lab) suggested not an issue any more (this is going back a few years now too) and also said that the coverage in the air would be getting better with the newer technology.

It's prohibited by the licensing conditions of the mobile network itself, so if the companies catch you doing it they can ban you from their network. It's not about any mitigation on the cell sites, it's about you broadcasting from x000ft and causing interference across the network. Is it a problem? Well, in rural areas it shouldn't be really, at least on 4G, but in urban areas you can cause the network to go into overload. When we were developing 3G, before launching the Vodafone network to the public, I took the test equipment up in the aeroplane to see the effects. Blimey. Lots and lots of signalling. Some vendors may provide software to lock you out of the network if you're causing too much signalling but I haven't come across that personally. Certainly on 3G and 4G, the interference issues, as opposed to the signalling issues, aren't as bad as they are on 2G.

(Say hello from me to your Vodafone boffin! :D I'm guessing this is the lab in Avon/Fountain houses or maybe Pear Tree House...or all of the above.)
« Last Edit: April 13, 2017, 02:35:34 pm by Paul_Sengupta »

gwyn_carwardine

Re: Change PAW to join a network rather than act as a hotspot
« Reply #8 on: April 13, 2017, 04:33:51 pm »
I think it works on iPads from what I read on the forum. Have you tried bluetoothing your tablet to your phone?

Yes, I've read all sorts of things like this before.. I'll have to see it to believe it. I know it doesn't work on the Samsung Galaxy series! A lot of people actually know very little but speak as if they know a lot. Perhaps I fall into that category too. I hope not.

It's prohibited by the licensing conditions of the mobile network itself, so if the companies catch you doing it they can ban you from their network. It's not about any mitigation on the cell sites, it's about you broadcasting from x000ft and causing interference across the network. Is it a problem? Well, in rural areas it shouldn't be really, at least on 4G, but in urban areas you can cause the network to go into overload. When we were developing 3G, before launching the Vodafone network to the public, I took the test equipment up in the aeroplane to see the effects. Blimey. Lots and lots of signalling. Some vendors may provide software to lock you out of the network if you're causing too much signalling but I haven't come across that personally. Certainly on 3G and 4G, the interference issues, as opposed to the signalling issues, aren't as bad as they are on 2G.

Looked at Voda's Ts & Cs - not exactly clear - if you can find where they say you can't use your device in the air you're better at this than me :o) In fact I'll even buy you a pint should we meet in real life. There a challenge! This is where I started https://www.vodafone.co.uk/terms-and-conditions/

(Say hello from me to your Vodafone boffin! :D I'm guessing this is the lab in Avon/Fountain houses or maybe Pear Tree House...or all of the above.)
Chap called Martin Bell. Not sure what office he was out of as I only saw him when we were onsite at Centrica working on their Smart Metering architecture. He used to glide at Lasham. I left there a few years ago and spent enough time then in Whitehall on the government's programme to discover that smart meters is the next big disastrous government waste of money. They are years behind schedule and wasting billions of our tax pounds. Billions.

JCurtis

Re: Change PAW to join a network rather than act as a hotspot
« Reply #9 on: April 13, 2017, 04:36:51 pm »
You should find the way that PAW provides the IP address to the device it should permit things to work that way.

If you connect to a general WiFi network then yes it will take precedence over the Mobile Data, have you tried connected to the PAW WiFi network and then see if you can get to anything else?  It should work just fine.

It is a general wifi network - your phone connects to it and will be given an IP address and a gateway of that same PAW IP address. The phone now needs to know where to route requests outside of the network and so it uses the gateway - which is the called such because it is the way out of the local network. You will notice if your phone ever annoyingly connects to a wifi hotspot in a hotel or similar where you need to somehow authenticate - your mobile data stops working.. it will now only use the wifi - even though you have no internet connection through that. There is no preferential routing along one path and then down another path if that doesn't work.

Try it and see

I have just tried my phone and iPad (with a SIM in) connected to the PAW in my lab, I can see traffic on the SD install via WiFi and swap back to a browser and google away quite happily.  Flip back to SD and it is still working just fine.

The PAW doesn't give out a DNS server via DHCP, so clients (well iOS / Mac OS X at the very least) see's this as trigger that the subnet is isolated so will use another route if one is available for all traffic not on that subnet.  I am typing this with my WiFi connected to the PAW and my ethernet connected to the network in the lab.  The only difference between them is the lack of a DNS server in the DHCP response from PAW.

It really depends on how Lee configures the SoftAP and it needs the particular variant of Android to support it.  I don't have an Android device that takes a SIM to test anything here.  If Lee has and can test it (or anyone else) it might be an idea to let others know the device/versions that work and those that don't.


With regard to mobile use in the air, the new Emergency Services Network replacing AirWave (I still have the scars from installing that in a previous role) is based on the EE mobile phone network.  The NPAS aircraft are being fitted with terminals and they work just fine I'm told.

None of my devices connect to a WiFi network I do not explicitly know something about, a hangover from my previous areas of work.
Designer and maker of charge4.harkwood.co.uk, smart universal USB chargers designed for aviation.  USB Type-A and USB-C power without the RF interference. Approved for EASA installs under CS-STAN too.

gwyn_carwardine

Re: Change PAW to join a network rather than act as a hotspot
« Reply #10 on: April 13, 2017, 05:32:22 pm »
I have just tried my phone and iPad (with a SIM in) connected to the PAW in my lab, I can see traffic on the SD install via WiFi and swap back to a browser and google away quite happily.  Flip back to SD and it is still working just fine.

Thanks for that - so it seems I-things work differently to Android. Or certainly to Samsung's custom build of Android! Who knows what monkeying has occurred under the covers!

The PAW doesn't give out a DNS server via DHCP, so clients (well iOS / Mac OS X at the very least) see's this as trigger that the subnet is isolated so will use another route if one is available for all traffic not on that subnet.  I am typing this with my WiFi connected to the PAW and my ethernet connected to the network in the lab.  The only difference between them is the lack of a DNS server in the DHCP response from PAW.

Yes I think I'd expect a computer with a wired connection in addition to wireless to support multiple networks.. multiple NICs...

The Samsung Galaxy definitely won't find a route to the internet even though it essentially has two NICs.

None of my devices connect to a WiFi network I do not explicitly know something about, a hangover from my previous areas of work.

I just leave my Wifi turned on and it autoconnects to anything and everything. I can't be bothered to keep toggling it myself.. I've yet to find an option that allows me to tell it *not* to connect to all those public space WiFi services (which all bear the same SSID)

gwyn_carwardine

Re: Change PAW to join a network rather than act as a hotspot
« Reply #11 on: April 15, 2017, 01:24:33 am »
Received the bits today and configured it all this evening. Works a treat. All devices connecting to the plane's wifi network can now access Internet and pilotaware simultaneously. Even my 45 quid amazon fire tablet works as whilst it doesn't have gps it can use the PAW gps.

Now I just have to install it all!!

Admin

Re: Change PAW to join a network rather than act as a hotspot
« Reply #12 on: April 15, 2017, 08:39:42 am »
Great work!

If you would be interested to put an app note together, we could put it on our pilotaware.com site ?

Thx
Lee

exfirepro

Re: Change PAW to join a network rather than act as a hotspot
« Reply #13 on: April 15, 2017, 09:19:52 am »
Well done Gwyn, persistence has its rewards.

I have just been watching on the sidelines as you are all working way above my networking knowledge level. My solution has been to leave my iPad mine WiFi'd to PAW and connect the pad by BT to my Galaxy S5 to allow SD etc to continue to get Internet updates in flight. Works great for me but lots of users have been unable to get the BT connection to work for some reason and mine is obviously a very basic setup compared to yours.

If you are able to put a  brief 'paper' (photos etc.) together, I for one would be very interested to read it and as Lee has suggested it would be a very useful addition to the information on the PilotAware website.

Regards and again well done!

Peter

Paul_Sengupta

Re: Change PAW to join a network rather than act as a hotspot
« Reply #14 on: April 15, 2017, 11:43:25 am »
Looked at Voda's Ts & Cs - not exactly clear - if you can find where they say you can't use your device in the air you're better at this than me :o) In fact I'll even buy you a pint should we meet in real life. There a challenge! This is where I started https://www.vodafone.co.uk/terms-and-conditions/

Here:

http://www.vodafone.co.uk/cs/groups/configfiles/documents/contentdocuments/vfcon058470.pdf

Section 4.3 (b):

 (b) do anything that causes the Network to be impaired

Chap called Martin Bell.

Ah!