Raspberry Pi Lab

Author Archive

Final Setup

by on Dec.30, 2013, under Installation

Now that the OS is installed, the video is working, and the WiFi is setup, there is one more step before the RPi is ready to get down to business.

Run ‘sudo raspi-config

On this screen, you need to…

  • Expand the partition to fill the SD card.
  • Create the local.  Only create the ones you need or this will be time consuming.
  • Set the Timezine
  • Enable SSH
  • Set the hostname

Now update the system.

  • Run ‘sudo apt-get update
  • Run ‘sudo apt-get install sl cowsay htop
  • Run ‘sudo apt-get upgrade

OK… ‘sl’ and ‘cowsay’ aren’t necessary.  Those are just for fun.  But ‘htop’ is MUCH better than the standard ‘top’ command.

The first time you run the upgrade command will, very likely, take quite some time.  Be patient.  You need to have the system up-to-date.

Now that everything is setup, it’s time to backup the SD card.  See my next post.

 

Leave a Comment :, , , , more...

Setting Up WiFi From the Command Line

by on Dec.29, 2013, under Installation

RTL8188CUS-with-Rpi-transparentI have my RPi up and running.  It is patched into the network via the built-in RJ-45 ethernet port.  However, I have a motto in my lab… “One less wire is a good thing.”

My RPi package I received fro Christmas includes a USB WiFi adapter, so I’m proceeding to set it up and have “one less wire.”

Here are my steps to set up the USB WiFi adapter on my RPi running Occitdentalis.  Given that Occidentalis is a Debian variant, I am fairly confident is saying this should work with Debian, Raspbian, and Occidentalis.  It would, probably also work with x86 Debian and x86 Debian varients such as Ubuntu.  However, take care on systems running Gnome, KDE, etc…  Those systems may (probably are) running network managers within X that would conflict with the command line configurations I am about to describe.

My Wifi adapter is a Realtek RTL8188CUS purchased from AdaFruit.  This particular WiFi adapter is supported by Occidentalis so we won’t have to worry about drivers.

  • Run ‘iwconfig‘ to make sure your adapter is attached and functional.
  • Run ‘iwlist scan | grep ESSID‘ to get a list of WiFi SSIDs in range.
  • Make a backup of your interfaces file by running ‘sudo cp /etc/network/interfaces /etc/network/interfaces.original
  • Now edit /etc/network/interfaces to include your SSID and password
  • Make sure wpa_supplicant is installed and updated by running the command ‘sudo apt-get install wpasupplicant
  • Now delete a file. Run ‘sudo rm /etc/udev/rules.d/70-persistent-net.rules
  • Reboot.  Run ‘sudo reboot

The WiFi should, now, automatically connect to the network and receive an address via DHCP.

 

Here is my /etc/network/interfaces

auto lo
iface lo inet loopback
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid “my-network-ssid”
wpa-psk “my-wifi-password”

 

Leave a Comment :, , , , more...

More On The /boot/config.txt File

by on Dec.29, 2013, under Installation, Troubleshooting

Well, I have the /boot/config.txt file working!

Once I figured out the problem was the /boot/config.txt, I knew I could go back to my original plan of using Occidentalis on the RPi.  So I re-flashed an 8Gb SD card with the Occidentalis image and mounted it on my laptop.

Navigating to the /boot/config.txt file, I made the following changes…

disable_overscan=0
hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=46
hdmi_drive=2
config_hdmi_boost=4

Obviously, there is more in the file than that, but you don’t need me to post all the comment lines.  These are the lines that are left after removing all comment lines.

BE CAREFUL…Read the documentation for your specific monitor AND check out the config.txt resource link I posted in my previous article.  The group and mode lines are specific to your monitor’s resolution and timing.   See that previous article here.

 

 

Leave a Comment :, , , , , more...

Great Resource for the config.txt file

by on Dec.29, 2013, under Installation, Troubleshooting

Here is a great resource for configuring the config.txt file…

http://raspberrypi.stackexchange.com/tags/config.txt/info

 

 

Leave a Comment :, , , more...

NOT A Hardware Problem

by on Dec.29, 2013, under Installation, Troubleshooting

I, now, know for certain that my problem is NOT hardware.

I loaded Raspbian on an SD card and modified the /boot/config.txt file to enable  the force VGA option.  So the display “works.”  The resolution and alignment aren’t right, but I’ll work on tweaking that out.

When I get it working correctly, I’ll post my /boot/config.txt file.

 

Leave a Comment :, , , , more...

Confused?

by on Dec.27, 2013, under Installation, Troubleshooting

So I tested the HDMI output on the RPi by connecting it to the HDMI cable coming from one of the regular computers to a television.  There is nothing wrong with the RPi.

Re-tested the HDMI to VGA converter on the same television and it works also.

Recall, from my previous posts, I already tested the monitor on the iPad’s VGA adapter.

So if the RPi works and the HDMI converter works, and the VGA cable works, and the monitor works, then why don’t they all work together?

Back to the thinking box!

 

Leave a Comment :, , , more...

Flaw In My Logic

by on Dec.26, 2013, under Installation, Troubleshooting

Although I am fairly confident in my conclusion that the HDMI to VGA converter I was using is, in fact, defective.  However, it occurred to me that my logic has a flaw.  I could be the HDMI converter, but it could also be the HDMI port on the RPi itself.

When I got the RPi up the first time, it was via the composite video port — not the HDMI.  Therefore, not all variables have been eliminated.

I will devise a test to verify both the HDMI port on the RPi and the HDMI converter and post the results.

 

Leave a Comment :, , , more...

Troubleshooting My First Install

by on Dec.26, 2013, under Installation, Troubleshooting

debugging-computer-transparent-tightWell, the instructions I detailed in my previous post were correct and worked as intended.  The procedure I followed was NOT the problem.

To trouble shoot, I first verified the image was flashed to the SD card correctly by re-flashing the same card.  But when that didn’t produce a different result, I decided to test the micro-SD card adpater by trying the flashed mico-SD with all four of my adapters.  But no luck there either.

Next I decided to try a different micro-SD card.  I have a couple of 8Gb micro-SDs to I grabbed one of them and flashed it with the same procedure I detailed in my previous post.  When I tested that SD on the RPi, I could see a different result on the board.  In addition to the solid red LED that was there in the previous tests, I could now see a flashing green LED.  I’ve been around computers long enough to recognize the flashing of the green LED as boot up activity.

However, there was still no result on the monitor.  The next step was to test the monitor.  The monitor and VGA cable tested ok by connecting to my iPad.  So I took the RPi over to the TV and pulled the composite video from the VHS.  With the composite video connected to the RPi it booted into Occidentalis.

Conclusion…  My initial install had a bad 4Gb micro-SD card AND a bad HDMI to VGA converter.   How’s that for bad luck?  Hmmm?

Leave a Comment :, , , , , , more...

Installing Occidentalis

by on Dec.26, 2013, under Installation

First step is to download the latest version of Occidentalis here.

The download page states that an SD Card of at least 4Gb will be necessary to install the Occidentalis image.  No problem.  I have a couple of 8gb SD cards and a 4Gb card.  Since this is my first install and I don’t know how much additional space I’ll need.  I’m going to go ahead a chose the smaller, 4Gb card.

tux-transparentNext, I’ll follow the install instructions found here.  These are  instructions for Raspbian Wheezy, but they should work to get my Occidentalis up and running.

Ok, so the “instructions” on that page are a bit, shall we say, wordy.  Here is what I did to get the SD card imaged.  I’ve already downloaded Occidentalis and extracted the archive to the HDD on my laptop.

1.  Mount the SD card on my laptop.

2. Determine the disk. NOT the partition.  Using the ‘sudo fdisk -l’ command I was able to determine that my 4Gb SD card is ‘/dev/mmcblk0’.  This will be different on your computer.

3. Next I’ll write the image to the disk using the ‘dd’ command.  Like this…’sudo dd bs=1M if=<your image file>.img of=/dev/<disk# from step 2>’.

Note… You will see that my dd command had a capital M in the ‘bs-1M’ parameter. There is no lower case m as a byte multiplier in dd.  See ‘man dd’ for more details.

Also note… The dd command gives absolutely no indication of it’s progress and can appear frozen.  Be patient.  This process could take several minutes.  Fortunately, my SD card reader has an activity LED, so I knew it was working.  Like I said… patience.

4.  Run the command ‘sudo sync’.  This will flush the write cache and unmount the SD card.  It is now safe to remove the card.

5.  I re-inserted the SD card.  Two partitions were mounted and appeared healthy  Of course, I issued the ‘sudo sync’ again before removeing the card.

6.  Put the card in the Rpi and it should work.  That is according to all the instructions.  It didn’t work for me and that will be the topic of my next article.

 

 

 

 

 

Leave a Comment :, , , more...

Which Linux Distro?

by on Dec.25, 2013, under Operating Systems

Well, with Linux, there is not one right answer.  The only that that is for certain is that the Linux distro chosen must be for an ARM processor.  That means my personal favorite desktop and server distro, Ubuntu, is out of the running.

But there are good options.

The absolute best option would be Gentoo.  Start from the absolute bare bottom and custom compile the entire operating system specifically for the piece of hardware on which it is running.  While that would be the best option, I don’t have the time or desire to spend hours (perhaps days) tweaking, compiling, and re-compiling absolutely everything, so Gentoo isn’t an option for me.  At least not right now.

The Raspberry Pi Foundation recommends a customized variant of Debian Linux they call Raspbian Linux.  It is a distro specifically optimized for the Raspberry Pi.  Sounds like a good option.

However, Ada Fruit recommends a Raspbian variant she calls Occidentalis Linux.  It is a Raspbian base that has been further optimized and tweaked for building and controlling your own DIY circuits.

So, If you are going to build something that doesn’t require controlling an external circuit, then go with Raspbian.  But I want to build stuff, so I am going to start with Occidentalis Linux.

Tell me about the distro you use and why you chose it.

 

Leave a Comment :, , , , , , more...

Archives

All entries, chronologically...

Our Partners

Please take a minute to visit our partners

Looking for something?

Search the Site

If you can't find what you are looking for, please leave a comment somewhere, subscribe to our feed and hopefully your question will be answered shortly, so please visit again!