N900 with a Slice of Raspberry Pi
It may not come as a surprise to anyone who regularly reads my column that I tried to be first in line to order the Raspberry Pi. I mean, what's not to like in a $35, 700MHz, 256MB of RAM computer with HDMI out that runs Linux? In the end, I didn't make the first batch of 10,000, but I wasn't too far behind either. So, now that I've had a Raspberry Pi for a week, I've already found a number of interesting uses for it. You can expect more Raspberry Pi columns from me in the future (possibly including an update to my beer fridge article), but to start, in this article, I talk about a combination of two of my favorite pocket-size Linux computers: the Raspberry Pi and my Nokia N900.
At first you may wonder why combine the two computers. After all, both are around the same size and have similar initial hardware specs. Each computer has its own strengths, such as cellular networking and a touchscreen on the N900 and an Ethernet port and HDMI video output on the Raspberry Pi. In this article, I explain how to connect the N900 to the Raspberry Pi in a private USB network, share the N900's cellular connection, and even use the N900 as a pocket-size display. In all of the examples, I use the default Debian Squeeze Raspberry Pi image linked off the main http://www.raspberrypi.org page.
Set Up USB Tethering
The first step to using the N900 with the Raspberry Pi is to set up a private USB network between the two devices. There are a number of ways to do this, but I've found that the most effective way is via the Mobile Hotspot application on the N900. This program started as a way to allow you to tether your computer with your N900 by turning the N900 into a wireless access point; however, because it uses WEP for security, I always favored using Mobile Hotspot's lesser-known USB networking option. That way, I not only get to tether my laptop, but because tethering uses up quite a bit of battery power, by being plugged in over USB, my laptop can keep my N900 charged as well.
By default, the Raspberry Pi is not set up to enable USB networking, but luckily, this is easy to set up. Just log in to your Raspberry Pi and edit the /etc/network/interfaces file as root. Below where it says:
iface eth0 inet dhcp
add:
iface usb0 inet dhcp
Now, launch the Mobile Hotspot program on your N900 and make sure it is configured so that the Interface is set to USB, as shown in Figure 1. Then connect the Raspberry Pi to your N900, which should prompt you to select between Mass Storage mode or PC Suite mode. Choose PC Suite mode, and then click the Start button on the Mobile Hotspot GUI. This automatically should set up the USB network for you, and you should see logs like the following in your Raspberry Pi's /var/log/syslog:
Jan 1 01:04:44 raspberrypi kernel: usb 1-1.3: new high speed
↪USB device number 5 using dwc_otg
Jan 1 01:04:44 raspberrypi kernel: usb 1-1.3: New USB device found,
↪idVendor=0421, idProduct=01c8
Jan 1 01:04:44 raspberrypi kernel: usb 1-1.3: New USB device
↪strings: Mfr=1, Product=2, SerialNumber=0
Jan 1 01:04:44 raspberrypi kernel: usb 1-1.3:
↪Product: N900 (PC-Suite Mode)
Jan 1 01:04:44 raspberrypi kernel: usb 1-1.3:
↪Manufacturer: Nokia
Jan 1 01:04:47 raspberrypi kernel: cdc_ether 1-1.3:1.8: usb0:
↪register 'cdc_ether' at usb-bcm2708_usb-1.3,
↪CDC Ethernet Device, 66:77:ea:fa:12:8c
Jan 1 01:04:47 raspberrypi kernel: usbcore: registered new
↪interface driver cdc_ether
Jan 1 01:04:47 raspberrypi kernel: cdc_acm 1-1.3:1.6:
↪ttyACM0: USB ACM device
Jan 1 01:04:47 raspberrypi kernel: usbcore: registered
↪new interface driver cdc_acm
Jan 1 01:04:47 raspberrypi kernel: cdc_acm: USB Abstract
↪Control Model driver for USB modems and ISDN adapters
Figure 1. Mobile Hotspot Configured for USB Tethering
The point-to-point network that is set up turns your N900 into a gateway with the IP address of 10.8.174.1, and your Raspberry Pi is given the IP 10.8.174.10, which you can see from the output of ifconfig on the Raspberry Pi:
usb0 Link encap:Ethernet HWaddr 66:77:ea:fa:12:8c
inet addr:10.8.174.10 Bcast:10.8.174.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:309 errors:0 dropped:3 overruns:0 frame:0
TX packets:204 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:25703 (25.1 KiB) TX bytes:30676 (29.9 KiB)
Because the N900 is set up as the gateway, your Raspberry Pi can use that
cell-phone network for any outbound connections without having to worry
about plugging in the Ethernet port. In addition, if you start the SSH
service on the Raspberry Pi (sudo service start ssh) or better, if you
make sure it's enabled at boot, you can ssh into your Raspberry Pi from
the N900 with ssh pi@10.8.174.10 from a terminal. If for some reason
when you try to ssh to this IP, you get a "no
route to host" error,
investigate your Raspberry Pi logs and confirm that you truly are getting
the 10.8.174.10 IP. I found on my system that occasionally I would get a .11
or .12 IP instead.
Kyle Rankin is a systems architect; and the author of DevOps Troubleshooting, The Official Ubuntu Server Book, Knoppix Hacks, Knoppix Pocket Reference, Linux Multimedia Hacks, and Ubuntu Hacks.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
- New Products
- Linux Systems Administrator
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Web & UI Developer (JavaScript & j Query)
- Designing Electronics with Linux
- Dynamic DNS—an Object Lesson in Problem Solving
- Using Salt Stack and Vagrant for Drupal Development
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Nice article, thanks for the
6 hours 42 min ago - I once had a better way I
12 hours 28 min ago - Not only you I too assumed
12 hours 45 min ago - another very interesting
14 hours 38 min ago - Reply to comment | Linux Journal
16 hours 32 min ago - Reply to comment | Linux Journal
23 hours 26 min ago - Reply to comment | Linux Journal
23 hours 42 min ago - Favorite (and easily brute-forced) pw's
1 day 1 hour ago - Have you tried Boxen? It's a
1 day 7 hours ago - seo services in india
1 day 11 hours ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?



Comments
M-am apucat de afaceri cu
M-am apucat de afaceri cu pamantul :vand pepeni! Acesta va vi ocupatia mea pe anul acesta. Pepeni verzi sau galbeni de cea mai buna calitate.
yes...it would be interesting
yes...it would be interesting if that was on android mobiles too... hope see some extra info about that, if there is ofcourse.
Question
So can this be done with Android devices as well?
If so, please explain (at least in general terms) the manner/programs/processes that allow such connectivity?
Thank you..
You're faaaaaaar behind the
You're faaaaaaar behind the first 10000 if you got your first pi a week ago. :P Raspberry pi have been around a year or so.
N900 still rocks
My GSM chip in N900 is dead ,But the idea of using N900 as display is awesome . Even the tethering is a good idea. Both Raspberrypie and N900 are hacker devices, nice to see them coming together . :)
N900 for fun and profit
Great article Mr. Rankin.
I've found the N900 to be really useful when traveling. It has a multitude of useful capablities any geek would appreciate. Even though it's quite old now as cell phones go I use it's Internet connectivity via 3G Internet tethering (USB of course, until WPA is available not gonna do it) Use it as a movie player via composite out. (although had to convert many of my favorite movies originally ripped/contained beyond it's codec/resolution capabilities using ffmpeg) (BTW I've not found a way to play mp4/mkv files on it, if you have any tips, much appreciated)
It is, of course, a fine GSM phone and can use it on any GSM network I've ever encountered as it's transciever works on all of the bands domestic and International.
Any more N900 articles will be read with enthusiasim! Many thanks, Levelhead.
RAM
You state the $35 Pi having 256MB RAM, but the $35 "Model B" has 512MB. The rest of the article is quite interesting and once away from the work desk I will have to dig in a bit deeper! Thanks.
The first few months of sales
The first few months of sales had a 256Mb model B, then in October they started shipping the (current) 512Mb version.
Reference: http://www.raspberrypi.org/archives/2180