Page 1 of 1

OWFS not mounting with 1-wire expansion board

Posted: Wed Nov 12, 2014 5:44 pm
by notholmen
Edit: Read from this post (below) http://www.raspberrypi.org/forums/viewt ... 62#p660362

Hello everyone!

I'm currently using one of my PI's as a weather station.
( http://weather.lagus.net )
As some can see I bought the very first B model that was released and have been running that particular PI since then just exchanging the SD card once maybe (as a precaution) until this autumn when we were hit badly by a thunderstorm that hit the little pi and broke it. I figured that it should be easy to again just dd copy to hard drive and put back on a microSD card and restart the brand new B+.

Mostly everything worked very well!
Wview is working with the new hardware but the 1-wire expansion board does not. and here comes my problem.
This is the expansion board I'm using: https://www.m.nu/1wire-expansion-module ... anguage=en
I have used this OWFS guide: http://wiki.m.nu/index.php/OWFS_with_i2 ... h_version)
Recompiled and installed but I can't get readings from my 1-wire sensors.

Have anyone had a similar story and a solution?
What can I do to get it working?

Re: From B rev1 model to B+ 1-wire expansion board

Posted: Wed Nov 12, 2014 6:11 pm
by rpdom
There have been some changes to the GPIO between the Rev 1.0 Pi and the later versions. The I2C pins were affected. Have you changed the I2C bus number from 0 to 1 in your software?

Re: From B rev1 model to B+ 1-wire expansion board

Posted: Thu Nov 13, 2014 8:45 am
by notholmen
Yes, Thanks!
That is obviously a preferred solution.
Unfortunately I can't find the settings where to change this reading pin in the OWFS software and can't remember I ever set that initially. Thus leaving me without a clue on how to mend my little problem. Is the solution to go in to the sourcecode of OWFS? (I have never edited source code before...

Re: From B rev1 model to B+ 1-wire expansion board

Posted: Thu Nov 13, 2014 12:28 pm
by rpdom
Looking at the code it seems that it should auto detect whether to use i2c-0 or i2c-1. Otherwise maybe there is a config file or a command line option that will specify it without having to rebuild from source.

Re: From B rev1 model to B+ 1-wire expansion board

Posted: Thu Nov 13, 2014 1:55 pm
by notholmen
Hello rpdom,
Thank you for looking into the sourcecode for me!

Even though I have fiddled around with Raspberries and Linux systems for years I have never coded/ looked in to source code.

To me it is strange that the reinstallation don't seem to update to a working installation especially if it automatically detects it.

Re: From B rev1 model to B+ 1-wire expansion board

Posted: Sat Dec 27, 2014 2:28 pm
by notholmen
Hello Everyone, Happy holidays!

After some time testing and re-testing building OWFS and even testing OWFS on a clean image still not getting int working.
I have concluded that there must be some problem with something else.
I'm beginning to think that the add-on board has failed?
I'm greatful to anyone who can shed some light on this matter!

Code: Select all

 [b]sudo /opt/owfs/bin/owfs --i2c=ALL:ALL --allow_other --debug /mnt/1wire/[/b]
DEBUG MODE
libow version:
        2.9p8
CONNECT: owfs.c:(100) fuse mount point: /mnt/1wire/
  DEBUG: ow_tree.c:(329) pthread_mutex_lock B6F179E4 begin
  DEBUG: ow_tree.c:(329) pthread_mutex_lock B6F179E4 done
  DEBUG: ow_tree.c:(333) pthread_mutex_unlock B6F179E4 begin
  DEBUG: ow_tree.c:(333) pthread_mutex_unlock B6F179E4 done
CONNECT: ow_avahi_link.c:(68) No Avahi support. Library libavahi-client couldn't be loaded
CONNECT: ow_dnssd.c:(82) Zeroconf/Bonjour is disabled since dnssd library isn't found
   CALL: ow_parsename.c:(102) path=[]
  DEBUG: ow_parsename.c:(249) pthread_mutex_lock B6F17924 begin
  DEBUG: ow_parsename.c:(249) pthread_mutex_lock B6F17924 done
  DEBUG: ow_parsename.c:(251) pthread_mutex_unlock B6F17924 begin
  DEBUG: ow_parsename.c:(251) pthread_mutex_unlock B6F17924 done
  DEBUG: owlib.c:(80) Globals temp limits 0C 100C (for simulated adapters)
CONNECT: ow_ds2482.c:(382) [Is a directory] Could not open i2c device /dev/.
CONNECT: ow_ds2482.c:(382) [Is a directory] Could not open i2c device /dev/..
CONNECT: ow_ds2482.c:(396) Found an i2c device at /dev/i2c-1 address 18
CONNECT: ow_ds2482.c:(422) i2c device at /dev/i2c-1 address 18 cannot be reset. Not a DS2482.
CONNECT: ow_ds2482.c:(396) Found an i2c device at /dev/i2c-1 address 19
CONNECT: ow_ds2482.c:(422) i2c device at /dev/i2c-1 address 19 cannot be reset. Not a DS2482.
CONNECT: ow_ds2482.c:(396) Found an i2c device at /dev/i2c-1 address 1A
CONNECT: ow_ds2482.c:(422) i2c device at /dev/i2c-1 address 1A cannot be reset. Not a DS2482.
CONNECT: ow_ds2482.c:(393) [Device or resource busy] Cound not set trial i2c address to 1B
CONNECT: ow_ds2482.c:(396) Found an i2c device at /dev/i2c-1 address 1C
CONNECT: ow_ds2482.c:(422) i2c device at /dev/i2c-1 address 1C cannot be reset. Not a DS2482.
CONNECT: ow_ds2482.c:(396) Found an i2c device at /dev/i2c-1 address 1D
CONNECT: ow_ds2482.c:(422) i2c device at /dev/i2c-1 address 1D cannot be reset. Not a DS2482.
CONNECT: ow_ds2482.c:(396) Found an i2c device at /dev/i2c-1 address 1E
CONNECT: ow_ds2482.c:(422) i2c device at /dev/i2c-1 address 1E cannot be reset. Not a DS2482.
CONNECT: ow_ds2482.c:(396) Found an i2c device at /dev/i2c-1 address 1F
CONNECT: ow_ds2482.c:(422) i2c device at /dev/i2c-1 address 1F cannot be reset. Not a DS2482.
  DEBUG: ow_com_close.c:(42) Unimplemented!!!
CONNECT: owlib.c:(148) Cannot detect an i2c DS2482-x00 on ALL:ALL
  DEBUG: ow_connect.c:(241) pthread_mutex_destroy AA20CC begin
  DEBUG: ow_connect.c:(241) pthread_mutex_destroy AA20CC done
  DEBUG: ow_connect.c:(242) pthread_mutex_destroy AA20E4 begin
  DEBUG: ow_connect.c:(242) pthread_mutex_destroy AA20E4 done
  DEBUG: ow_connect.c:(288) pthread_mutex_destroy AA209C begin
  DEBUG: ow_connect.c:(288) pthread_mutex_destroy AA209C done
DEFAULT: owlib.c:(55) No valid 1-wire buses found
  DEBUG: ow_exit.c:(18) Exit code = 1

Code: Select all

[b]sudo i2cdetect -y 1[/b]
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
There is something there... ! :)
Expected end result is that I would have "folders" in /mnt/1wire/
the exact names/path would be cat:
/mnt/1wire/28.6F04DF030000/temperature11 and
/mnt/1wire/28.06E9DE030000/temperature11

Thanks!

Re: OWFS not mounting with 1-wire expansion board

Posted: Tue Dec 30, 2014 2:49 pm
by notholmen
Up...
Please let me know and point me in the right direction if this is not the right part of the forum for this type of question!

Re: OWFS not mounting with 1-wire expansion board

Posted: Tue Dec 30, 2014 7:06 pm
by iinnovations
Google the i2c error on the debug output. It sounds very familiar and I seem to recall running into this myself at some point. That is surely your culprit, as your board is based on the DS2482.

Re: OWFS not mounting with 1-wire expansion board

Posted: Tue Dec 30, 2014 7:13 pm
by iinnovations
Can you post the owfs commands you are using to mount your device? The memory banks are unfuzzing, and this may be a mount configuration issue.

Your i2cdetect does not appear correct. You should see address 18 or 19 pop up as in debug output. UU is reserved for other things.

Re: OWFS not mounting with 1-wire expansion board

Posted: Tue Dec 30, 2014 9:06 pm
by iinnovations
Are you running this multiple times? I think this could be an issue with attempting to mount owfs more than once.

I strongly recommend you run owserver ONCE and then connect to it using owfs and/or owhttpd. I run this on boot:

Code: Select all

subprocess.call(['/opt/owfs/bin/owserver', '-F', '--i2c=/dev/i2c-1:ALL', '-p', '4304'])
subprocess.call(['/opt/owfs/bin/owfs', '-F', '-s', '4304', '/var/1wire/'])
subprocess.call(['/opt/owfs/bin/owhttpd', '-F', '-s', '4304', '-p', '4305'])

Re: OWFS not mounting with 1-wire expansion board

Posted: Sun Jan 04, 2015 1:53 pm
by notholmen
Thanks!
Great hear someone that has been in the same situation.
I have literally spent days in trying to get this to work.
iinnovations wrote:Can you post the owfs commands you are using to mount your device? The memory banks are unfuzzing, and this may be a mount configuration issue.
It should be started with "start1wire.sh initiated in /etc/init.d/
Total contents of the script:

Code: Select all

#!/bin/bash

### BEGIN INIT INFO
# Provides:          start1wire
# Required-Start:    $local_fs $syslog
# Required-Stop:     $local_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start OWFS at boot time
# Description:       Start OWFS at boot time
### END INIT INFO

# Starts OWFS
#/opt/owfs/bin/owfs --i2c=ALL:ALL --allow_other /mnt/1wire
/opt/owfs/bin/owfs --i2c=ALL:ALL --allow_other /mnt/1wire
iinnovations wrote:Are you running this multiple times? I think this could be an issue with attempting to mount owfs more than once.
No, As Far as I know. It's supposed to run at boot time and show the two sensor values when I log in.
read with this command: "cat: /mnt/1wire/28.6F04DF030000/temperature11"

I should have followed this guide:
http://wiki.m.nu/index.php/OWFS_with_i2 ... h_version)

Re: OWFS not mounting with 1-wire expansion board

Posted: Tue Jan 06, 2015 10:15 pm
by fc020397
Notholmen,
I have had the same issue. I am using the same break out board as you do on a B+ raspberry pi.
When I follow installation guides like this one https://www.abelectronics.co.uk/owfs-an ... /info.aspx that uses latest OWFS from http://sourceforge.net/projects/owfs/fi ... t/download then I end up with the same issue. It seems that the owfs does not see my busmaster on I2C.

Code: Select all

sudo i2cdetect -y 1
does only list UU instead of 2B.

I do not know what is broken with the latest raspbian or firmware but I found a setup that works for me.

All started after a rpi-firmware update. All newer firmwares break my owfs installation so I downgraded to a earlier firmware from September 14 followed by a reboot.

Code: Select all

rpi-update de69b134dc6e4066fe70db29816d57895dffd9b9
Btw. Testing has shown that owfs fails either when I use a current firmware or I use the latest owfs package from sourceforge.

I then uninstalled the latest owfs.

Code: Select all

cd /usr/src/owfs2xxx  
sudo make uninstall
Installed owfs via apt-get

Code: Select all

 sudo apt-get install owfs
The /etc/owfs.conf looks like that:

Code: Select all

# Sample configuration file for the OWFS suite for Debian GNU/Linux.
# This is the main OWFS configuration file. You should read the
# owfs.conf(5) manual page in order to understand the options listed
# here.
######################## SOURCES ########################
#
# With this setup, any client (but owserver) uses owserver on the
# local machine...
! server: server = localhost:4304
#
# ...and owserver uses the real hardware, by default fake devices
# This part must be changed on real installation
# server: FAKE = DS18S20,DS2405
#
# USB device: DS9490
#server: usb = all
device = /dev/i2c-1
#
# Serial port: DS9097
#server: device = /dev/ttyS1
#
# owserver tcp address
#server: server = 192.168.10.1:3131
#
# random simulated device
#server: FAKE = DS18S20,DS2405
#
######################### OWFS ##########################
mountpoint = /mnt/1wire
allow_other
####################### OWHTTPD #########################
http: port = 2121
####################### OWFTPD ##########################
ftp: port = 2120
####################### OWSERVER ########################
server: port = localhost:4304
I used the startup script from this page:
http://www.gaggl.com/2013/01/accessing- ... sing-owfs/

The only thing that was missing there was that the file /etc/init.d/owfs must be executable.

Code: Select all

sudo chmod +x owfs
To automatically start owfs I use:

Code: Select all

sudo update-rc.d owfs defaults
I am no a linux pro so bare with me. Its far from perfect but does its job.

Cheers ... Michi

Re: OWFS not mounting with 1-wire expansion board

Posted: Thu Jan 08, 2015 2:34 pm
by roxi
Hello

I have the same problem.
i had already installed the owfs with apt-get.

I went back in firmware version how described above, but the ds2482 isn't listed with i2cdetect.
How looks your i2cdetect output of the working environment?

Best regards
roxi

Re: OWFS not mounting with 1-wire expansion board

Posted: Fri Jan 09, 2015 6:38 am
by fc020397
B+ with I2C 1Wire board from https://www.modmypi.com/raspberry-pi-1- ... ino-module and raspbian/firmware Linux raspberrypi 3.12.28+ #709 PREEMPT Mon Sep 8 15:28:00 BST 2014 armv6l

Code: Select all

pi@raspberrypi ~ $ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- 1b -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Cheers ... Michi

Re: OWFS not mounting with 1-wire expansion board

Posted: Fri Jan 09, 2015 8:17 am
by roxi
Thanks for the quick reply...

It looks like my rpi, but the device on 0x1b seems to be an tas5713. There is no ds2482 recognized...

Code: Select all

root@raspberrypi:/sys/bus/i2c/devices# cat */name
tas5713
wm8804
pcm5122
pcm5122
bcm2708_i2c.1
I don't understand this and thougt that the device was recognized ad 0x19 or 0x18 about 1 year ago...

Re: OWFS not mounting with 1-wire expansion board

Posted: Mon Jan 26, 2015 9:02 pm
by fc020397
Just stumbled over it. Sounds as it could help here.
http://www.raspberrypi.org/forums/viewt ... 28&t=97314
Cheers ... Michi