Netflix on the Raspberry Pi 3 – How-to

A Simple Way to Get Netflix on Your Raspberry Pi 3!

netflix on raspberry piLike many others, I have longed for the day that the Raspberry Pi would be able to play videos natively from Netflix. And like many others, I have tried several different ways to make it work, to no avail, but I kept trying.

So, why keep trying?

Well because the Pi 3, should be able to play video from Netflix. It has the right amount of processing speed, ram and runs on a modified Debian based Linux distribution. After all, it plays fine on a smart phone, with even less specs than the Pi. And it even runs in the Chrome browser on a Linux OS (albeit x86 based), and plays Netflix video, just fine.

So, I thought maybe Netflix just has some sort of block on ARMv7 based processors (which the Pi 3 has). Or a block on running on open source software, afraid they would get hacked or something. But many Linux distributions are open source, so that isn’t it either!

Then what is it?

Well, I am not exactly sure. I could go into a bunch of technical stuff to try and explain it, but I really don’t know exactly what I am talking about. I do understand it a little bit, but not totally. It has something to do with a Chrome plugin called widevine, that allows Netflix video, and other protected video content, to play in the Chrome browser. Widevine is automatically installed and enabled, when you install Chrome on your computer.


netflix on chromiumBut, the Chrome browser will not install and run natively on the Pi. Instead you have to install and run Chromium, which is an open source modified version of Chrome. Chromium however, does not come installed with the widevine plug in. But it is available through a code package that installs Chromium and the required patch for widevine to work, thanks to someone named krusti8 found on the raspberrypi.org forums. The code also installs a Netflix shortcut under the internet menu section on the Pixel desktop, called the Netflix Launcher.

netflix launcher

To install it on the Pi 3, it’s probably a good idea to 1st do an update. Open the terminal and type sudo apt-get update and hit enter. Once done and at the prompt again, copy and paste this code:

wget https://github.com/kusti8/chromium-build/releases/download/netflix-1.0.0/chromium-browser_56.0.2924.84-0ubuntu0.14.04.1.1011.deb
sudo dpkg -i chromium-browser_56.0.2924.84-0ubuntu0.14.04.1.1011.deb

It will start downloading and takes a little time installing. It actually installs in two parts, so you need to watch for when it finishes installing the 1st part, and then hit enter for the second part at the command prompt.

This was pretty simple! I got it up and running on my Pi with no issues! Now I can watch Netflix directly on the Pi! Without streaming from another PC or without using some other virtual windows emulator! Woo Hoo!!!! Thanks kusti8!

Enjoy!

8Bitdo Zero How to Setup in Retropie 4.2

8Bitdo Zero Gamepad on Retropie 4.2!

this is how small this 8bitdo isThe 8Bitdo Zero gamepad is a cute little (as in tiny) wireless Bluetooth gamepad, that has a similar button layout of a Super Nintendo game controller. You can use it for playing games on your Windows PC, Mac, Android tablet, Android Smart Phone, iOS devices and Raspberry Pi. You can also connect it to your smart phone and use it as a shutter button to snap pictures, hands free. And, it also connects as a keyboard.

I bought my gamepad from here.

8bitdo zero

Here is a how to setup the 8Bitdo Zero Bluetooth Gamepad, on Retropie 4.2.

my raspberry pi 3Note: I have only connected the 8Bitdo Zero to my Raspberry Pi 3 and Pi Zero. I have not tried it on anything else yet. And so far, it works decently on Retropie 4.2. As long as the games you are playing don’t require more buttons, than a Super Nintendo controller would. Works well on Nintendo and SNES games!

But at 1st I had a little bit of trouble figuring out how to get it set up correctly. If you have it turned on to connect as the wrong device, it will not set up the buttons to work correctly in the games.

Step 1. Charge the 8Bitdo Zero Gamepad

Plug it in with the included short usb cable and charge it on a usb port of your computer or with a phone charger. It will blink green until it is fully charged and then shut off when done.

Step 2. Getting the Gamepad Ready

8bitdo zero layoutPush and hold the start button for 2 seconds. Then you should see it blink. If it blinks more than once in a row, the controller needs to be reset. To reset it, hold down the select button for 2 seconds. Then hold down the start button until it shuts off (8 to 10 sec).

Step 3. Retropie Configuration

With the controller off, enter the Retropie configuration menu and using another usb connected gamepad or keyboard (need to configure the keyboard in the main menu controller configuration, if not already). Then select BLUETOOTH in the menu.

select bluetooth

Step 4. Connecting the Gamepad to Bluetooth.

 register bluetooth device

On the next screen, select “Register and Connect to Bluetooth Device” and press OK. You should see a screen saying it’s searching, and then press and hold the start button for 2 seconds. It will start to flash on/off with a blue light, as the Pi searches for a Bluetooth device.

Once found, it should display the mac address and the name of the controller. Then press OK.


(If it doesn’t find it, try it again. If it continues to not find it, you may need to restart retropie. The Bluetooth on the Pi 3 isn’t really good but works most of the time.)

The next screen should show this above with 1. DisplayYesNo at the top selected. Then just choose OK.

If it connected successfully, you should see “Successfully registered and connected to”, and the mac address of the game pad. The blue light should not be blinking at all now.

Note: On the Retropie Github 8Bitdo setup guide, it shows to setup the udev rule for joypad, as described in step 12, found here. I did not do that. I also left the 8Bitdo mapping hack (OFF – new firmware)!

Now press OK and then Cancel on the next screens to get back to the the configuration menu and use the correct button to on the keyboard or other gamepad to exit and get back to the game system screen.

Step 5. Configure Gamepad

Then you will need to go to the main menu and configure the controller buttons.

configure 8bitdo controller

I just set mine up like a snes controller (used the a for the b button and b for a button and used the L and R buttons as left and right triggers).

Then you should be good to go!

Reconnecting

If the gamepad sits idle for a while, they will disconnect. You should be able to reconnect them by holding down the select button for a second or 2. It will flash really fast and then reconnect. If you restart Emulationstation, when you see the Emulationstation screen, press and hold the select button a couple of seconds to reconnect.

Sometimes when it reconnects, it will go haywire and make the system screen scroll fast. Just push any button to make it stop, usually. I have had some issues where it wouldn’t stop and had to do a shutdown or restart by way of ssh (or just unplugged the power).

Also, you may have to go through the Bluetooth setup again, once in a while if you have problems. And, the charge lasts a long time, but if you continue having connection issues, try recharging it.

Anyway! Enjoy playing your games!

Control External Speakers Using a Pi Zero

Pi Zero control external speakers!

UPDATE: Now with Pi Zero W (W = on board wifi), you can eliminate the need for the wifi adapter and the 4 way usb hub!

Using a Pi Zero to control external speakers, remotely from your couch!

(sorry about my redundant wording, it’s for google search engine stuff)

pi zero control external speakersFor a while now, I have had these Creative SBS powered PC speakers, connected as external speakers, to my TV. It sounds great, especially when watching movies!  It’s really amazing how much these little speakers can enhance the TV’s sound quality, especially the bass.

But, to turn the volume up or down on these speakers, used as external speaker on my TV, you have to get up and physically turn the volume nob. Not too much trouble, but if you didn’t turn them down before or after you shut the TV off, you might get blasted the next time you turn on the TV. Not good when you can’t sleep at 3am in the morning, so you try watching a little TV to pass the time. Then you turn it on and it blasts noise into the still of the night, waking up the whole house!

pi zero controlled external speakersAnyway, so recently I bought a Raspberry Pi Zero and have been wondering what to do with it. I have lots of ideas like building a robot car, a portable retro game console or maybe use it as a spare desktop or printer server. But then I thought, why not set it up to control the volume on the external speakers connected to the TV!

For this to work though, the Zero has to have a few things that it doesn’t. An audio source to get sound in and out (except out from HDMI). And a way to connect remotely to the Zero to control the sound, like over a WiFi or Ethernet connection.

Things You Will Need to Control External Speakers with a Pi Zero

But the Pi Zero does offer support for sound through a USB connected sound card adapter that has a line-in and out port, and an internet connection with a WiFi adapter / Ethernet adapter. And with an OTG cable and USB hub, you can connect both!

usb sound adapter usb hubusb wifi adapter

 

From the audio out on the TV, I have connected a male RCA Y adapter cable (red and white) to 3.5mm male round pin jack, to the line-in port on the USB sound card.

male rca y adapter to male 3.5mm jack
And the green wire from the PC speakers, connected to the line-out on the Zero.

connection setup pi zero control external speakers

Then I installed the latest version of Raspbian Jessie OS on an SD card, inserted it into the Pi Zero. Connected the HDMI to the TV and power and booted it up, and installed the OS. I also did an update and upgrade through the terminal (sudo apt-get updated, sudo apt-get upgrade) on the Pi. And, enabled ssh and VNC through the Raspberry configuration menu.

enable vnc and ssh on raspberry pi

Now To Get The Sound Card Working to Control External Speakers

To enable sound on the USB sound card, you have to right click on the speaker icon to bring up the audio properties, and click on the sound card, to put a check by it.

enable usb sound

Then go into the USB Device Settings and enable the volume controls.

control external speakers set up

enable volume slidersCheck the boxes to enable the speakers/headphones, microphone or line-in (not the capture). Also enable the auto gain control. But once you enable everything, close the box and then go to the Switching tab and uncheck the auto gain control. This may remove some of the distortion from your sound card. Also, be sure and enable the mic/line-in levels, if they are marked with a red X, grayed or blacked out.

uncheck gain control external speakers

For now, just leave these boxes up and then turn the TV input to a TV station. If everything is connected correctly, there may be a slight delay and some pop noises, but then you should hear sound.

Once everything was installed and running, I was able to disconnect the Pi Zero from the HDMI on the TV and used the VNC viewer installed on my computer, to control the desktop on the Pi (more about this below).

How to Setup the Pi Zero to Control the Volume Remotely, From Your Couch!

With the VNC server enabled and setup on the Raspbian desktop. You should be able to control your Pi Zero from any computer with the VNC viewer. Check out these instructions here, to learn how to set up and use VNC on your Raspberry Pi.

It will be easier to control the Pi with a laptop. You can carry it into the room with your TV, so you can hear and adjust the sliders where you want them. Then tap OK to close the settings boxes on the Audio Device Settings.

If you have an iphone or android smart phone, you can go to the app store and download the VNC viewer. You can then bring up the Pi Zero in the viewer. Move around the screen until you get the pointer on the speaker icon. Tap on the speaker icon to bring up the volume slider. It’s a little tricky, but tap the slider nob with the pointer on it and then tap, hold and drag the nob, to move the slider up and down.

Control Volume with SSH

You can also download an ssh app on your phone and ssh into the Zero to control the volume. Type alsamixer at the prompt and this brings up the mixer control. To raise and lower the volume, use the 1-9 keys on the keyboard. Or use the plus and minus keys.

alsamixer controls

And there you go! That’s how you control external speakers with the Pi Zero! And, you can probably use this same setup for many audio devices you may have external speakers connected to.

Easier Way to Set Resolution Raspberry Pi

Are you using the Raspbian Jessie OS on your Pi? Need to change or set the resolution to better fit your screen or monitor?

Did you know you can now change or set the resolution on the Pi without editing the config.txt file manually? Yep! With the latest OS update, you can now change or set resolution directly through the desktop GUI.

Note: This is done pretty much the same way under the PIXEL desktop, but the menu just looks a little different.

Just click on the Menu button on the task bar, and click on Preferences. Then look for Raspberry Pi Configuration on the bottom of the list.

change resolution raspberry pi

Then look about 3/4 way down the System tab section for, Set Resolution.

Click the down arrow and choose your setting, then click OK.

Then click OK at the bottom of the Config box and choose to reboot!

When it brings up your desktop, you should see the change! Simple as that!

If you don’t see these setting on your version of the desktop, you may need to do an update. Open a terminal and type: sudo apt-get update (If prompted during update install, choose yes to continue). Then reboot!

Dirty Cow Linux Kernel Bug – Fix

Dirty Cow – DANGER WILL ROBERTSON!!!

It has been recently reported, that there is a bug in the Linux kernel, called “Dirty Cow”. It can effect some devices and computers running versions of Linux, like Android phones, web servers, and even the Raspberry Pi.
dirty cow bug

You can find out a little more information about this bug on The Hacker News blog. Also, here is a post on the RaspberryPi.org blog, on how to fix it on the Raspberry Pi.

Kodi (XBMC) Media Center for PC and More!

You may have seen a few posts where I mention Kodi and you might have wondered, “what is that and what does it do”? Well, here you go!

kodi play buttonKodi is an open source media center program, designed to bring all your pictures, music and video, stored on your computer or tablet, together in one place. It will play media in many different formats and from DVD’s and CD’s as well! You can also use it to stream online content. There are even Apple and Android mobile apps available, to enable your smart phone to be used as a remote.

The software is available for Windows, Mac, Android and many Linux distributions, free to download. And, comes with many free addons you can install and use to watch online content, right away (subscriptions may be required)!

food networkOne of my favorite shows is Diners, Driv-ins and Dives, on the Food Network, but I have missed a few of the latest episodes. Kodi has the Food Network Add-on. So I added it and now I am able to stream the show and catch up.

Kodi is also available as a stand alone OS.

raspberry pi 3I use my Raspberry Pi 3 as a mini desktop and media center and have it installed through Raspbian. But, you can also use it installed as a stand alone OS on an SD card, USB flash drive or hard drive, with LibreElec (which is my favorite), OpenElec or OSMC. I have an old HP that had Windows Vista on it, that I removed and installed OpenElec on. The video card has HDMI out, so it was easy to connect to use on the TV. Worked great until my power supply on the PC died (I have had it a while).

You can also use Kodi with other streaming services!

I have PlayOn, which is a paid service where you can stream and record content from all your favorite TV show and movie websites, and watch them anytime you want. It’s like a streaming DVR. And, you can set it up to play your recordings through Kodi or add the app to your device. You can even access PlayOn from other devices to play content, as long as you have the server running on a Windows PC or a Mac. It’s pretty cool and available to try for free!

You can learn more about Kodi here or visit the wiki page here for all the different ways to set it up. And as always, if you need some help, call on me, your friendly neighborhood computer nerd!

File Sharing from Your Raspberry Pi to PC using Samba

How to set up file sharing on the Raspberry pi using Samba Share.

There are many, many posts on the interwebs with instructions on how to set up file sharing on your Raspberry Pi. There are also many videos on youtube. But one site I found had some pretty simple instructions, using Samba. But, below I added a little more detail.

Open a terminal and install samba using this command (or access your Pi through ssh):

sudo apt-get install samba samba-common-bin -y

Be sure and type Y to continue.

Once complete and add user pi to the local smbpasswd file:

sudo smbpasswd -a pi

You will be asked to add a username and password.

Then you need to edit the samba config file to set permissions.

sudo nano /etc/samba/smb.conf

file sharing using samba

Use the down arrow key on your keyboard to move to the area that says, Global Settings.

file sharing using samba

And make sure where it says “workgroup = workgroup”. Then uncomment (remove the # sign) the line that says “wins support”and change the no at the end to yes.

For now, save the file by holding down ctrl button on the keyboard and then hit the x key. Lift off of the ctrl key and x and then hit the y key and enter. It should save it.

Then you need to make a share folder. You can do it through the command prompt in the terminal (at prompt type mkdir and then a name for your new folder) or open your file directory and create a “share” folder. I just simply created one named “share” in my /home/pi directory. But you can also give access to any existing folder there, like the Picture folder, as long as you add the correct path (example: /home/pi/Pictures).

Now open the samba conf file again with sudo nano /etc/samba/smb.conf and move the cursor down until you get to the very end of the document. Then put in your path to the file.

Something like this:

[share]
path = /home/pi/share
available = yes
valid users = @users
read only = no
browsable = yes
public = yes
writable = yes

Save changes (ctrl x, y, enter).

Then back at the prompt, restart samba.

sudo /etc/init.d/samba restart

Then you should be able to browse your shared folder on the Pi with from most PC’s.

Now, this is what worked for me. If you know a better way, please comment below!

Learn more about using Samba, here.

Raspberry Pi Portable Power Supply

portable power supply for raspberry piAre you looking for a portable power supply for your Raspberry Pi? This might work, depending on what you are doing with it.

I found this Pocket Juice charger at Walmart for $11.88. It was over in the school supplies section. It has an output of 2.4a max. Just about the right amount of power for the Pi 3 to run on.

If you look online it says 2.1 max output, but on the back of the charger and packaging, it says 2.4 max.

backofcharger

So anyway! I bought one and tried it with the Pi 3 running the Raspbian OS. I browsed the internet, played a few games on retropie and watched a couple of shows on LibreElec (Kodi) and it held up. But, I only had a wireless mouse, keyboard and a game pad connected to the USB ports. So, not really “loaded down” with peripherals that use a lot of power.

It has a row of 4 blue light bars on the top when fully charged. I probably had it plugged into the Pi for about 3 or 4 hrs at the least, and it still had 1 bar left before I shut down the Pi. I have not tested whether or not you could charge it and run the Pi at the same time.

So for $11.88, it’s not much of a risk to take, to see if it worked or not. And if not, I could use it to charge my phones.

Project – Using a portable DVD player as a monitor for my Raspberry Pi.

dvddThis is my project – Using a Disney portable DVD player, as a monitor for the Raspberry Pi 3.

This portable DVD player comes as a pair, with the main unit having the DVD player in it, and the other unit with just a screen. When connected by 3.5mm round pin AV cables, the second screen mirrors what is playing on the main DVD player. You can strap them to the back of your front seat head rest and plug it into your cigarette lighter/charger on your dash to power it, and watch DVD’s or even play music CD’s on them. The main unit can also can be used as a stand alone DVD player, without being connected to the other unit. And, can also be connect to a regular home TV by AV cables with RCA connections, to play DVD’s. There is a DC wall plug that comes with it, to power it in the home.

We bought this a long time ago, to keep my kids busy on long road trips. But since they have gotten older, they have their phones and don’t use them anymore, so we put them in storage.

Then a while back I got a Raspberry Pi 3. I have been trying to think of projects I can do with it, to make something useful but simple and not expensive.

avWell, the Pi 3 also happens to have an AV out port. So I thought, maybe I could re-purpose the DVD player to be used as monitors for the Raspberry Pi. And, I could use them in the car as sort of a portable computer/entertainment center/retro gamer.

My 1st issue was, testing the pair to make sure they still work because they have been put up for a while. I was just going to use the DC wall plug to test it in the house on the TV, but remembered some time back, we broke the cord on it. So I had to find one like it online and order it. I found one on Amazon.

The other issue was, I found out after I got the wall plug, something may have been spilled on the main DVD player, and after connecting it with the wall plug, it smelled like something was burning in it. But, the other part of the DVD player that is used to mirror what is playing on the main unit, plugged in fine and didn’t smell like it was burning. Later, I may take the screen out of the main DVD player and try and find a driver board for it.

Anyway! So now that I know one works, I should be able to plug one end of a 3.5mm round composite jack cable it came with, into the AV in on the DVD monitor, and then the other end to the Pi 3, boot it up, and all would be good, right? Not! Nothing comes up on the screen. For some reason, it doesn’t work. So, I tried other RCA cables with it, that I know work, because I use them on other stuff. Nope! Still nothing on the screen.

4ringsCome to find out, you can’t use just any ole AV cable on the Pi 3. It uses a 3.5mm round pin that is the opposite of most others. It has something to do with the rings on the pin (click here for the explanation). So now I have to order one of those! They are fairly cheap though. I found one at Adafruit.com.

In the mean time, I also found out that even if you have the correct AV cable, you can’t just connect it, and it work! You have to set it up through Noobs, when installing an OS on the SD card (follow these instructions). And, just messing around with the cables I have, slowly pulling it and out, I sort of finally got the Noobs screen to show. It was really distorted but it was on there.

So, hopefully when I get the cables, it will work and I will update this post.

Update: I got the cable in! I connected it to the Pi and then to my TV. Turned on the Pi and followed the instructions above, to get it to come up on the screen, and it works! I also used an adapter to connect it to the DVD monitor. It works there too! Only problem is, I have no sound because I actually need a 3 way female RCA adapter to connect to the composite cable coming from Pi. I couldn’t find one anywhere in the usual stores around here, so will have to order that now.