forum.universal-devices.com

Welcome to UDI Forum
It is currently Fri May 24, 2013 6:43 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: HOWTO: NSLU #1 Comp Integration Intro (1-wire, audio, etc.)
PostPosted: Mon Feb 13, 2012 1:31 pm 
Offline
Advanced

Joined: Tue Nov 15, 2011 10:47 am
Posts: 120
This series of threads will be about using a Linksys NSLU Network storage device and integrating it with your isy-99i. It requires hacking it with new firmware to use it as a Linux server.

What is the NSLU? It's a small box with and ethernet port, and 2 USB ports. It is originally designed to allow you to add a flash or USB harddrive to your network and then share it. Inside the NSLU, behind the scenes, it's actually running a version of Linux. It is fanless. Does not have video output. It does not have a keyboard. It's about twice the size of the isy-99i. They generally go about $30 on eBay.

How or what can it do for me? There is a large community that have successfully hacked the NSLU. See here: http://www.nslu2-linux.org/wiki/ By loading a modified firmware to the NSLU, it expands its capabilities, and allows it to act as a linux server.

Why would you want to hack it anyway? Here is what I'm either doing, or planning to do now. All integrated with my isy-99i:

1) Shared network storage. The native function of the NSLU remains. I can have a shared folder for any of my devices on my network.

2) Web server. The NSLU can be configured as a standalone webserver. It's much better suited to host webpages than the isy-99i.

3) 1-wire temperature sensors. Through a USB interface, the NSLU can be polled by my isy-99i, and in return, updates a isy-99i variable with multiple temperature sensors.

4) Weather report. At the same time th 1-wire sensors are polled, it's also pulling the current weather (temp, forecast, etc), from accuweather.

5) Text-to-speech. Using google translate, it can convert any text to a mp3 (for instance the weather forecast above).

6) Audio player. It can play prerecorced audio files. You could create audio alerts, and then through the NSLU, play them back. The isy-99i, can send a network resource command to initiate these alerts.

7) Bluetooth proxmity. Allow proximity testing for iphone (who's home), to let the isy-99i update the house based on occupancy (temp, lights, audio, etc.)

8 ) Whole house audio monitoring (Russound). It monitors the zones, and if there is a change in the source, it updates a state variable on the isy-99i - which in turn can switch a HDMI matrix.

9) OpenRemote controller: There is a linux install of this available, and NSLU-type instructions. If I can make this work, it will allow a single source for whole house control via iphone/ipad.

With the exception of #9, I've tested and have at least some functionality of #1-#8.

Here are a couple links to what the NSLU can do, once it's hacked:
http://www.nslu2-linux.org/wiki/Info/Wh ... irSlugsFor
http://www.nslu2-linux.org/wiki/Applications/HomePage

There are different firmware versions that can be loaded on your NSLU. I'm NOT a Linux guy. Frankly, I'd be more comfortable with DOS, but I'm learning my way through. Here is a matrix of the different versions available:
http://www.nslu2-linux.org/wiki/FAQ/FirmwareMatrix

Ultimately I went with the simplest of firmwares (Unslung). The others seem to require a lot more Linux experience. In the end, I'm not sure if I'd pick a different version. If you require more advanced functions like Debian or Gentoo, you might pick a different version. You can choose whatever you want, but for my posts, I'm assuming you use the Unslung firmware.

Next I'll post the directions I used to hack my NSLU, I'll post additional threads on the actual ways to take advantage of your "unslung" box, and how to integrate it with your isy-99i.


Last edited by MstrD on Mon Feb 13, 2012 2:28 pm, edited 3 times in total.

Top
 Profile  
 
 Post subject: Re: HOWTO: NSLU #2 Comp Integration Intro (1-wire, audio, et
PostPosted: Mon Feb 13, 2012 1:32 pm 
Offline
Advanced

Joined: Tue Nov 15, 2011 10:47 am
Posts: 120
WARNING: Keep in mind, hacking this device can void your warranty. You can also brick your device (although I haven't had any issues, and you can revert it back to stock at anytime). Continue at your own risk.

What's necessary to hack the NSLU2:

NSLU2 - I got mine off ebay $30-$35ish.
Telnet software (included in many operating systems anyway)
WINSCP - free download (http://winscp.net/eng/index.php)
Flash/HD - you will need a flash drive or USB hard drive. I started with a 1gb flash drive. Then upgraded it to a 32GB flash drive, and ultimately replaced it with a USB Hard drive. I used a Seagate FreeAgent GO 320GB USB 2.0 External Harddrive

NOTE: I highly recommend that you start with whatever drive you ultimate intend to use. I was able to upgrade from one to the next, but it IS NOT a simple process. It would have been easier to start where I wanted to finish. It really doesn't require a large flash/HD. I've read some information regarding the reading/writing flash too much, so ultimate went with a Seagate HD.


If you buy the NSLU off eBay, and it isn't new, you may have to reset to the factory settings.


The NSLU2 defaults to IP 192.168.1.77. I left it there as it didn't conflict with my network. I keep anything below 192.168.1.100 as static and anything over that to be assigned via the routers DHCP.

A copy of the manual can be found here: http://homedownloads.cisco.com/download ... _D-WEB.pdf

Pressing the reset for 2 seconds will reset the IP to 192.168.1.77. Pressing it for 10 seconds will return the password to "admin". This will also reset all settings to factory defaults. This is probably a good place to start.

Information regarding the Unlsung firmware can be found here: http://www.nslu2-linux.org/wiki/Unslung/HomePage

There is a lot of discussion about which USB port to use to "unslung" it. You can read the link above. As best I could understand, it says to use Port #2, and that's what I did.

If you click through on the Unslung page it will take you to here: http://www.slug-firmware.net/ Where you can get the firmware. I got the binary Unslung firmware here: http://www.slug-firmware.net/u-dls.php

The readme on the download page doesn't seem to work for me. It's in the zip file though, so you can read it there. There is also a file called Unslung-6.10-beta.bin. That is the real firmware that you will use to hack your NSLU.

NOTE: There are instructions to Install here: http://www.nslu2-linux.org/wiki/HowTo/I ... ngFirmware
These vary slightly from the README (which I have posted below). If you have a brand new (factory settings) NSLU, you can replace the firmware using the web interface by pointing your browser to http://192.168.1.77 Once you have upgraded the firmware, and rebooted, you can continue with #2 in the README. The directions in the README are really for when you have already "unslung" your NSLU and you are attempting to upgrade it to a newer version. Please make sure you at least read through the README anyway. It explains a lot of details.

It all sounds more complicated than it is in practice. Especially if you have nothing on the device to start with. Worst case, you start over. Make sure you write down your passwords, as you will need it in the future a lot.


Last edited by MstrD on Mon Feb 13, 2012 2:14 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: HOWTO: NSLU Comp Integration Intro (1-wire, audio, etc.)
PostPosted: Mon Feb 13, 2012 1:33 pm 
Offline
Advanced

Joined: Tue Nov 15, 2011 10:47 am
Posts: 120
Unslung-6.10 README

If at any time you have any questions concerning the installation or operation
of Unslung firmware, your first port of call should be the NSLU2-Linux wiki at:

http://www.nslu2-linux.org

Additional information, including ChangeLog information can be found in the
associated Unslung NOTES file as well as on the NSLU2-Linux wiki.


-------------------------------------------------------------------------------


There are three parts to completing the installation of the Unslung firmware:


1 - PRE-INSTALLATION CONSIDERATIONS

2 - FIRMWARE INSTALLATION DETAILS

3 - UNSLINGING DETAILS



1) PRE-INSTALLATION CONSIDERATIONS


a) You *must* confirm that you can enter "upgrade mode" using the Reset Button
method. This is necessary because once you install Unslung, you will be unable
to use the web GUI to reflash the device; the Reset Button technique will be
required to install new firmware, upgrade, or recover from a bad flash:

http://www.nslu2-linux.org/wiki/HowTo/U ... pgradeMode


To upload the firmware, use either the Sercomm Update Utility (for Windows
users) or the UpSlug2 Utility (for Linux and MacOS X users):

http://www.nslu2-linux.org/wiki/Main/Se ... areUpdater
http://www.nslu2-linux.org/wiki/Main/UpSlug2
http://www.nslu2-linux.org/wiki/Main/UpSlug2onOSX

b)

b) You must have an external USB disk drive or an external USB flash device.
There are a number of considerations to take into account in selecting the size
and type of external device as well as which of the two USB ports to use:

http://www.nslu2-linux.org/wiki/Unslung/StorageBasics
http://www.nslu2-linux.org/wiki/Unslung ... orUnslung6

It is important to make sure that the device you intend to use is functional
with the standard Linksys firmware before you attempt to use it with Unslung.



Review any known issues and errata:

http://www.nslu2-linux.org/wiki/Unslung/KnownProblems

(Hint: read the wiki pages carefully to determine the firmware release to which
they apply; many of the pages contain information pertaining to older versions
of Unslung, or even to other firmware entirely.)



2) FIRMWARE INSTALLATION DETAILS

The installation process is simple, but each step is important. The most
common problems reported are a result of skipping one of the steps in this
process, so be careful. In particular, having a disk or flash device plugged
in when it shouldn't be can mean the difference between success and failure.


a) Preparation

- Install either the Sercomm (Windows) or the UpSlug2 (Linux and MacOS X)
utilities on the system you'll be using to upload the firmware.

- Access the Linksys web GUI, and record your network settings.

- Shutdown the NSLU2 and unplug all USB cables and devices.


b) Flashing the New Firmware

- Enter upgrade mode, using the Reset Button technique.

- Use either the Sercomm or UpSlug2 Utility to upload the new firmware.

c) Verifying the New Firmware

- The NSLU2 will restart itself after the firmware in installed.

- Access the Linksys web GUI. The new firmware version will be displayed on
the "Home" screen.



3) 'UNSLINGING' DETAILS

"Unslinging" is the process of copying the firmware to an external disk, and
configuring that external disk for installation of packages. In order to
perform this operation, you need to log in to the NSLU2 using telnet, and you
need a suitable external disk or flash device.

This procedure is made a bit more complicated because the behavior of the NSLU2
can change depending on the presence of an external disk. Specifically, when
an external storage device is plugged in, the NSLU2 will switch over to using
the passwords and configuration information stored on that external disk, if
possible. Since we don't know the root password originally written to that
device, you must be very careful to perform the following steps in precisely
the specified order, or you'll lock yourself out of your own device.


a) Gain Telnet Access

- Power up the NSLU2 without any disks connected.

- Enable telnet by going to the NSLU2's web GUI and clicking on the "Manage
Telnet" link (right-hand side), then on the "Enable" button to turn on the
telnet service.

- Use your telnet utility to telnet into the NSLU2, and log in using the
username root and password uNSLUng (upper/lower case is significant).

- Do not logout before you go to the next step, or you'll have to start this
step over again.


b) Gain Access to the External Storage

- Identify the drive or flash device to which you will be unslinging, and plug
it in to the desired USB port.

- Wait for a minute or two while the disk is mounted.

- Check the web GUI to make sure that the disk has been recognized by the
Linksys software

- If the disk has not been previously formatted on the NSLU2, then now is the
time to do that.

- Be patient - it might take several minutes for the NSLU2 to recognize the
hardware, mount the partitions, and verify that the drive is correctly
configured to be considered "Formatted".

- Do not continue if the drive is not marked as "Formatted (ext3)" in the
NSLU2 web GUI.


c) Unsling

- In the telnet session, run "unsling disk2" if your device is on the USB port
labeled "DISK 2", or "unsling disk1" if it's on the port marked "DISK 1".

- When prompted, enter a new root password - this password will replace the
uNSLUng password.

- When the unsling is complete, reboot the NSLU2.


d) Confirm That Your NSLU2 is Unslung:

- Once rebooted, open the NSLU2 web GUI in your browser.

- Confirm that the text at the bottom of the page reads "uNSLUng status:
Unslung to disk2, /dev/sda1" (your devices may vary, of course).

- Click the "Manage Telnet" link, and enable telnet as before.

- Telnet to the NSLU2, and login using the root user and the new password you
gave when unslinging.

- Confirm that the login message states that you are running in Unslung mode.


e) Updating Package Lists and Installing Optware Packages

(This is, strictly speaking, optional - but we expect that you installed this
firmware so that you could add additional software.)

- Telnet into the NSLU2.

- Check that your NSLU2 can reach the internet by pinging www.nslu2-linux.org.
(if it fails, check your NSLU2 network settings (on the web GUI pages), or
check your router or network configuration to correct this problem.)

- Enter the command "ipkg update" to update the list of software packages
("optware") available for Unslung.

- Install the "openssh" package with the command "ipkg install openssh".

-------------------------------------------------------------------------------


Congratulations! Your NSLU2 is unslung, and ready to do more than you'd
imagine such a small device could ever do. Enjoy! If you find the Unslung
firmware useful, you may wish to make a donation to help support the project:

http://www.nslu2-linux.org/wiki/Main/Donate


Top
 Profile  
 
 Post subject: Re: HOWTO: NSLU Comp Integration Intro (1-wire, audio, etc.)
PostPosted: Mon Feb 13, 2012 1:51 pm 
Offline
Advanced

Joined: Tue Nov 15, 2011 10:47 am
Posts: 120
Once you have "unslung" your NSLU, you will definitely want to spend some time here: http://www.nslu2-linux.org/wiki/ It explains in much more detail, what you can do. Specifically check out the HowTo Recipes link: http://www.nslu2-linux.org/wiki/HowTo/HomePage

If you have just done the Unslung firmware, for the most part, your NSLU will operate just like it did out of the box. You can setup and use shared drives. The folders can be created from the NSLU web interface (http://192.168.1.77) You don't have to take advantage of all the other features.

The first thing I did (which I actually used in the original firmware update), is loading WinSCP on my PC http://winscp.net/eng/index.php . This gave me a couple features. 1) SSH access into to the NSLU (which is really like Windows Explorer for you device). You can see the file structure, folders, and files. You can change permissions, and copy / delete files, etc. When you first start WinSCP make sure you select the correct connection type (SSH). 2) It allows you PuTTY access (like a command line into your NSLU). Telnet works, but you get all kinds of crazy characters if you go past the end of the line or you backspace. 3) It allows an easy way to create/edit a new script (program file).

New programs (prepackaged ones) are installed with a command like the following:

ipkg install xxxxx

It will go out to the NSLU repository and download the program, and then install it. A very fast and efficient way to install, and you don't necessarilly have to know how it all works behind the scenes. As I went along, many new programs, will dependent on something else, that I then had to install as well.

One of the first things you can hack, is actually a hardware fix. Apparently, for whatever reason, Linksys UNDERclocked the device. http://www.nslu2-linux.org/wiki/HowTo/OverClockTheSlug So it's really running at half it's speed.

NOTE: Newer NSLU weren't underclocked. Go to the link above, and there is a command like the following:

cat /proc/cpuinfo

It will show your the BogoMIPS of your device. 131.48 +/- is underclocked. 263.78 +/- is de-underclocked.

There doesn't appear to be a lot of downside to de-underclocking, but do so at your own risk. This will definitely void any warranty.


Last edited by MstrD on Mon Feb 13, 2012 2:04 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: HOWTO: NSLU Comp Integration Intro (1-wire, audio, etc.)
PostPosted: Mon Feb 13, 2012 1:55 pm 
Offline
Advanced

Joined: Tue Nov 15, 2011 10:47 am
Posts: 120
Assuming you have not successfully gotten to this point, your NSLU is now Unslung, and operating normally. You have some kind of expanded flash/hard drive attached. You may even have some network folders setup. It's really doing exactly what it was intended to do, but you should also be able to log into the device using SSH/puTTY using WinSCP or whatever program you choose.

In actuality, it takes less time to actually hack it, than it did for me to write all this up. I'll start posting some additional threads about how to actually do something meaningful with your NSLU, and integrate it with your isy-99i.


Top
 Profile  
 
 Post subject: Re: HOWTO: NSLU #1 Comp Integration Intro (1-wire, audio, et
PostPosted: Mon Feb 13, 2012 6:43 pm 
Offline
Advanced

Joined: Tue Nov 15, 2011 10:47 am
Posts: 120
I'm not sure it's mentioned in the instructions, but when you set the password, it is for user "root".

when you log into your NSLU2 using WinSCP, the File Protocol should be SCP. The host name is the IP address (default 192.168.1.77). The user is "root" and the password is whatever you setup during the installation. I get an error, about memory access, but when I click through it, I'm at the file structure of my NSLU2.

To access through puTTY, it is under the top menu item "commands", then select "open puTTY"

To create a new file, navigate to the folder/directory that you want it to be in. Then under the top menu "files" click "New"


Top
 Profile  
 
 Post subject: Re: HOWTO: NSLU #1 Comp Integration Intro (1-wire, audio, et
PostPosted: Tue Feb 14, 2012 10:21 am 
Offline
Advanced

Joined: Tue Nov 15, 2011 10:47 am
Posts: 120
I tried to put these threads in some sense of order and complexity. Sometimes one thread will rely on a previously installed software module. For instance, WGET is required for the weather/audio step, but I originally installed it with the 1-wire setup.

Even if you aren't going to use all of these components, I suggest you install each of the software steps anyway. They are pretty small, and won't really cause a lot of problems if they aren't used anyway.


Top
 Profile  
 
 Post subject: Re: HOWTO: NSLU #1 Comp Integration Intro (1-wire, audio, et
PostPosted: Wed Feb 15, 2012 10:31 am 
Offline
Advanced

Joined: Tue Nov 15, 2011 10:47 am
Posts: 120
One other thing to keep in mind, although the instructions I'm posting are for a NSLU that is running a Linux variation, the methods are the same for any Linux computer. You might have driver or installation issues, but the REST interfaces and the communications are identical.

I'm hoping that my posts will show people what capabilities exist. Many people are trying to do similar things. This method is fairly inexpensive. It isn't really that complicated once you get past the first few steps. I'm not a Linux guy. If you any reasonable amount of computer/programming experience, then you should be able to duplicate what I have done.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: MSN [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group