Page 1 of 1

Isolated LAN

PostPosted: Thu Sep 13, 2018 6:02 am
by ric
This is not a PIC question (although there is a PIC device indirectly involved ;) )
I want to set up a wi-fi LAN at a sports venue to allow participants to view a small number of web pages.
This LAN will not be connected to the Internet.

I have a NAT wifi router (it's a Linksys WRT54G with stock firmware, although I'm not averse to installing the open-source DD-WRT firmware into it)
I would like to set up DHCP in the router to allocate local IP addresses, and point to a Windows PC as the "Gateway", "Name Server", "DNS server" etc.
The aim is to run some software on this Windows PC that will serve up my web pages regardless of what web site a client attempts to browse to. This is very similar to what happens at Hotels or McDonalds when you connect to their wi-fi. Regardless of the address you browse to, you are directed to a log-in page before you get access to the Internet. I don't know if that's something built into some commercial routers, or how they do it.

I don't mind writing a bit of code to implement this, but really don't want to re-invent the wheel if most of the functionality is already available.
I'm guessing there may already be some packages to do all this.
(Some of them are probably used to hack into LANs by spoofing genuine websites. I'm certainly not trying to hack into anything :) )

So, what's the PIC involvement? This is at a car-club hillclimb venue. All the timing is done by a system I designed around a PIC16F1947. That's doing millisecond timing from four light beams, calculating split-times, run time, speed across the finish line etc. and sending it to a PC via a USB interface. This system is to make the results instantly available to any of the competitors with a smart phone.

Re: Isolated LAN

PostPosted: Thu Sep 13, 2018 6:09 pm
by KTrenholm
WRT54G?
That's a throwback! One of the first routers I owned.

You should be able to do what you want by setting up a web server on the router with a custom firmware. DD-WRT would be a good choice, or OpenWRT if you have a WRT54G model that supports it (not all of them do, some models just don't have the RAM/Flash to run OpenWRT). See: https://wiki.openwrt.org/toh/linksys/wrt54g).

This Page might have what you need to get started.

Re: Isolated LAN

PostPosted: Thu Sep 13, 2018 9:08 pm
by jtemples
What you're describing is known as a "captive portal". Maybe something like this:

http://dev.wifidog.org/

(Probably won't run on a PIC16F1947 though!)

Re: Isolated LAN

PostPosted: Thu Sep 13, 2018 9:13 pm
by ric
KTrenholm wrote:WRT54G?
That's a throwback! One of the first routers I owned.

This operation runs on a shoestring, so I reuse what's lying around whenever I can.
Just an FYI, here's a video I made showing what is involved when competing on the track.
(The first 2 minutes are just showing procedures for getting to the start line)

Re: Isolated LAN

PostPosted: Thu Sep 13, 2018 9:17 pm
by ric
jtemples wrote:What you're describing is known as a "captive portal". Maybe something like this:

http://dev.wifidog.org/

(Probably won't run on a PIC16F1947 though!)

Thanks John. It will be a Windows PC running the Portal, and updating the web page content automatically after each car has run. :)