Welcome to the sixth instalment of Dive Into JeeNodes. We’re halfway there!
(Note: these instructions have been updated to use the Feb 9th Raspbian image)
This part is probably the most complex piece of the journey called DIJN. Then again, you’re about to set up a self-contained server which can be used for a truly astonishing number of tasks. Linux is everywhere nowadays, and this is probably one of the easiest, lowest-cost, and most risk-free ways to tap into that world which has driven – and evolved alongside – the Open Source Software trend for so long already.
One could probably spend a decade exploring all the software that runs on Linux, and a lot of it may well be affecting your daily life (ever heard of this thing called “internet”?). The good news of course is that you don’t have to spend years, but that whatever interests you is going to be totally in reach, if and when you choose to, eh, dive in…
Let’s get rollin’, shall we?
- Insert the SD card you prepared according to yesterday’s post into the RPi. Note that it has to be inserted with the label facing down.
- Connect the Ethernet cable on both sides to hook up the RPi to your LAN.
- Connect the 5V power adapter to the RPi’s micro-USB port. This will power it up.
LEDs will start flashing, the world will start spinning, and a loud roar will emerge as the positron drive starts up. Oh, wait… wrong movie. Here’s what will really happen:
- The red LED marked “PWR” will turn on.
- The other LEDs will blink in a various patterns – after some 30s they’ll look like this:
This indicates that everything has started up properly. Now it’s time to try and connect to it over Ethernet. How, depends on your platform. On Windows, you can use the putty program. On Mac and Linux, the built-in “ssh” command will be perfect.
Now is the time to shed your Fear Of The Command Line, if it’s all new to you. It’s very simple, really: the GUI we tend to use is like the body of a car, and the command-line its chassis. This DIJN series is about what goes on under the hood. That’s where the “real” stuff happens. There’s no other way – we need to look inside. We need to operate inside, in fact. Soooo… welcome to the machine, I’m sure you’ll like it. It’s fascinating in there :)
But first, we need to solve a small network puzzle: what IP address does the RPi have? There are two ways to find out: 1) have a monitor plugged into the RPi when it boots up, and the value should show up on the screen, or 2) consult the “DHCP client table” in your network router, which is usually the DHCP server for your local network. In my case, the IP address is 192.168.1.127, so that’s what I’ll use in the rest of this post.
The next step is to log into your RPi over the network, using ssh or Putty. Putty has its own GUI way of logging in, but in the Mac’s “Terminal” app or from the Linux command line, this is the way to do so (i.e. user name “pi”, IP address 192.168.1.127):
Here’s a transcript of what it will look like the first time around:
Bingo, you have logged into your RPi – welcome to the Linux command line!
You now need to go through some specific first-time RPi configuration adjustments, as hinted on that last line above. See also an earlier post for some more info (but don’t install Node.js just yet: that will be covered later on):
It’s a menu-based step, just type
sudo raspi-config, and once finished, reboot the system (by typing the command
sudo reboot). This last step is essential in this case.
Then wait a minute or two and log back in as before. You’ll again be connected to the Linux “shell”, patiently awaiting your command(s). If it’s all totally new to you, then trying out a few commands to familiarise yourself might be a good idea at this point. See this site for some tips and ideas. As long as you use the “sudo” command with caution, which gives you full “superuser” (admin) rights, there’s not much that can really go wrong. And if things ever get totally out of hand, you can always get back to this starting situation by re-formatting the SD card and starting over.
In the next step, we’ll make the RPi the central node of our Wireless Sensor Network.
(This series of posts is also available from the Dive Into JeeNodes page on the Café wiki.)