Saturday, September 10, 2016

Configure your Raspberry Pi 3 (bug fixes)

So this is not only a simple guide, unfortunately the Raspberry Pi 3 Operative System (Raspbian Jessie 4.4) has a ton of bugs and you may not be able to use some of the most basic features out of the box, here are the fixes for the most annoying bugs I've found. Many of these bug fixes (or workarounds) can be hard to find so I decided to make a compilation here.

This assumes you already logged into your Raspberry Pi after installing Raspbian.

1) First you need to update the system, for that do (you can do one command at a time):
 sudo apt-get update  
 sudo apt-get upgrade  

2) If your screen has a black border all around do:
 sudo nano /boot/config.txt  

Then on the file uncomment (remove the #) from the line that says:
 disable_overscan=1  

If you want to use RCA video output (for composite video) and it doesn't work, find and edit the next line to look like this:
 hdmi_force_hotplug=0  

In this case (RCA output), if you are using a CRT TV you may want to comment out the "disable_overscan=1" line so the display fits into the screen.

Press CTRL+O, then ENTER to save the changes, then press CTRL+X to exit the text editor (nano).

Reboot the system, it should be fullscreen now (and RCA video should work).

3) Then to configure the system settings do:
 sudo raspi-config  

  • It is recommended but not required to change the user password.

  • Change the Internationalization options: / Change Timezone / Yourzone / Yourcountry

  • If you have an iternational keyboard, you can Change keyboard layout: for example for a spanish keboard you can do:

  • Generic 105-key (intl) pc / spanish include dead tilde / key to function as altgr / right alt (altgr) / compose key / no compose key

    Tip: To configure the keyboard it may be easier if you simply go to the raspbian configuration utility on the top left menu. Be careful with what you do there because sometimes you'll find a bug that deletes the icon and you won't be able to configure through that utility again (I don't know the fix for that bug).

  • WIFI Country, find your country and select it.

  • In advanced options you may want to enable SSH (only if you want to use SSH, if not, skip this step).

4) If your WIFi doesn't work (you get an "invalid argument" message) do:
 sudo nano /etc/network/interfaces  

Edit the "wlan" section to look like this:
 auto wlan0  
 allow-hotplug wlan0  
 iface wlan0 inet dhcp  
   wpa-ssid "yourssid"  
   wpa-psk "yourwifipassword"  
   wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf  

Remember to enter your SSID (router WIFI name) and your PSK (WIFI password).

Press CTRL+O, then ENTER to save the changes, then press CTRL+X to exit the text editor.

Then you can reboot the system to confirm if WIFI works.

5) If SSH doesn't work open this file:
 sudo nano /etc/ssh/sshd_config  

And add this code to the end of the file:
 IPQoS cs0 cs0  

Press CTRL+O, then ENTER to save the changes, then press CTRL+X to exit the text editor.

Then do this (so you don't have to reboot):
 sudo service ssh restart  

You can check right away, SSH should work now.

6) NTP server not updating date/time:

This is a bit more complicated, you need to go to www.pool.ntp.org and on the menu on the right of the website find your zone and country, then copy the URLs and paste them in the next file.

Open the file:
 sudo nano /etc/ntp.conf  

You can comment out the other URLS or put this on top of them, for example, for the United States:
 server 0.us.pool.ntp.org  
 server 1.us.pool.ntp.org  
 server 2.us.pool.ntp.org  
 server 3.us.pool.ntp.org  

Press CTRL+O, then ENTER to save the changes, then press CTRL+X to exit the text editor.

This may not work for several reasons, one may be that the current date/time are too outdated, so you can set date/time manually like this:
 sudo date -s "10 JAN 2016 20:37:00"  

Of course, you need to set the right date/time for you. I must say that there may be some other bug on the NTP server that I haven't figured out, so time may keep getting out of syc (you can always adjust it manually). There are some hardware clocks that come with a battery, in case you want to check that out.

7) If you can't ping do:
 sudo chmod u+s `which ping`  

You should be able to ping right away.

So these are basically all the bugs I've fixed after many hours of research, It's a real shame that the Raspberry Pi 3 has all these issues, hopefully they will be sorted out in a future release.

No comments: