5

Our trainers experience bad internet connections at some schools. I would like to provide them with a "mobile" (as in take it on the train) version of our platform running on a laptop, which the students can connect to directly via a private WiFi network. "The internet in a suitcase".

Equipment:

Past Progress:

As a proof of concept, I was able to serve the platform on ubuntu with the wifi set to AP mode - this would not be sufficient in a real-world setting because of the range, and simultaneous connections limitations.

Help:

I am generally looking to be pointed in the right direction with some keywords I might be missing, or told "no, none of this will work" - the crux of it is:

What do I need to do with the Raspberry Pi / Laptop / Access Point to allow users connected to the access point to access the website via their browser i.e type in portable.xyz.com in the address bar of their smartphone, get served a website running on the laptop?

My Guesstimate:

  • On the Raspberry Pi

    • set up a DHCP server because the AP doesn't have one.
    • set up a DNS server so that portable.xyz.com would point somewhere.
    • set up the controller software for the Access Point.
  • On the laptop

    • Set up the server and make sure it's serving on port:443/80 (there are other services on other ports so set them up too).
    • ? I am not sure how the Raspberry Pi knows that there is a server on the laptop.
      • Is it the relationship between the DHCP IP address configuration and the laptop's IP address (which I would have to configure as fixed)? The DNS setting for portable.xyz.com would then have A records pointing to the laptop's fixed IP?

Other info:

We expect the typical load to be 15 - 100 simultaneous connections, on a range of hardware (tablets, cellphones, laptops).

The platform is not incredibly data-intensive (mostly text and images), but there is a lot of traffic flying around i.e. collaborative text editors, notifications ...etc

Dismissing the "No internet connection available on this wireless network" notification on smartphones is not a problem.

Allansideas
  • 153
  • 5

1 Answers1

6

That all sounds like a perfectly sensible solution to your problem, and you've more or less answered your own questions correctly already.

Specifically:

I am not sure how the Raspberry Pi knows that there is a server on the laptop.

The raspberry pi doesn't need to "know" anything about the laptop. Clients accessing the website will do so in a browser, by putting in the hostname portable.xyz.com which you will resolve using the DNS server running on the pi in your solution to the IP address of the laptop, which will then serve the content based on its web server configuration. This leads to your next question:

Is it the relationship between the DHCP IP address configuration and the laptop's IP address (which I would have to configure as fixed)? The DNS setting for portable.xyz.com would then have A records pointing to the laptop's fixed IP?

Yes, the easiest thing to do in this scenario would be to configure the laptop with a fixed IP (which you can do either via a DHCP reservation or by configuring a fixed IP manually on the laptop), and adding a DNS record on the pi for the laptop. One solution to this might be to just use the laptop's hostname to connect to the website, as some dhcp/dns servers will automatically register reserved hosts in DNS (e.g. dnsmasq)

As an aside, two points:

  1. What we've described above is basically a build-your-own-WiFi-router setup but using a separate access point and router (the router in this case is the raspberry pi). You might consider simplifying the setup to just purchasing an inexpensive WiFi-enabled router to handle all of the above instead.
  2. You may have a reason for using a separate laptop to host the web content, but an alternative would be to serve it also from the raspberry pi (if you do end up using one).
BE77Y
  • 2,697