Raspberry Pi PMS Server, Wireless Router and Access Point

Hey Ned,

Thanks so much for the write up. I was able to get the system set up for our recent trip and everything worked like a charm. However, after a few days, I started getting problems with the WiFi access point just disappearing. I would reboot, it would come back and work fine for a few hours and then stop. Sometimes it would require several reboots for it to stay. I changed the WiFi channel thinking it was conflicting with other networks nearby but no luck. I did some research online and found various posts about WiFi dropout on Pis and disabled the power management. That didn’t work either. I looked through the system logs and could not find anything. I am a Linux novice so its possible that there is something going on that I could not notice. I am using an NTFS external USB and was thinking of reformatting to an ext4. I am using a Raspberry Pi 3 with the on board WiFi.

Any ideas?

Thanks again,
Gene

Haven’t tried this with the built in WiFi on the RPi3, when I get some time I will and report back, in the meantime you could set up an autostart.sh and pop it in .config to run a script something like:

 #!/bin/bash

 while true ; do
 if ifconfig wlan0 | grep -q "inet addr:" ; then
 sleep 180
 else
 echo "Network connection down! Attempting reconnection."
 ifup --force wlan0
 sleep 10
 fi
 done

It will check every 30 minutes for a network connection and if there isn’t one it will force a reconnect.

Create the above script - call it networkcheck.sh and place it in /storage/.config

 nano /storage/.config/networkcheck.sh

And paste in the code above, press Ctrl+x and then y to save the script.

Create an autostart.sh file

 nano /storage/.config/autostart.sh

Type in:

 #!/bin/bash
 (/storage/.config/networkcheck.sh)&

Press Ctrl + x and then y to save the script.

Restart to RPi.

Haven’t tried it but it should work.

@NedtheNerd

Any chance you can update this, PMS install has changed slightly.

Worked first time though, thanks.

After I enter the rsync command sudo rsync -avz —exclude ā€˜/mnt’ / /mnt to clone my SD card over to my usb drive, it appears that there is a loop or something in the process.
I’m sure I’m using the wrong terminology because I’m fairly new to linux, but here is a sample of the output I am seeing while the rsync is in operation ( I apologize, I don’t know the markdown to put my output in a box like the code above):

media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/lib/modules/4.4.13+/kernel/net/bridge/netfilter/ebt_redirect.ko
media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/lib/modules/4.4.13+/kernel/net/bridge/netfilter/ebt_snat.ko
media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/lib/modules/4.4.13+/kernel/net/bridge/netfilter/ebt_stp.ko
media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/lib/modules/4.4.13+/kernel/net/bridge/netfilter/ebt_vlan.ko
media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/lib/modules/4.4.13+/kernel/net/bridge/netfilter/ebtable_broute.ko
media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/lib/modules/4.4.13+/kernel/net/bridge/netfilter/ebtable_filter.ko
media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/lib/modules/4.4.13+/kernel/net/bridge/netfilter/ebtable_nat.ko
media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/lib/modules/4.4.13+/kernel/net/bridge/netfilter/ebtables.ko
media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/lib/modules/4.4.13+/kernel/net/can/
media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/lib/modules/4.4.13+/kernel/net/can/can-bcm.ko
media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/lib/modules/4.4.13+/kernel/net/can/can-gw.ko
media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/lib/modules/4.4.13+/kernel/net/can/can-raw.ko
media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/lib/modules/4.4.13+/kernel/net/can/can.ko
media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/lib/modules/4.4.13+/kernel/net/core/
media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/media/pi/1/lib/modules/4.4.13+/kernel/net/core/pktgen.ko

Hi! Thanks for the write up. Has anyone tackled the power loss issue when the car is shut off? Seems like that could cause data loss. There are a few Pi UPS solutions but nothing stands out as being obvious or easy to implement.

Edit: This is for a Raspberry Pi 3, BTW

@johnny2678 said:
Hi! Thanks for the write up. Has anyone tackled the power loss issue when the car is shut off? Seems like that could cause data loss. There are a few Pi UPS solutions but nothing stands out as being obvious or easy to implement.

piups.net

I have been using the Plex PI3 for months and I have unplugged it hundreds of times and it has never corrupted the SD card but I do have a backup card and image just in case.

@gasdiver said:
After I enter the rsync command sudo rsync -avz —exclude ā€˜/mnt’ / /mnt to clone my SD card over to my usb drive, it appears that there is a loop or something in the process.

This is due to a misuse of the exclude parameter. Make sure you have two dashes before exclude: – exclude

I keep hitting an issue when I change the boot configuration and reboot. Everything dies and I get a kernel panic at boot. I’m doing this with a Raspberry Pi 3 and wonder if I’m doing something incorrectly or if this doesn’t work anymore:
When you reach the part where you modify the boot configuration delete the existing line and replace it with:
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/sda1 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

@NedtheNerd said:
For those of you who want to take Rasplex on holiday or business, want Rasplex in the car/caravan/motorhome and you have no access to WiFi/Ethernet then you need a second RPi2 with a USB hard drive (for your media), a WiFi dongle and a USB powered hub (for the hard drive and power to the RPi2) with Plex Media Server running on it. It also needs to be able to allow clients - Rasplex, tablets, phones, etc, to connect to it - that’s where the Router and Access Point comes in!

Follow the attached guide and you’ll be set to go.

Please note: This has been put together from a number of sources and modified to get a working solution for the RPi2.

Thank you so much for this guide.
I’m currently following it, but get stuck at the point where I connect with a device (e.g. my Android Phone) through wifi.
It will not get any further then trying to receive an IP address.
When I check the status on the pi with ā€œsudo service isc-dhcp-server statusā€ I get an error:
isc-dhcp-server.service -LSB: DHCP server
Loaded: loaded (/etc/init.d/isc-dhcp-server)
Active: failed (result: exit-code) since Mon 2017-06-12 08:46:06 UTC; 15s ago
Process: 3261 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILURE)

I can understand with the above error why there isn’t an ip given out, but I cannot find the problem.
I’ve followed the guide 5 times with a clean install, but everytime I get to this point.

Is there anyone who can see where I have to look? I’ve double checked all the edited files, but I don’t think there is anything wrong there.
I’m using a Pi3 and added the driver for the build in wifi. Also I am using the latest Jessie Raspbian build.

Thank you for anyone who can help.

NVM! I figured it out, forgot to read the next line which told me it had an unexpected end of the file on row 116. Which meant I forgot the ; right there.
Now it works like a charm.

tried this over 10 times consecutively now and i cant access internet via ethernet port after the server is setup, i cant even access the plex server i just get an error message. please help, using latest raspbian stretch release and a raspberry pi 3b, even tried with a 3b+

Where can I get the most recent document for this project, I’d very much like to try this out! Thanks.