CSE logo University of Washington Computer Science & Engineering
 CSE 461: Computer Communication and Networks (Winter 2008)
  CSE Home   About Us    Search    Contact Info 

Course home
 Home
Administrivia
 Overview
 Using course email
 Email archive
Schedule
 Lectures and readings
 Section and tutorials
 Midterms and exams
Assignments
 Homework
 Projects
Lab information
 Getting lab accounts
 Unix tutorials
   

Contents

Setting up the N800

Here's a brief document to help you get started on the N800. Hopefully, most of you have had a chance to play around with the device and get a feel for it. Unless you're extremely comfortable using the stylus and virtual keyboard to do all your code development, it would be a good idea to do most of the code writing (and compilation) elsewhere and then just copy the files over to the N800. As you all know, the N800 runs linux, and we should first install a terminal (where's the fun in running linux if you don't use the command line!). Having an ssh server and client would also be useful. We will be using the 'Application Manager' to install the tools we need.

Note: Make sure that you are connected to the internet first. This would be similar to how you would connect to the network from a laptop. You may have to register your MAC address with the dept. Temporarily you can open a browser and load a webpage, which will redirect you to the NoCat network login page.

  • Start the Application Manager: It can be accessed from MainMenu -> Tools -> Application Manager. (MainMenu is the big button on the left side of the screen, which looks like a pair of windows)

We need to tell the Application Manager where to get the programs from. This is specified in the application catalog.

  • Open the Application Catalog: Accessed via ApplicationManagerMenu -> Tools -> Application Catalog. The ApplicationManagerMenu can be opened using the little arrow at the top left of the screen.
    • Click on 'New' and enter the following details :
      • Catalog name: Maemo hackers
      • Web address: http://chalbi.cs.washington.edu/maemo-hackers.org/apt
      • Distribution: bora
      • Components: main
    • Click 'OK' to create the catalog. Now repeat the same for another repository
    • Click on 'New' and enter the following details :
      • Catalog name: Maemo extras
      • Web address: http://chalbi.cs.washington.edu/repository.maemo.org/extras
      • Distribution: bora
      • Components: free
    • Click 'OK' to create the catalog. One more catolog for some basic utils
      • Catalog name: Maemo
      • Web address: http://chalbi.cs.washington.edu/repository.maemo.org/
      • Distribution: bora
      • Components: free non-free
    • Finally click 'Close' to close the dialog, and refresh the package list. If all went well, you should see a progress bar as it downloads the set of available programs.

Now the repositories are set up, we will install xterm, and openssh.

  • From the main view of the application manager, select 'Browse installable applications', then 'All'
    • Find osso-xterm and install it.
    • Install openssh (this installs both the client, and the ssh server). During this installation, you will be asked to choose a root password. Remember the password!!!

You can use the MainMenu->Extras->xterm to access the terminal. Play around with a few linux commands (ls, cat) and check that things work as expected. We have a terminal -- all we need now is root, and then, we're all set! At the command line, type the following:

$ ssh root@localhost

Enter the root password you chose earlier, and you should have a root shell (you'll see a # instead of $ on the command line).

If you don't want to type your password everytime to get root access get the file gainroot and copy it to /usr/sbin/ on your N800. To get the file onto your N800, you can either scp it from another linux machine to the N800.

# scp jjohn@mylinuxbox.cs.washington.edu:~/gainroot .

An alternative is to install the tool wget and then fetch the file from the webserver directly. Ensure that the ApplicationManager is closed; otherwise you will get a locking error.

# apt-get install wget
# wget http://chalbi.cs.washington.edu/gainroot

Now, that we have the file, move it to the appropriate location and give it execute permissions

# mv gainroot /usr/sbin/
# chmod 755 /usr/sbin/gainroot
# exit

Now test to see that it works.

$ sudo gainroot
#

Compiling and Running a program on the N800

This is just a quick summary of the steps to get the development environment set up.

  • Install the free VMWare Player (for Windows or Linux).
  • Download and uncompress the VM image (the image contains Ubuntu Linux with scratchbox installed)
  • Open the uncompressed image in VMWare (double-click the .vmx file).
  • Inside the Virtual Machine:
    • Open a terminal
    • $ /scratchbox/login
    • [sbox-SDK_X86: ~]> sb-conf select SDK_ARMEL
    • [sbox-SDK_ARMEL: ~]>
  • Now you should be able to compile whatever file and copy the binary over to the N800.
    • [sbox-SDK_ARMEL: ~]> gcc hello.c -o hello
    • [sbox-SDK_ARMEL: ~]> scp hello jjohn@myn800.cs.washington.edu:
  • Run the binary on the N800 and test that it works as expected.

Flashing the N800's Operating System

If you feel that flashing your N800's OS is needed, feel free to follow these instructions on the Maemo website. Please use our version of

  • flasher-3.0 and
  • the OS image (OS2007, albeit a little more updated than the version that came preloaded on the devices).

Running OS2008 may not work with the given VM OS image, proceed at your own risk! If the flashing process for your N800 goes haywire, please contact the the course staff and we can give you a new one. :)


CSE logo Computer Science & Engineering
University of Washington
Box 352350
Seattle, WA  98195-2350
(206) 543-1695 voice, (206) 543-2969 FAX