I’ll test tonight.

 

I use your setup extensively. Should work.

 

Paul

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daryl
Sent: Wednesday, December 28, 2005 4:51 PM
To: [email protected]
Subject: [Owfs-developers] DS18B20 returns "Invalid Argument" when Reading Temperature

 

Hello,

 

I’ve set up a small test network using owfs and am finding it quite useful. I plan on integrating with the diy-zoning software for furnace control of a church building. I’ve tried a few devices and they are functioning quite well. However I am having trouble with the DS18B20.

 

I am able to read and control a DS2406 and a DS2502 using a serial (DS9097U) adapter. My trouble is only with the DS18B20. I’ve tried two different computers and two different sensors with the same results. They work with digitemp but not with owfs. Reading the device properties works fine, but asking for the temperature returns an error as shown here:

 

[EMAIL PROTECTED] 28.053FAA000000]# cat id

[EMAIL PROTECTED] 28.053FAA000000]# cat type

[EMAIL PROTECTED] 28.053FAA000000]#

[EMAIL PROTECTED] 28.053FAA000000]# cat temperature

cat: temperature: Invalid argument

 

After the error is returned all devices disappear from the bus until owfs is restarted.

 

My setup is like this:

  • tested under FC1 (kernel 2.4.22) and FC2 (kernel 2.6.10).
  • using the latest cvs version of owfs together with fuse-2.4.2 .
  • tested with owhttpd and owfs file system and both get a similar error
  • parasitically powered bus running off of a DS9097U
  • sensor: DS18B20 in TO-92 package with two leads connected to the bus
  • short cables (<20 feet)
  • owfs started with: owfs -C --error_level 3 --foreground -d /dev/ttyS0 /mnt/1wire

 

I’d appreciate any pointers you can provide on debugging this problem. Recommendations on stable code versions, etc. would be helpful. For logs see below.

Thanks,

Daryl

 

 

Hardware functioning correctly with digitemp:

 

[EMAIL PROTECTED] root]# digitemp_DS9097U -t 0 -n 3

DigiTemp v3.3.2 Copyright 1996-2004 by Brian C. Lane

GNU Public License v2.0 - http://www.brianlane.com

Dec 28 13:40:05 Sensor 0 C: 12.94 F: 55.29

Dec 28 13:40:06 Sensor 0 C: 12.94 F: 55.29

Dec 28 13:40:07 Sensor 0 C: 12.94 F: 55.29

 

This is the debug log when reading through the owfs file system:

 

<bus operating normally, reading other devices, looking at device id>

 

INFO: GETDIR path=/28.053FAA000000

INFO: PARSENAME path=[/28.053FAA000000]

INFO: DIRECTORY path=/28.053FAA000000

INFO: FSTAT path=/28.053FAA000000/id

INFO: PARSENAME path=[/28.053FAA000000/id]

INFO: ATTRIBUTES path=/28.053FAA000000/id

INFO: OPEN path=/28.053FAA000000/id

INFO: READ path=/28.053FAA000000/id size=4096 offset=0

INFO: PARSENAME path=[/28.053FAA000000/id]

INFO: FS_parse_read: format=5 s=4096 offset=0

INFO: RELEASE path=/28.053FAA000000/id

 

<read temperature here with cat temperature>

 

INFO: FSTAT path=/28.053FAA000000/temperature

INFO: PARSENAME path=[/28.053FAA000000/temperature]

INFO: ATTRIBUTES path=/28.053FAA000000/temperature

INFO: OPEN path=/28.053FAA000000/temperature

INFO: READ path=/28.053FAA000000/temperature size=4096 offset=0

INFO: PARSENAME path=[/28.053FAA000000/temperature]

INFO: FS_parse_read: format=10 s=4096 offset=0

INFO: READ path=/28.053FAA000000/temperature size=4096 offset=0

INFO: PARSENAME path=[/28.053FAA000000/temperature]

INFO: FS_parse_read: format=10 s=4096 offset=0

INFO: PARSENAME path=[]

INFO: DS2480 reset error

INFO: Failed to reconnect DS2480 adapter!

INFO: BUS_selection_error: reconnect error = -5

INFO: RELEASE path=/28.053FAA000000/temperature

 

 

This is what I get from reading the owhttpd web page for this device:

28.053FAA000000



uncached version

up

directory

address

28053FAA000000AC

crc8

AC

die

C2

family

28

fasttemp

Error: Invalid argument

id

053FAA000000

power

NO

present

NO

temperature

Error: Invalid argument

temphigh

Error: Invalid argument

templow

Error: Invalid argument

trim

Error: Invalid argument

trimblanket

Error: Invalid argument

trimvalid

Error: Invalid argument

type

DS18B20

 

 

Reply via email to