2018-07-24 Web Server Not Working

Discussion forum about Wimborne Model Town's Town Quiz Web Server.
Post Reply
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

2018-07-24 Web Server Not Working

Post by TerryJC »

This morning, Penri reported that the Web Server wasn't working and when I checked I confirmed that he was correct. I tried resetting the server Pi and swapping the SD Card on site, but I still couldn't get a connection, so I brought it home.

This was the old (2017/early 2018) version of the Web Server software, so it didn't have the Captive Portal code or the latest (error corrected) web pages.

I spent some time this morning testing the Web Server hardware and software and eventually realised that for my Android phone at least, I needed to turn mobile data off to get it to work reliably. The frustrating thing is that the system would get there in the end with mobile data on; it just took several minutes to do it :( To add to the problem, if I had mobile data off, then connected to the WiFi, I could subsequently turn mobile data on and the pages still work.

Most confusing :!:

My wife's Android 8.0 phone just works :roll:

Along the way, I've installed the latest web pages and will redeploy later today.

Penri,

The next time you are in WMT, could you try it again?
Terry
Penri
Posts: 1284
Joined: 18/05/2017, 21:28

Re: 2018-07-24 Web Server Not Working

Post by Penri »

Terry

Very frustrating situation. I'll be popping into town later today, I'll give it a go then.


Hwyl

Penri
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: 2018-07-24 Web Server Not Working

Post by TerryJC »

Plan Z

When i was at the WMT the other day I happened to notice that my phone got a sniff of the Office Router WiFi signal while I was inside the Railway Room Store. When I got home this nagged me and I remembered that my old Edimax USB WiFi Adaptor has a removable antenna. I thought about this for a while and wondered if the Office WiFi could be captured in sufficient strength to make it usable if I put the antenna on a pole, so I ordered a 6 m Antenna Extension Lead and a 1.8 m USB Extension lead from eBay (total cost just over a fiver).

They arrived on Friday and I was able to connect to my home WiFi with both cables attached, so I've created an updated SD Card to utilise the USB Adaptor and turn off the internal WiFi and Bluetooth adaptors.

This afternoon I popped into the WMT and proved that I could get a usable signal from the Office Router at the rear of the Railway Room with the Edimax plugged into my laptop. I couldn't see any signal from the Office from inside the Railway building however. I didn't try to put the antenna on a pole because of the weather, but I'm reasonably confident that if we can get the antenna a metre or two above the Lady Hanham Building roofline, It should work well.

I'd like to try this on Tuesday using the bits that I've bought, plus my Edimax and a decorators extension pole to get the antenna up to the right height (the weather forecast is currently dry). If it works, then I think we should make it permanent with a proper pole and an outdoor antenna (we could get a directional one from eBay for less than £9). We would also need to get another USB adaptor, because I still use mine for my old Pis (they're about £5-10).

So for a total of around £20-30 we should be able to get the Webserver working properly without the WMT spending out on mains wiring changes in the Railway Room or a Phase Coupler. (I expect that the Office wiring will still need doing, but there is no urgency for that.) I daresay that the Powerline Adaptors that I've already bought will be useful to provide me with an Ethernet connection in my Workroom so I'm happy to write the cost of those off.

Thoughts?
Terry
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: 2018-07-24 Web Server Not Working

Post by hamishmb »

Sounds good :)

Glad you found a working solution.

Hamish
Hamish
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: 2018-07-24 Web Server Not Working

Post by TerryJC »

TerryJC wrote: 29/07/2018, 19:43 Plan Z

(Sitrep)

So for a total of around £20-30 we should be able to get the Webserver working properly without the WMT spending out on mains wiring changes in the Railway Room or a Phase Coupler. (I expect that the Office wiring will still need doing, but there is no urgency for that.) I daresay that the Powerline Adaptors that I've already bought will be useful to provide me with an Ethernet connection in my Workroom so I'm happy to write the cost of those off.
Well. As Penri and I have discovered, Plan Z proved to be less than promising, not least because the Office WiFi signal is very variable, allegedly because people keep walking in front of it! In fact, it turns out that the Cafe PoS WiFi Adaptor suffers from time to time, even though it's less than 10 m from the Router. I think the best high-gain directional antenna in the world might struggle with that.

Penri and I discussed this yesterday and came up with three costed solutions, which I sent to Greg. These were; the risky and relatively expensive WiFi solution above. The original Powerline solution which has pretty high cost because of the unknown factor of the cost of themains electrical modifications. The final option turned out to be the cheapest; run some more Cat 5! Penri and I have agreed that we won't need to use armoured cable, because we aren't burying it, so for the cost of 40 m or so of standard Cat 5e and some wall mounting pattresses, we should be able to get this to work.

The next step is to do some proper measurements, just in case we buy a reel of cable that's 1 cm too short. :D
Terry
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: 2018-07-24 Web Server Not Working

Post by TerryJC »

The good news is that the updated and upgraded Webserver is now working. After all the efforts to make this solution work using a WiFi Antenna to connect to the Office WiFi, we have reverted to a pure Ethernet solution with no adaptors other than a USB / Ethernet one. The new configuation is shown below:
Webserver_Filter_V0.4.gif
Webserver_Filter_V0.4.gif (57.49 KiB) Viewed 1041 times
We have now laid in about 35 m of Cat 5e Ethernet cable between the Office Router and the Pi in the Model Railway Room Store. The Pi is now configured to use nodogsplash to set up a Captive Portal and manage the routing between the Visitor's device and the Internet. Basically access is granted only for long enough for the device to be satisfied that the AP has a route to the Internet; once the Visitor has clicked on 'Continue' on the Welcome Splash Page, it is then denied and the Visitor thenceforth only has access to our webserver.

There is a downside :( If the path to the Internet that the Visitor's device sees is stronger from his 4G data connection than from our WiFi, then the device will try to use that path. One solution is to turn off data on the device, the other is to get pretty close to the AP; either worked with the devices that we tried this morning.

This is a pain though because we moved the AP to the other end of the site to overcome connection problems and that has largely worked; users can see and connect to the WiFi AP pretty much anywhere on the site. Unfortunately, the problem that I outline above is most apparent near the Entrance :x , which is the last thing we wanted.

Unfortunately, the only solution that I can think of at the moment is to put in one or more WiFi Repeaters. These would have to be outdoor types, unless we could somehow get the same signal to a standard WiFi Antenna (such as I was playing with last week), but I cannot think of an easy way to do this.

I suspect the setup as it is today will suffice for most people's devices (this is not a problem for laptops or tablets that have no 3 or 4G connection; only for phones and those few tablets that come with a 4 G data link.
Terry
Penri
Posts: 1284
Joined: 18/05/2017, 21:28

Re: 2018-07-24 Web Server Not Working

Post by Penri »

Well done Terry!
Post Reply