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.
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.
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.
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….
/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.
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….
Â Â Â Â Â Â 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
Â Â Â Â Â Â 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
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
module-assistant auto-install ov51x-jpeg-source
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).
ntpdate Run ntpdate ntp.yourtimeserver.com
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:
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.
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.
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.
Linksys NSLU2 USB 2.0 Network Storage Link
Intel IXP420 (ARMv5TE)
Ethernet 10/100 RJ45
USB 1 2.5â€? Freecom 160Gb SATA