Author Topic: FPP WiFi Setup (Originally Master + Remotes + WiFi How-To)  (Read 21603 times)

Offline ThreeSizes

  • Developer
  • ******
  • Join Date: Dec 2015
  • Location: Fulton, MD
  • Posts: 532
  • Kudos: 30
FPP WiFi Setup (Originally Master + Remotes + WiFi How-To)
« on: January 13, 2016, 09:22:14 AM »
I have spent the last couple of months researching and planning for my show. There is a lot of information here in the forums on how to do it which is great, but some of the information is spread out, so this is my attempt to consolidate and boil down how I believe I can setup my show network using a Master FPP with one or more Remote FPP's over WiFi with some pretty graphics with the intent that over time I will fill out some of the missing information and morph this into a mini How-To and not just a walk-through of my setup. Now I'm a experienced systems/network/security engineer by day, so this really is to help out the community some.

The drawing attached to this post is my design for the network. I will have a Master FPP feeding the FM Transmitter, two Remote FPPs each feeding a F16V2, a Remote FPP controlling some house lights via zWave modules, and a Remote FPP controlling a P10 matrix. All of the FPPs will be connected to my main network via a WiFi adapter.

I have come up with four options to implement this and I'll go into each option in a separate post. Even though your show may be totally different with more or less FPPs, or even just one FPP, pick just a portion of my config or just focus in on Remote1 in my examples.

Some basic terminology:

wlan0The name of the WiFi network interface in FPP. If you don't see wlan0, then your WiFi adapter is not being seen by the FPP.
eth0The name of the Wired (RJ45/CAT5) network interface in FPP.
GatewayThe address of the primary network router. This is the address of last resort, if the FPP does not know itself were to send any packets, it will send it here. This is normally your internet router.
DHCPDHCP wil dynamically assign an IP address to the interface. This is also normally a function of your internet router.
Enable RoutingThis option allows the FPP to pass packets between the two network interfaces. In almost all circumstances, you will want to enable this option.
OctetAn individual number in an IP address. Each IP address has four octets separated by dots. Normally, the first three octets identify the subnet and the last octet identifies individual hosts on the subnet (assuming you have a 255.255.255.0 subnet mask, which most will have).
BehindFor our purposes here, anything connected "behind" the FPP is connected to the eth0 (Wired) network interface.
Main RouterThis is the same as the Gateway (above), unless you have a dedicated show router, this will be your internet router.

I've also added a "Why" section in Reply #6 for those wanting a deeper understanding of why all this is necessary.

You should do the following:

  • Configure the FPP wlan0 interface to a static IP address including the gateway and DNS servers. In most cases, the gateway and DNS server are the same address. Since both interfaces will be static, you will need to provide the DNS servers and the FPP will display a message to that effect.
  • For the Remote FPPs with connected controllers, configure the FPP eth0 interface also statically but do not include a gateway on the eth0 interface, they may conflict with the wlan0 settings.
  • You need to check the "Enable Routing" option.
  • And on the controllers, configure their IP address statically on the same subnet as the matching FPP eth0 subnet and set the gateway to match the FPP eth0 IP address. If the controller does not provide a gateway setting, it will still work in this configuration. If the controller does provide a gateway setting, it must be filled in and should not be left blank.
  • Do not use DHCP as DHCP can and will change IP addresses over the time, and that will eventually break things here. The FPP does not have a DHCP server so DHCP is not even an option for anything connected behind the FPP.
  • Each subnet behind a FPP must be unique in your overall network scheme. The Remote1 subnet must be different from the main subnet as well as the Remote2 (and other) subnets. To keep things easy to remember, try to find a pattern that works best for you, like what I did with matching the third octet of the subnet address match the fourth octet of the IP address of the wlan0 interface of the FPP. In other words: wlan0 = 192.168.1.101  eth0= 192.168.101.1
  • Avoid using 192.168.0.0, 192.168.1.0, 192.168.2.0, and 192.168.7.0 subnets for your interfaces. They have a high probably of conflicting with other things.
This gets you the base configuration, additional configuration is required and depending on your circumstances one of the options in the next couple of reply's are need. The are listed in order of preference, with Option 1 being the preferred option.
« Last Edit: March 23, 2016, 09:30:39 AM by ThreeSizes »

"And what happened then? Well, in Whoville they say that the Grinch's small heart grew three sizes that day."

Offline ThreeSizes

  • Developer
  • ******
  • Join Date: Dec 2015
  • Location: Fulton, MD
  • Posts: 532
  • Kudos: 30
Re: Master + Remotes + WiFi How-To
« Reply #1 on: January 13, 2016, 09:26:10 AM »
Option 1:

To be able to talk to the controller behind the two Remote FPPs, you can tell the main subnet router about the necessary routes to them. The exact specifics on how this is done is different for each router, but you want to add routes to the routing table for:

192.168.101.0/24 via 192.168.1.101   (for Remote1 FPP)
192.168.102.0/24 via 192.168.1.102   (for Remote2 FPP)

Note: /24 is shorthand for netmask 255.255.255.0, routers will use one or both notations.

Router Support Table
YESMAYBENO
Verizon FiOS-G1100ASUS RT-AC66UAT&T U-verse Gateways
SonicWall TZ-215
DD-WRT


If you have any additions to the list please PM them to me and I'll add them to the list here.


« Last Edit: January 21, 2016, 07:16:06 AM by ThreeSizes »

Offline ThreeSizes

  • Developer
  • ******
  • Join Date: Dec 2015
  • Location: Fulton, MD
  • Posts: 532
  • Kudos: 30
Re: Master + Remotes + WiFi How-To
« Reply #2 on: January 13, 2016, 09:32:56 AM »
Option 2:

In some cases, you cannot add routes to the main router's routing table. In this case, you can always add the routes manually to each computer you want to be able to talk to the controller behind the Remote FPPs.

The syntax is different depending on your operating system.

For Windows:

Code: [Select]
route -p add 192.168.101.0 mask 255.255.255.0 192.168.1.101
route -p add 192.168.102.0 mask 255.255.255.0 192.168.1.102

Note the -p option makes the route persistent across reboots. If you use this option and things change or you make a mistake, you'll need to backout the route(s) using:

Code: [Select]
route delete 192.168.101.0 mask 255.255.255.0 192.168.1.101
route delete 192.168.102.0 mask 255.255.255.0 192.168.1.101

and you can inspect the routing table using:

Code: [Select]
route print
For Mac:

Code: [Select]
sudo route add 192.168.101.0/24 192.168.1.101
sudo route add 192.168.102.0/24 192.168.1.102

There is no straight forward way to make these persistent across reboots, so I'll just suggest consulting the Google, revisit Option #1, or look at Option #3.

To remove routes:
Code: [Select]
sudo route delete 192.168.101.0/24 192.168.1.101
sudo route delete 192.168.102.0/24 192.168.1.102

And to check routes:
Code: [Select]
sudo netstat -nr
For Linux:

You're using Linux, you probably already know this, but:

Code: [Select]
ip route add 192.168.101.0/24 via 192.168.2.101
ip route add 192.168.102.0/24 via 192.168.2.102

Code: [Select]
ip route del 192.168.101.0/24 via 192.168.2.101
ip route del 192.168.102.0/24 via 192.168.2.102

Code: [Select]
ip route list
Note: You can also use the older "route" command with slightly different syntax, again you are using Linux so you probably already know this.

How you make them persistent across reboots will vary depending on the distribution, so consult the Google.


« Last Edit: January 21, 2016, 07:16:26 AM by ThreeSizes »

Offline ThreeSizes

  • Developer
  • ******
  • Join Date: Dec 2015
  • Location: Fulton, MD
  • Posts: 532
  • Kudos: 30
Re: Master + Remotes + WiFi How-To
« Reply #3 on: January 13, 2016, 09:35:28 AM »
Option 3:

DISCLAIMER: This option is not officially supported by FPP, make sure you thoroughly test it. Please send me any feedback if you do use this option.

This is a new option I'm throwing on the table, best I can tell its not been really tried yet in the community so YMMV. Some times for whatever reason, you can't or just don't want to mess with routing tables. You can configure the Remote FPP to have a NAT'd second address than can be used to access the controller behind the Remote FPP.

Using NAT, when you want to access the controller, you would use the NAT address instead of the main address. So if I want to log into the controller behind Remote1 instead of using http://192.168.101.50, I would use http://192.168.1.111.

To set this up, you have to run a few commands on the Remote FPP using SSH and as the root user. You can access SSH using the Help|SSH option in FPP.

For Remote1:
Code: [Select]
sudo su -
iptables -t nat -A PREROUTING -i wlan0 -d 192.168.1.111 -j DNAT --to 192.168.101.50
iptables -t nat -A POSTROUTING -o wlan0 -s 192.168.101.50 -j SNAT --to 192.168.1.111
ip addr add 192.168.1.111/24 dev wlan0

For Remote2:
Code: [Select]
sudo su -
iptables -t nat -A PREROUTING -i wlan0 -d 192.168.1.112 -j DNAT --to 192.168.102.50
iptables -t nat -A POSTROUTING -o wlan0 -s 192.168.102.50 -j SNAT --to 192.168.1.112
ip addr add 192.168.1.112/24 dev wlan0

You can make this persistent across reboots of the FPP, by adding the last three lines of code to /etc/rc.local before the last line containing exit.

In my testing, I also found that in the case of FPP behind another FPP, on the FPP behind the FPP, the Help|SSH option will not work, after clicking the option you will need to manually change the link it opens from the actual IP to the NAT'd IP. For example: https://192.168.101.50:4200 becomes https://192.168.1.111:4200.


BONUS:

If you happen to have more than one device behind the FPP (you'd need a switch), you can scale this out by adding additional IP addresses to the FPP. Just take the three commands and rinse and repeat as needed on the FPP. For example to add a second device (192.168.101.51) to Remote1:

Code: [Select]
sudo su -
iptables -t nat -A PREROUTING -i wlan0 -d 192.168.1.121 -j DNAT --to 192.168.101.51
iptables -t nat -A POSTROUTING -o wlan0 -s 192.168.101.51 -j SNAT --to 192.168.1.121
ip addr add 192.168.1.121/24 dev wlan0

That gives you:

192.168.1.101 to the FPP
192.168.1.111 to Device 1
192.168.1.121 to Device 2

« Last Edit: February 02, 2016, 11:10:33 AM by ThreeSizes »

Offline ThreeSizes

  • Developer
  • ******
  • Join Date: Dec 2015
  • Location: Fulton, MD
  • Posts: 532
  • Kudos: 30
Re: Master + Remotes + WiFi How-To
« Reply #4 on: January 13, 2016, 10:13:35 AM »
Option 4:

Wireless Access Point or Wireless Ethernet Bridge

If you are daring enough, you can look here for a preview: http://falconchristmas.com/forum/index.php/topic,4137.msg46090.html#msg46090

« Last Edit: February 03, 2016, 03:12:53 PM by ThreeSizes »

Offline ThreeSizes

  • Developer
  • ******
  • Join Date: Dec 2015
  • Location: Fulton, MD
  • Posts: 532
  • Kudos: 30
Re: Master + Remotes + WiFi How-To
« Reply #5 on: January 13, 2016, 10:13:45 AM »
TROUBLESHOOTING OPTION 1/2

For this scenario we are troubleshooting the connection to the controller behind the Remote1 FPP. The commands here are for Windows, similar commands exist for Mac and Linux. The timing values (X ms) will vary but they should not be too much higher, the higher the values the higher the latency in the network which may pose other problems. Depending on the operating system and routers involved, there may either three hops (Router + FPP + Controller) or two hops (FPP + Controller).


From a PC on the Home network, trace route to the controller behind Remote1:

Code: [Select]
tracert 192.168.101.50

If the response to the trace route is:

Code: [Select]
Tracing route to 192.168.101.50 over a maximum of 30 hops:

  1     1 ms     1 ms     1 ms  [192.168.1.101]
  2     1 ms     1 ms     1 ms  [192.168.101.50]

or

Code: [Select]
Tracing route to 192.168.101.50 over a maximum of 30 hops:

  1     1 ms     1 ms     1 ms  [192.168.1.1]
  2     1 ms     1 ms     1 ms  [192.168.1.101]
  3     1 ms     1 ms     1 ms  [192.168.101.50]

There does not appear to be a routing problem, stop here  ;D.

If the response to the trace route is:

Code: [Select]
Tracing route to 192.168.101.50 over a maximum of 30 hops

  1     1 ms     1 ms     1 ms  [Some IP Address NOT the FPP or Router]
  2     *        *        *     Request timed out.

or

Code: [Select]
Tracing route to 192.168.101.50 over a maximum of 30 hops

  1     1 ms     1 ms     1 ms  [192.168.1.1]
  2     1 ms     1 ms     1 ms  [Some IP Address NOT the FPP]
  3     *        *        *     Request timed out.

Check the routing table in the main router (Option 1) or the PC itself (Option 2), your traffic is being routed to the wrong place  :o.

If the response to the trace route is:

Code: [Select]
Tracing route to 192.168.101.50 over a maximum of 30 hops

  1     *        *        *     Request timed out.
  2     *        *        *     Request timed out.
  3     *        *        *     Request timed out.

or

Code: [Select]
Tracing route to 192.168.101.50 over a maximum of 30 hops

  1     *        *        *     [192.168.1.1]
  2     *        *        *     Request timed out.
  3     *        *        *     Request timed out.
  4     *        *        *     Request timed out.

then ping the eth0 address of the FPP:

Code: [Select]
ping 192.168.101.1

If the response to the ping is:

Code: [Select]
Pinging 192.168.101.1 with 32 bytes of data:
Reply from 192.168.101.1: bytes=32 time=1ms TTL=64
Reply from 192.168.101.1: bytes=32 time=1ms TTL=64
Reply from 192.168.101.1: bytes=32 time=1ms TTL=64
Reply from 192.168.101.1: bytes=32 time=1ms TTL=64

Check the "Enable Routing" option in the FPP network setup  :-[.

Quote
Yes, it might seem weird that you can ping the eth0 interface even with Enable Routing turned off, but the short answer is Enable Routing is really enable forwarding under the hood which allows devices connected after the eth0 interface to be visible. The eth0 interface is always visible.

If the ping response is:

Code: [Select]
Pinging 192.168.101.1 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Check the eth0 network configuration of the FPP, if that is correct, check the routing table in the main router (Option 1) or the PC itself (Option 2) :o.

If the response to the trace route is:

Code: [Select]
Tracing route to 192.168.101.1 over a maximum of 30 hops:

  1     1 ms     1 ms     1 ms  [192.168.1.101]
  2     *        *        *     Request timed out.

or

Code: [Select]
Tracing route to 192.168.101.1 over a maximum of 30 hops:

  1     1 ms     1 ms     1 ms  [192.168.1.1]
  2     1 ms     1 ms     1 ms  [192.168.1.101]
  3     *        *        *     Request timed out.

Check the network settings especially the gateway in the controller ???.

« Last Edit: January 21, 2016, 07:22:11 AM by ThreeSizes »

Offline ThreeSizes

  • Developer
  • ******
  • Join Date: Dec 2015
  • Location: Fulton, MD
  • Posts: 532
  • Kudos: 30
Re: Master + Remotes + WiFi How-To
« Reply #6 on: January 13, 2016, 10:13:56 AM »
The Why's

One Gateway to Rule Them All

You can have as many gateways as you want, you just have to understand the behavior.  The "gateway" or more technically "default gateway" or "gateway of last resort", is the last place the device uses to send its traffic. If the device cannot otherwise determine where to send the traffic it will send the traffic to the "gateway".  In the routing tables, routes have priorities. So if you have effectively two identical and functional routes (which is what you would have with two default routes/gateways), the tie breaker goes to the priority, and then finally order.  In the FPP software, there is no mechanism for you to configure these priorities on the gateway settings, and by default, the gateway assigned to ETH0 is before the gateway assigned to WLAN0. So without the priority setting, if both ETH0 and WLAN0 gateways are configured, the gateway assigned to ETH0 will always win. In the bigger world of networking in general, normally you only have multiple gateways configured for network redundancy and fail over, where you have redundant internet connections, etc.

So the simple answer is, only configure one gateway and configure that gateway on the interface facing the your internet router or show router (if you have one).

Subnets, Subnet Masks, and the Magical Third Octet

The Subnet Mask or (sub)NET MASK tells the system what part of the IP address is the subnet address and which part is the host address.  Everything eventually gets into binary form, so and IP address 192.168.1.1 is really 11000000.10101000.00000001.00000001 (I added decimals for ease of reading).  The subnet mask of 255.255.255.0 converts to 11111111.11111111.11111111.00000000. Starting from left to right, every sequential position that is a 1 means that is the subnet address, the remaining positions which are 0 are the host address.

Code: [Select]
11000000.10101000.00000001.00000001  (IP Address)
11111111.11111111.11111111.00000000  (Subnet Mask / Netmask / Prefix)
--------.--------.--------.--------
11000000.10101000.00000001           (Subnet Address 192.168.1)
                           00000001  (Host Address .1)

Octet means "group of eight", which is why we refer to the individual numbers in an IP address as octets because in binary they are groups of eight (highlighted by me adding the decimal after every 8).

You will also find Subnet Mask / Netmask also referred to as Prefix and the notation is /X, X is simply the number sequential 1's left to right of the subnet mask. 255.255.255.0 would be prefix /24 since it has 24 1's.

In IP networks, each separate network (ETH0 and WLAN0 here) must have its only Subnet Address (the first 3 octets here) and on each separate network, each host must have its own unique Host Address (the fourth octet here). The size of the subnet mask as determines how many hosts you can have on the subnet, with 255.255.255.0 you can have 254 hosts (actually its 256, but 0 and 255 are reserved for broadcast use).

You'll probably only ever see 255.255.255.0 subnet masks (/24 prefix), so the short hand to all of this boils down to just make sure "the 3rd octet needs to be different".

And as a bonus, 192.168.X.X (255.255.255.0) is reserved (along with 10.X.X.X, and 172.16.X.X-172.31.X.X for private use, which is way you most commonly see 192.168. subnets in this kind of environment, not to say using the other private ranges are not invalid either).
« Last Edit: February 14, 2016, 08:38:14 PM by ThreeSizes »

Offline pixelpuppy

  • Sr. Member
  • ****
  • Join Date: Aug 2015
  • Location: Dallas, TX
  • Posts: 490
  • Kudos: 10
Re: Master + Remotes + WiFi How-To
« Reply #7 on: January 13, 2016, 10:39:33 AM »
Hey!  That's my network!  LOL  ;D

Thanks for the write-up and pictures.  This should help a lot of people   8)
This topology worked very well for me this past year and I think a bunch of other people too.
My gut feeling is this topology will be the direction more and more people will be moving to.
Vixen and xLights for sequencing / FPP for scheduling and playing / Falcon controllers for pixels / DIY controllers for everything else

Offline Duramadmax

  • Newbie
  • *
  • Join Date: Nov 2014
  • Location: Madison, MS
  • Posts: 32
  • Kudos: 0
Re: Master + Remotes + WiFi How-To
« Reply #8 on: January 13, 2016, 11:03:43 AM »
Looks good so far  :). I have been working on this also. My IP addresses are different behind the FPP's but the design is the same using a separate subnet. The only thing that bothers me is the Router username/password being shown on the FPP network setup page. I am sure this will be on the to-do list for this year.

I, as with some others, will probably be incorporating an AP (access point) in the mix to allow the new ESP devices to do wireless back to the show network. I am sure it is not a big deal to setup. I am using a WRT54G using DD-WRT. I was planning to use this AP to "access" my show from within but I see depending on how the network is designed can prohibit you from accessing all your controllers vs the home network gaining access inward to your show via routing tables.

Great writeup!!
  

Offline K-State Fan

  • Full Member
  • ***
  • Join Date: Dec 2014
  • Location:
  • Posts: 146
  • Kudos: 2
Re: Master + Remotes + WiFi How-To
« Reply #9 on: January 14, 2016, 06:50:05 AM »
Thanks for this information.  This will make it easier for me to understand.  Is it OK to ask questions in this thread?

Offline ThreeSizes

  • Developer
  • ******
  • Join Date: Dec 2015
  • Location: Fulton, MD
  • Posts: 532
  • Kudos: 30
Re: Master + Remotes + WiFi How-To
« Reply #10 on: January 14, 2016, 08:52:52 AM »
If they are specifically about the information/topic here, I don't see why not especially if its clarification of what's presented. My plan is to update my posts above as things progress and fill out any additional information as needed. If its not or it starts to muddy up the thread, we can always move the discussion to a new thread.
 

Offline K-State Fan

  • Full Member
  • ***
  • Join Date: Dec 2014
  • Location:
  • Posts: 146
  • Kudos: 2
Re: Master + Remotes + WiFi How-To
« Reply #11 on: January 14, 2016, 09:50:03 AM »
On the remote 1 and 2 you have them set up with a different third octet do they have to be.  I know they have to be different than wlan but instead of 192.168.101.1 and 192.168.102.1 could they be 192.168.101.1 and 192.168.101.2? Now that I think about it Is that so the route tables work correctly?

Offline ThreeSizes

  • Developer
  • ******
  • Join Date: Dec 2015
  • Location: Fulton, MD
  • Posts: 532
  • Kudos: 30
Re: Master + Remotes + WiFi How-To
« Reply #12 on: January 14, 2016, 09:55:31 AM »
On the remote 1 and 2 you have them set up with a different third octet do they have to be.  I know they have to be different than wlan but instead of 192.168.101.1 and 192.168.102.1 could they be 192.168.101.1 and 192.168.101.2? Now that I think about it Is that so the route tables work correctly?

Yes you are correct, they must be different subnets if you are using any kind of routing (Option 1 & 2).  I updated the posts above to reflect this.

« Last Edit: January 14, 2016, 10:03:17 AM by ThreeSizes »

Offline ThreeSizes

  • Developer
  • ******
  • Join Date: Dec 2015
  • Location: Fulton, MD
  • Posts: 532
  • Kudos: 30
Re: Master + Remotes + WiFi How-To
« Reply #13 on: January 14, 2016, 05:26:04 PM »
I've started a table up in Reply #1 for known routers that do and do not support routing. If you have any additions please PM them and I'll add them.


Offline ThreeSizes

  • Developer
  • ******
  • Join Date: Dec 2015
  • Location: Fulton, MD
  • Posts: 532
  • Kudos: 30
Re: Master + Remotes + WiFi How-To
« Reply #14 on: January 14, 2016, 07:11:24 PM »
I've posted a troubleshooting guide into Reply #5 on this thread.

 

Back to top