E220 Modem On NSLU2 Running Debian Lenny

A while back I was trying to get my tmobile e220 modem running on my nslu2 and I tried everything wvdial / network-manager etc etc but still nothing. Getting it to work was the major foundation to a project I was doing so HAD to be done. I was at my wits end when I stumbled purely by accident a webpage explaining how to do it via UMTS. Here’s a copy of the page for archive purposes only none of it is my work and all credit goes to the author.

Read more

Lenny On NSLU2 No Longer Supported

After a flash drive crash I wanted to re-install Debian 5 on my NSLU2 however after visiting the authors website I found it’s no longer supported and thus forcing you to install Debian 6 Wheezy. Also you can no longer use the graphical install that we have all become accustomed to but rather manually partition and format your drive then download and extract the base file onto it. I tried it the new way and what a long winded process it is. After getting Debian 6 up and running I found my custom software install script failed at multiple points due previous packages not being available in the new release. I decided to find a way to re-install Debian 5 and this is how I did it.

Read more

Slug Reborn

Well as you probably know I dumped my slug (nslu2) project after it died. Well yesterday I took it back up again but it was playing up no end, it would randomly not power on for more than 5 seconds, or wouldn’t power on if the ethernet was plugged in etc, as a test I managed to install Debian on a USB stick on it. I tried to read the old usb HDD it had but there was lots of data missing, I tried to format it in XP but it failed after only 4% so definitely FUBAR.I tried a brand new HDD on the slug and that wouldn’t work either but did in XP. After much head scratching I found out the PSU was faulty. I thought it was the HDD. This left me with the old chicken and egg equivalent where by I don’t know if the power killed the disk or vice versa, I prefer the case of my Freecom HDD but again I don’t know if that was what killed everything so I just stuck with the one that the new disk came in.

I’m install Debian at this very moment so will hopefully be ready to play with in a couple of hours or so.

open /dev/video0: Device or resource busy

I had strange problem with my EyeToy which meant if I plugged it in before and then booted the slug I would get the following error when I tried to start webcam

v4l2: open /dev/video0: Device or resource busy
v4l2: open /dev/video0: Device or resource busy
v4l: open /dev/video0: Device or resource busy
no grabber device available

However if I plugged it in after it had booted it worked fine. Thus I did the following….

fuser /dev/video0

/dev/video0:          1871m

ps -aux | grep 1871

nobody    1871  0.0  2.4   5492   732 ?        S    19:55   0:00 /usr/bin/camserv

This showed me that the software camserv was trying to access the dev. After reading this I had a ‘Ahhh now I remember moment’ i’d installed a few webcam software when I was looking for the right one amnd not removed it hence the conflict. All is working as it should now.

“Webcam” Software

I only needed a simple webcam solution so I’ve used one called ‘webcam’ installed using

apt-get install webcam

this creates a config file /root/.webcamrc edit this file to suit your needs. Here’s mine for my own reference….

[grab]
       device = /dev/video0
       text = Logitech 3000 %d-%m-%Y %H:%M:%S (BST)
       fg_red = 255
       fg_green = 255
       fg_blue = 255
       width = 640
       height = 480
       delay = 30
       wait = 1
       input = usb
       norm = webcam
       rotate = 0
       top = 0
       left = 0
       bottom = -1
       right = -1
       quality = 75
       trigger = 0
       once = 0
       archive = /home/blah/archives/cam0 cam0 %d-%m-%Y %H-%M-%S.jpeg
[ftp]
       host = 127.0.0.1
       user = root
       pass = xxxx
       dir  = /var/www/cams
       file = cam0.jpeg
       tmp  = uploading.jpeg
       passive = 1
       debug = 0
       auto = 0
       local = 1
       ssh = 0

Webcams

I’ve managed to get a couple of cams working on my slug so here’s what ones and how

Logitech Pro 3000/4000

apt-get install qc-usb-source qc-usb-utils


Logitech Quickcam Chat

module-assistant auto-install gspca

EyeToy

module-assistant auto-install ov51x-jpeg-source

Install Some Packages

Obviously it’s down to personal choice what packages you install so this list is more for personal reference than anything else. (I’ll be updating this list as and when I come across ones I need).

nano

lynx

ntpdate Run ntpdate ntp.yourtimeserver.com

rcconf

unzip

qqlite

php5-sqlite

gcc

make

Upgrading Firmware

Firstly there are vast online communites whit howtos on install ing various firmware and linux distros this is merly my small how I install Debain onto mine.

Put into upgrade mode

Turn off the slug and while holding the reset key on the back turn it on. After a while you can see the orange light will become red. At that time immediately release reset key.You must be seeing a red light blinking telling you that you did it right :).

Getting The Firmware

The Windows Way

Download the firmware http://www.everbesthk.com/8-download/sercomm/firmware/NU54/Upgrade_207_XP.zip After downloading, open the zip file and run `Upgrade_207_XP.exe. This will install the utility. It will show up in the Start menu, under Programs | Ugutil, as Upgrade Utility.

The Linux (best) way

Download upslug2 from http://trac.nslu2-linux.org/upslug2/browser/trunk
After you have downloaded the source code, use GNU autotools (i.e. autoconf and automake) and GCC to build upslug2:

cd upslug2

autoreconf -i

./configure

make

Getting The Debain Image

Download the latest debian file from http://www.slug-firmware.net/d-dls.php

I got Debain/NSLU2 (armel) 5.0.3 Stable Release.

Installing The Image
Now my slug already had openslug firmware on it and when I did the debian flash it failed so to make it work I had to revert to the stock linksys firware and then install the debian one.

From my linux box that I installed upslug2 onto I ran
upslug2 -i di-nslu2.bin

This software automatically finds your slug and installs the image (obviouslt if you have more than 1 on your network problems will arise).

*NOTE* I highly recomment that you do any image upgrades via a WIRED network due to the possible packet loss that can occur via WIRELESS networks, better still connect your PC and SLUG firectly together using a X-OVER cable.

Once the program outputs Rebooting… done the box will reboot

After you have flashed the debian-installer image, your NSLU2 will boot and start the Debian installer. Since the NSLU2 does not have any IO device, SSH will be used for the installation. The installer will bring up the network, start the OpenSSH server and allow you to connect to the device using SSH. You have to wait approximately five minutes after the debian-installer firmware has been flashed before you can connect, but please be patient as it can sometimes take slightly longer, say 10-15 minutes. When the installer is ready, it will beep three times to indicate that you can now login via SSH using via the username installer and password install

Now you are able to follow the standard on screen prompts and install the OS. Be AWARE that this process does take a few HOURS so make sure you keep your terminal window OPEN otherwise you’ll have to start all over again. Also it’s worth remembering that this is a net install and thus the speed of your connection also has a big part to play in the install time. Unfortunately it’s not an ‘unattended’ install and it does prompt you for various inputs so you will have to keep checking your terminal every so often.

133MHz Or 266MHz?

First off it appears there are in fact 2 versions of the NSLU2 one being 266MHz and an underclocked one running half speed at 133MHz. You can find out by telneting to your box and doing the old cat /proc/cpuinfo command. If you’ve got the underclocked version there is lots of info here http://www.nslu2-linux.org/wiki/HowTo/OverClockTheSlug on how to overclock it. From what i’ve read it appears models manufactured after May 2006 run at 266MHz.

What Is An NSLU2?

Basically this little device is sold by Linksys as a small, low cost,
Network Attached Storage (NAS) device. It is designed to share up to
two USB hard drives, or USB key drives, with a small network using
Samba. However it can easily be flashed with replacement firmware, and
then from there, an ever-increasing range of Linux distributions.

My Hardware

Linksys NSLU2 USB 2.0 Network Storage Link

Intel IXP420 (ARMv5TE)

32Mb RAM

8Mb Flash

Ethernet 10/100 RJ45

USB 1 2.5� Freecom 160Gb SATA

HD
USB 2