navitron
 
Renewable Energy and Sustainability Forum
UK's most popular Renewable Energy Forum May 23, 2012, 06:09:51 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Anyone wishing to register as a new member on the forum is strongly recommended to use a "proper" email address - following recent spam/hack attempts on the forum, all security is set to "high", and "disposable" email addresses like Gmail, Yahoo and Hotmail tend to be viewed with suspicion, and the application rejected if there is any doubt whatsoever
 
Recent Articles: UPDATE ON DECC APPLICATION FOR LEAVE TO APPEAL TO THE SUPREME COURT | Yingli Green Energy's PV Module Ranks No.2 in TUV Rheinland Energy Yield Test | Navitron Solar Showers at Glastonbury for Year 5!
   Home   Help Search Login Register  
Pages: [1] 2 3 4   Go Down
  Print  
Author Topic: Installing owfs on Ubuntu  (Read 7107 times)
Talisker
Newbie
*
Offline Offline

Posts: 16


« on: January 02, 2011, 08:15:58 PM »

Happy New Year to all.

I could do with some help installing owfs.  I am in the process of converting from windows to linux and am pretty new to it all.  I have an existing one wire network up and running on Logtemp in Vista. I have recently installed Ubuntu on a Eee PC 900 and like what I see so far.   The problem I am having is once downloaded (owfs-2.8p4) I am struggling to install it.  I have extracted the necessary .tar.gz file in my Downloads folder but that is as far as I seem to be able to get.  How do I install the necessary files?

My overall aim is to set up a web page with graphs of my monitored temperatures, but one step at a time!

Jason

Logged
martin
Administrator
Hero Member
*****
Offline Offline

Posts: 11420



WWW
« Reply #1 on: January 02, 2011, 08:22:39 PM »

Chapter and verse - http://www.psychocats.net/ubuntu/installingsoftware - for most software it's really easy using the software centre - this explains all the ways! Wink
Logged

Unpaid volunteer administrator and moderator (not employed by Navitron) - Views expressed are my own - curmudgeonly babyboomer! - http://www.farmco.co.uk
wyleu
Guest
« Reply #2 on: January 02, 2011, 08:52:04 PM »

You don't say which version of Ubuntu you are using.
I'm in a similar situation with 10.10 ( Maverick Meerkat) in that I have to put owfs on it from scratch.
so I'll write it up as I go along. Hopefully we can get this down as a howto.

It's not too hard, but it does involve some none standard setups ( it isn't done as a package for instance )  and because it doesn't have a nice friendly front end as such it can be a little difficult to know if you've been successful or not.

Don't worry, it's not too hard and once it's going it tends to just run and run, unlike some of the PC solutions ...  whistlie

I've got a bit too much port & stilton in me at the moment to make it entirely logical  but come the cold light of tomorrow I'll have a go.

« Last Edit: January 02, 2011, 08:53:41 PM by wyleu » Logged
Talisker
Newbie
*
Offline Offline

Posts: 16


« Reply #3 on: January 02, 2011, 09:38:22 PM »

Thanks for your responses.

I have installed the latest Ubuntu 10.10 Netbook version.   Following the links that martin put me onto - well it seemed to install, but not quite as the instructions suggested.  Also when I try an run the owfs from a terminal window, I get 'command not found'. 

Time for a beer to think it over now!  Will do a bit more research, but if you have any further hints wyleu they would be gratefully received.
Logged
titan
Full Member
***
Offline Offline

Posts: 208


« Reply #4 on: January 02, 2011, 09:55:32 PM »

This looks well out of date  http://owfs.org/index.php?page=ubuntu  but there is also a link to another site. It will be interesting what wyleu comes back with. I was using the one wire viewer with some i-buttons last year and that was simple. Debian comes up with ufsutils it looks like owfs was dropped as there was no maintainer.
Logged
EccentricAnomaly
Guest
« Reply #5 on: January 02, 2011, 11:28:24 PM »

I haven't got owfs on my current Ubuntu system so I can't check properly but when I did use it it was installed somewhere funny¹.  I've still got some symbolic links in /usr/local/bin which I set up to be able to use it conveniently which might be a clue:

Code:
ea@bill:~$ ls -l /usr/local/bin/ow*
lrwxrwxrwx 1 root root 19 2009-04-29 15:16 /usr/local/bin/owdir -> /opt/owfs/bin/owdir
lrwxrwxrwx 1 root root 19 2009-04-29 15:16 /usr/local/bin/owget -> /opt/owfs/bin/owget
lrwxrwxrwx 1 root root 21 2009-04-29 15:16 /usr/local/bin/owhttpd -> /opt/owfs/bin/owhttpd
-rwxr-xr-x 1 root root 65 2009-04-02 14:45 /usr/local/bin/owman
lrwxrwxrwx 1 root root 20 2009-04-29 15:16 /usr/local/bin/owread -> /opt/owfs/bin/owread
lrwxrwxrwx 1 root root 22 2009-04-29 15:16 /usr/local/bin/owserver -> /opt/owfs/bin/owserver

I don't think I every bothered with owfs as such - I just used owserver with the command line tools and owhttpd.


¹ Funny for a Linux user anyway.  Other Unix-like system users find it more sensible, I believe.  Solaris or BSD, perhaps.
« Last Edit: January 02, 2011, 11:29:59 PM by EccentricAnomaly » Logged
wookey
Hero Member
*****
Offline Offline

Posts: 2672


WWW
« Reply #6 on: January 03, 2011, 01:50:51 AM »

Despite some Debian packages having been made over 2 years ago, owfs has never made it into Debian/Ubuntu. I have no idea why  - I guess the packager just never did the uploads. I've been using his packages from some time now, but of course they could really do with an update to current code. There is an Ubuntu  PPA here: http://ppa.launchpad.net/smurf/ubuntu/pool/main/o/owfs/ with v 2.6p6 and 2.7p7 code in it (last built for intrepid). The Debian repo at http://alt.smurf.noris.de/debian/ doesn't seem to have the owfs packages any more.

I did start updating them once for upload but never finished (that happens a lot - too many things to do).

But this really does need fixing, so I'll have another go at uploading that code for current release. If you find that the packages in the PPA work on Ubuntu do say so (and which version), as that's useful to know. I can maintain packages in Ubuntu as well as Debian, although I don't have direct upload rights there.

Those packages probably need refreshing for current Debian and Ubuntu, but that's usually not hard.
Logged

Wookey
wookey
Hero Member
*****
Offline Offline

Posts: 2672


WWW
« Reply #7 on: January 03, 2011, 04:06:04 AM »

OK. After the usual tiresome fight with autotools, I have updated owfs packages for maverick and squeeze (amd64 only so far - I probably have an i386 chroot I could use if people need those too?). Available here:
http://wookware.org/software/repo/dists/

So if you add (on an Ubuntu maverick machine):
deb http://wookware.org/software/repo/dists/maverick main
deb-src http://wookware.org/software/repo/dists/maverick main

to your /etc/apt/sources.list
then do apt-get update; apt-get install owfs you should be in business.

There are a lot of minor issues in those packages, but hopefully nothing significant. Tell me if it works.
Logged

Wookey
Talisker
Newbie
*
Offline Offline

Posts: 16


« Reply #8 on: January 03, 2011, 07:18:05 AM »

Thanks wookey.

Being new to this Linux stuff - is there any  chance you could provide a bit more of an idiots guide as to how you actually add the files to the directory to stated?  Also - do I need to anything to undo the previous install attempts I have made?

 
Logged
SimonHa
Full Member
***
Offline Offline

Posts: 164


« Reply #9 on: January 03, 2011, 10:43:35 AM »

I've done this just recently on Ubuntu 9.04 - I followed the instructions (linked from the OWFS site) here: http://tomasz.korwel.net/2006/07/02/owfs-instalation-on-ubuntu-606/ and don't remember too many problems.

Hints:
When you do get it installed you probably want to funnel all 1-wire commands through the owserver - this stops you getting delays/errors if you try to access the 1-wire bus from more than one program at once. During startup as root I run:
Code:
/opt/owfs/bin/owserver -p 4304 -d /dev/ttyUSB0 -t 30 --link --error_level 9
/opt/owfs/bin/owfs -s localhost:4304 --allow_other /var/1w/mnt/
--link is only if you are using an iButton link device, --allow_other allows non-root users to read/write to the bus

I use OWNet (downloaded from CPAN) for 1-wire access from Perl scripts, e.g.
Code:
use OWNet;
my $owserver = OWNet->new();
print "Temperature: ".$owserver->read('/28.B4C9AB020000/temperature')."\n" ;

There's also a PHP interface (http://owfs.org/index.php?page=owphp) but I haven't got that far yet - I'm just calling scripts from PHP.

HTH
Simon
Logged
KLD
Hero Member
*****
Offline Offline

Posts: 1340


« Reply #10 on: January 03, 2011, 11:55:46 AM »

Talisker,

Ubuntu and Debian use a relatively comfortable system to install / update / remove software. The developers (like Wookey!) package their software into a single file, and put these into some common place, a repository. On your computer you have a program called a package manager, which allows you to search, select, and download those files, and extract and install the contained software. (plus a few more things.) So, in order to use that method, you just tell your package manager (I'll shorten it to PM) on which server to look for packages, and the rest is almost automatic.

Personally I'm using Debian, and I rather use command line tools instead of click and go GUI software.

There is a file in the directory /etc/apt, called sources.list. In order to view the content of that file, you open a terminal window ( Applications --> Accessories --> Terminal ), and type "cat /etc/apt/sources.list"
Code:
klaus@laptop:~$ ls -l /etc/apt/sources.list
-rw-r--r-- 1 root root 374 Sep 26 10:15 /etc/apt/sources.list
klaus@laptop:~$ cat /etc/apt/sources.list
#
# deb cdrom:[Debian GNU/Linux testing _Squeeze_ - Official Snapshot amd64 CD Binary-1 20100216-17:50]/ squeeze main

deb http://mirror.ox.ac.uk/debian/ sid main contrib non-free
deb-src http://mirror.ox.ac.uk/debian/ sid main contrib non-free

deb http://www.debian-multimedia.org sid main non-free


This is the content of mine. If you want to use Wookey's packages, you need to add the two lines he gave in his last post. Use an editor like gedit or nano to open the file, copy the two lines into it, and save. NB. See the first line above, the output of the list command. This shows that the owner of the sources.list file is a user caller root. Only root can edit this file. So, what now? You can gain root priviledges by prefixing your command with sudo:
Code:
sudo nano /etc/apt/sources.list

Next you tell your PM about the changes:

Code:
sudo aptitude update

You can check what owfs packages are available for download now by

Code:
sudo aptitude search owfs

And then, get the files and install them:

Code:
sudo aptitude install owfs
Replace "owfs" with whatever Wookey has called the package.

And away you are!
After installation, connect the 1-wire adaptor + sensors, and see whether you can find the sensors. "owserver --help=device"  will tell you how to invoke the program. I believe you need to run owserver as root, so "sudo owserver -u" will start the program, assuming you've got a DS9490R adaptor.

"sudo owdir" shows the connected adaptor + sensors.

Once you are there, say Piep and we'll see how we get further.

Good luck
Klaus

Logged
KLD
Hero Member
*****
Offline Offline

Posts: 1340


« Reply #11 on: January 03, 2011, 12:26:57 PM »

"The problem I am having is once downloaded (owfs-2.8p4) I am struggling to install it.  I have extracted the necessary .tar.gz file in my Downloads folder but that is as far as I seem to be able to get.  How do I install the necessary files?"

"Also - do I need to anything to undo the previous install attempts I have made?"


If you haven't installed anything, i.e. if you haven't excecuted "sudo make install", then all you did should be within the directory you extracted from the tar file. If you get Wookey's packages to work, you can simply delete the directory "owfs-2.8v2" or whatever it's call in your case.

Did you read the important note in Wookey's post, that his packages are for a 64-bit version of the operating system?

Klaus
Logged
wyleu
Guest
« Reply #12 on: January 03, 2011, 12:53:43 PM »

Not really a lot to say fine, fine work from Wookey...  ( 32bit Pleeeeese...) I'm on a 32bit system so obviously profess a preference.

and an excellent write up by KLD, smites and applauds have flowed like they didn't cost anything.

One useful thing to load is lsusb which is in the usbutils package...

Code:
sudo apt-get install usbutils


This allows you to see what USB devices the system thinks it's got attached, and is probably a good sanity check to see when you plug the Puce Baboon in if anything actually recognizes it.

Before One wire adapter plugged into USB...

Code:

chris@dellap:~$ lsusb
Bus 001 Device 004: ID 07ab:fcf6 Freecom Technologies
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0582:001a Roland Corp.
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 046d:c030 Logitech, Inc. iFeel Mouse
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
chris@dellap:~$


Unplugged Memory Stick...
Code:
chris@dellap:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0582:001a Roland Corp.
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 046d:c030 Logitech, Inc. iFeel Mouse
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
chris@dellap:~$

One puce baboon later....
Code:
chris@dellap:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0582:001a Roland Corp.
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 003: ID 04fa:2490 Dallas Semiconductor DS1490F 2-in-1 Fob, 1-Wire adapter
Bus 003 Device 002: ID 046d:c030 Logitech, Inc. iFeel Mouse
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
chris@dellap:~$




« Last Edit: January 03, 2011, 01:09:02 PM by wyleu » Logged
Talisker
Newbie
*
Offline Offline

Posts: 16


« Reply #13 on: January 03, 2011, 05:35:24 PM »

Thanks Klaus (and everyone else who has kindly contributed),

I think even I could follow your detailed instructions!

I too would need the 32 bit version (I think as I have an Eee PC 900) so thanks for pointing that out.  Fingers crossed some kind person will put the 32 bit version together...................

Logged
wyleu
Guest
« Reply #14 on: January 03, 2011, 07:11:43 PM »

For checking whether or not you are running 64 bit or 32 bit
Code:
chris@dellap:~$ uname -m
i686
chris@dellap:~$

Or for something more for the python fans.
You type the bits in bold

chris@dellap:~$ python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.architecture()
('32bit', 'ELF')
>>>


Control D will quit you out of the python interactive prompt ( which is what typing python put you in )




So if you add (on an Ubuntu maverick machine):
deb http://wookware.org/software/repo/dists/maverick main
deb-src http://wookware.org/software/repo/dists/maverick main


Shouldn't that something like :-

deb http://wookware.org/software/repo maverick main
deb-src http://wookware.org/software/repo maverick main

« Last Edit: January 03, 2011, 07:32:50 PM by wyleu » Logged
Pages: [1] 2 3 4   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!