Linux Reef Controller – NSLU2 Sensor Server

image_pdfimage_print

The Linksys NSLU2 Network Storage Link device can easily be hacked with a modified firmware and used as a sensor server for your LRC. Here’s how!

  • First you gotta find one! Since they are not manufactured anymore this can be tough or expensive!
  • Download the latest Unslung firmware from here.
  • Follow the firmware flashing instructions provided in the Unslung Firmware README
    • Make sure to follow the instructions TO THE LETTER!!

  • After you have sucessfully flashed your NSLU2, ssh into it and perfrom the following commands to update it:
    • ipkg update
    • ipkg upgrade
    • DO_Reboot

  • After the device reboots install some necessary packages
    • ipkg install openssh nano usbutils ntpclient
    • Follow the guide here to fix an issue with the hardware clock and ntpclient
    • DO_Reboot

  • Setup OWFS
    • nano -w /etc/ipkg/owfs-feed.conf
    • Add the following to the owfs-feed.conf file:
    • src/gz owfs http://owfs.sourceforge.net/nslu2/packages
    • Save the file and run the following commands:
      • ipkg update
      • ipkg install owfs owshell
      • run-owfs
    • You should be able to access the owfs server from the built in web interface.
      • http://DEVICEIP:3001/
    • DO_Reboot

  • Your Linksys NSLU2 is now ready to serve as a OWFS sensor server
  • Get yourself one of these and some sensors, plug them in and reboot the NSLU2 for the correct modules to load on boot.
  • Once the device is rebooted you should be able to see the sensor Id’s listed in the web interface.
  • You can also view all of the devices by using the following owfs commands in an ssh session
    • List the one wire directory tree:
      owdir
    • List a sensor directory:
      owdir /SENSORID
    • Read sensor data:
      owread /SENSORID/variable
      • A temperature sensor read example in Farenheit
      • owread -F /28.2F2840020000/temperature

  • Your Slug is now ready to be polled by the webserver via cron jobs and perl scripts!

1 Response to “Linux Reef Controller – NSLU2 Sensor Server”


  1. Ronny

    It seems that the ipkg feed files are not pointing to the right links anymore to obtain the updated package lists when updating the slug. In order to fix them you need to edit 3 files in /etc/ipkg

    cross-feed.conf
    native-feed.conf
    oe-feed.conf

    in cross-feed.conf replace the current entry with the following:

    src/gz cross ftp://ftp.osuosl.org/pub/nslu2/feeds/optware/nslu2/cross/stable
    #
    

    in native-feed.conf replace the current entry with the following:

    src/gz native ftp://ftp.osuosl.org/pub/nslu2/feeds/optware/nslu2/native/stable
    #
    

    in oe-feed.conf replace the current entry with the following:

    src/gz oe ftp://ftp.osuosl.org/pub/nslu2/feeds/unslung/modules/cross/stable
    #
    

    Now when you run ipkg update it will work again!