1-Wire/owfs on Seagate Dockstar under PlugApps Linux

This post is currently just a set of notes as I blaze the trail to get this working. Ignore for now, unless you like just reading random technical thoughts from someone puzzling their way through something they don’t know a lot about… I’ve started a true step-by-step description at the end below as I make my way through this for a second time. Hopefully this will be completed and cleaned up shortly.

PlugApps is based on Arch Linux, follows their start-up sequence – which is loosely based on BSD’s. The file /etc/rc.conf is where a lot of the main settings are made. Daemons are initiated based on an array entered at the bottom of that file. The daemons exist as bash scripts in the directory /etc/rc.d . Config files and similar stuff appear to be are normally set/stored in /etc/___. See here and here for the Arch info.

The owfs package now created for PlugApps includes the owfs core application/commands PLUS temploggerd but only creates the related option and template files for temploggerd. No similar files are created for the core owfs stuff. Currently have verified that owserver and owhttpd can be started with the applicable options from command line and those basically work.

Next steps:

  • figure out the option/config files for owserver, etc. under PlugApps based on prior work with NSLU2 (these were in /opt/etc/owfs there)
  • does my application require FUSE and the sensor array to be mounted as a file system? (A: YES, it is handy and by using owserver as a front end it does not cause a burden.) if not, skip owfs itself, otherwise script creation of /tmp/1wire and do related stuff to make the array available (A: will need to script this, it will be part of the rc.d script).
  • figure out temploggerd operation – can it be verified without web server access at start? (A: Yes, but web server is now set up)
  • determine what web server to use – thttpd? something light weight but secure! (A: Cherokee is available, installed easily and works well with little load on server. Plus is it has a GUI for admin!)
  • generate temploggerd templates (reclaim from NSLU2 installation?), or do I want to use another prettier graphing toolset like http://dygraphs.com/? (A: stay with temploggerd for now)
  • make the system survive a power outage -> install (what?) to NAND? or simply configure a static IP locked to MAC address on router and reboot from pogo OS if stuck?

Misc. Info:
From default installation of the owfs package on PlugApps:

[root@chicago /]# find . -name *emplog*
./usr/share/temploggerd
./usr/share/temploggerd/templates/README.temploggerd.templ
./usr/bin/temploggerd
./usr/lib/temploggerd
./usr/lib/temploggerd/temploggerd.conf.wrt54g
./usr/lib/temploggerd/temploggerd.conf.coldfire
./usr/lib/temploggerd/temploggerd.conf.default
./usr/lib/temploggerd/temploggerd.conf.ewrt54g
./usr/lib/temploggerd/temploggerd.conf.openwrt
[root@chicago /]# find . -name owfs*
./usr/include/owfs_config.h
./usr/share/man/man5/owfs.conf.5.gz
./usr/share/man/man5/owfs.5.gz
./usr/share/man/man1/owfs.1.gz
./usr/bin/owfs
./var/lib/pacman/sync/aur/owfs-2.8p7-1
./var/lib/pacman/local/owfs-2.8p7-1.2
./var/cache/pacman/pkg/owfs-2.8p7-1-any.pkg.tar.xz
./var/cache/pacman/pkg/owfs-2.8p7-1.2-any.pkg.tar.xz
[root@chicago /]# find . -name owft*
./usr/share/man/man1/owftpd.1.gz
./usr/bin/owftpd
[root@chicago /]# find . -name owht*
./usr/share/man/man1/owhttpd.1.gz
./usr/bin/owhttpd
[root@chicago /]# find . -name owse*
./usr/share/man/man1/owserver.1.gz
./usr/bin/owserver
[root@chicago /]#

How to Install PlugApps Linux on a Seagate Dockstar and Enable owfs and temploggerd

  1. Obtain ssh access for your Dockstar
  2. Perform basic installation of PlugApps
  3. Update pacman itself:

  4. [root@Plugbox ~]# pacman -Syu
    :: Synchronizing package databases...
    core 35.5K 172.4K/s 00:00:00 [######################] 100%
    extra 382.1K 457.7K/s 00:00:01 [######################] 100%
    community 371.6K 489.2K/s 00:00:01 [######################] 100%
    aur 5.9K 146.4K/s 00:00:00 [######################] 100%
    :: The following packages should be upgraded first :
    pacman
    :: Do you want to cancel the current operation
    :: and upgrade these packages now? [Y/n] Y
    resolving dependencies...
    looking for inter-conflicts...
    Targets (1): pacman-3.5.1-1.2
    Total Download Size: 0.79 MB
    Total Installed Size: 2.72 MB
    Proceed with installation? [Y/n] Y
    :: Retrieving packages from core...
    pacman-3.5.1-1.2-arm 804.7K 583.5K/s 00:00:01 [######################] 100%
    checking package integrity...
    (1/1) checking for file conflicts [######################] 100%
    (1/1) upgrading pacman [######################] 100%
    >>> The pacman database format has changed as of pacman 3.5.0.
    >>> You will need to run `pacman-db-upgrade` as root.
    >>>
    !!!!!! SERIOUSLY! Run pacman-db-upgrade or PACMAN WILL NOT WORK! !!!!!!
    [root@Plugbox ~]# pacman-db-upgrade
    ==> Pre-3.5 database format detected - upgrading...
    ==> Done.

  5. The Dockstar does not have a hardware clock, so it will always be off at start up unless you take action to fix that. The easiest way is to set up a network time protocol client. Install openntpd (automatic time sync client) and start it before the password change below, to avoid lockout due to password aging (30+ years will seem to have passed between the default date in 1970 and now).
  6. Change ssh login password for security (optional: install ssh public key in ~/.ssh/authorized_keys for more security [+ disable password authentication in /etc/sshd_config for even more security & to avoid having to type in your (long, strong) password])
  7. Install ddclient if you are going to want to access the machine over the internet with a DHCP address.

Now that we have the Dockstar basically set up and functioning under PlugApps, we can move on to the 1-Wire and owfs related items. (more to come…)
[root@chicago ~]# owserver -F -s 4304 -d /dev/ttyUSB0
[root@chicago ~]# owhttpd -F --readonly -s 4304 -p 3001
[root@chicago ~]# mkdir /tmp/1wire
[root@chicago ~]# owfs -F -s 4304 /tmp/1wire
[root@chicago ~]# ls /tmp/1wire

Post-install: disable telnet under pogoplug os, in case of PlugApps reboot failure (provide details here – did enabling ssh via pogoplug portal already do this?)

This entry was posted in 1-Wire, Computer, Linux, PlugApps and tagged , , . Bookmark the permalink.

One Response to 1-Wire/owfs on Seagate Dockstar under PlugApps Linux

  1. Pingback: Install ArchLinuxARM on the Seagate GoFlex Home

Leave a Reply

Your email address will not be published. Required fields are marked *