Vasco | 17 Dec 18:06 2014
Picon

DS2408

Hi , 

I report a problem to verify if someone has had the same problem so 
could help me. 

I have 9 1Wire I/O expander chips (DS2408) all connected in chain mode , 
with a  coaxial cable . The whole length of the bus (coaxial cable)  is 
40 meters . 

The expander chips are each together a circuit which has its own 
separate power (not from 1Wire bus)  with a 5 Volt regulator. Each 
Expander (DS2408) receives power from regulator, too; I have verified 
that even without the separate power  all the chips In the chain are 
seen from the bus master ( IButtonLink device). 

I am developing a custom code for controlling the system , but at first 
I used ONeWireViewer to make first tests. 

Using OneWireViewer I have sometimes a strange behavior : some chips 
seemed to be seen from the master but the master cannot act on their 
output , i.e. the outputs does not respond to master commands. 

This behavior is random , sometimes all chips behave correctly and 
sometimes one or to chips are their outputs stucked to a fixed level , 
independent of master commands. 

I thought it depends on lack of "magic sequence" that can be sent to 
chips to exit from test mode, but if the chip is in test mode only P0 
output does not respond; in my system when a chip does not respond, it 
has the same behavior on all ports , not only P0. 
(Continue reading)

joep | 15 Dec 22:56 2014

Building OWFS on Archlinux

Hi All,
             I'm trying to build OWFS on a recent version of Archlinux 
(3.12.34-1-ARCH #1 PREEMPT) running on a RaspberryPi but am having 
various difficulties (I've been running owfs on Raspbian for close to 2 
years now without any problems). There is an OWFS package in Arch but 
it's failing to run (using --debug and fake devices does not help). I've 
already identified that it needs additional libraries installed (eg 
libusb-compat and a host of build environment packages). I also got 
around (I think) around the python version issues (version 3 vs version 
4) by using the configure script call specified in Arch's PKGBUILD 
package file.

         The OWFS configure script also seems to require version 1.13 
(am__api_version='1.13') of some of the build tools. Arch has other 
versions of these tools (a lot are at version 1.14). I've changed the 
configure script to 1.14 but still am having issues. The last build 
attempt gave ...

[pi_1 <at> RasPi_1 owfs-2.9p7]$ sudo make install
[sudo] password for pi_1:
  cd . && /bin/sh 
/home/pi_1/MyFiles/owfs/owfs-2.9p7/src/scripts/install/missing 
automake-1.14 --foreign
configure.ac:52: warning: AM_INIT_AUTOMAKE: two- and three-arguments 
forms are deprecated.  For more info, see:
configure.ac:52: 
http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation
configure.ac:76: error: required file 'src/scripts/install/compile' not 
found
configure.ac:76:   'automake --add-missing' can install 'compile'
(Continue reading)

joep | 12 Dec 12:03 2014

Cannot recognize a DS9490R USB bus master in Archlinux

Hi All,
             I am running OWFS under both Debian (Wheezy) and Raspian 
(kernel 3.12.28+ #709 PREEMPT) using a DS9490R USB bus master with no 
problems and have been doing so for at least 2 years. I now attempted to 
do the same using Archlinux running on another RaspberryPi. The kernel 
being used is 3.12.34-1-ARCH #1 PREEMPT. The moment I plug in a DS9490R, 
and before I launch owfs, I get the following error:
     "Failed to read 1-wire data from 0x81: err=-110" repeatedly displaying.

             It is as if the kernel driver for the device is not 
managing the bus master successfully.

     The output of lsmod includes:
         .....
         "ds2490                  6924  0"
         .....

     The output of lsusb includes:
         .....
         "Bus 001 Device 008: ID 04fa:2490 Dallas Semiconductor DS1490F 
2-in-1 Fob, 1-Wire adapter"
         .....
     So the Dallas device is being recognized to some extent.

     The above happens with two different DS9490R (both of which work 
happily with Wheezy and Raspian)

     Any ideas?

--

-- 
(Continue reading)

Gregg Levine | 9 Dec 05:00 2014
Picon

Problems with building 2.9p4 none while building the 2.9p3 release

Hello!
It seems building it on the Pi requires that archival releases of the
GNU tools be installed. There were complaints during the running of
the configure script.

However those problems were not present during the building of 2.9p3.

As to why that happened I'm at a loss to explain.

Of course to build in the features and functions for TCL and PHP and
even Python do require the dev portions of these languages. That's an
interesting part of Debian and its relatives that I wasn't completely
aware of.

(That is of course as everyone knows I normally build on Slackware
where everything is normally present.)
-----
Gregg C Levine gregg.drwho8 <at> gmail.com
"This signature fought the Time Wars, time and again."

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
Csillag Kristof | 8 Dec 18:10 2014
Picon

Q about owfs / DS1921

Dear All,

I am a newbie for owfs. (And 1-wire in general.) I am looking at the owfs man page for DS1921. I understand everything written on the man page, but (as far as I can tell) the description of these fields is missing:
|-- mission | |-- date | |-- delay | |-- easystart | |-- frequency | |-- rollover | |-- running | |-- samples | |-- sampling | `-- udate
A few of these are mentioned in other sections, but most of them is not explained, and some is not even mentioned.

I understand:
    mission/{samples, rollower}
 
I don't have documentation for:
    mission/date (I am guessing that's where I start the desired start date - or is this where I read it out?)
    mission/delay (Maybe I have to set the delay here - does that mean that mission/date is read only?)
    mission/easystart - no idea
    mission/frequency (I am guessing this is where I set the sample rate in minuter)
    mission/running (I am guessing this is just a flag to tell whether we are currently on a mission?)
    mission/sampling (No idea.)
    mission/udate - no idea

Can anyone help me with understanding those?

Thank you for your help:

   Kristof Csillag

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Gregg Levine | 8 Dec 06:46 2014
Picon

Raspberry Pi devices and OWFS and the usual OS

Hello!
Usual new project time around here. What is the recent release that's
made its way to the repositories for the Raspberry Pi?

Last time I tried to get things to work, I had some issues with the
Debian nature of how OWFS attached itself to the OS.
-----
Gregg C Levine gregg.drwho8 <at> gmail.com
"This signature fought the Time Wars, time and again."

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
Daniel MacKay | 2 Dec 02:32 2014
Picon

24v relay

Hey all!

I'd like to start using 1-wire to control the heating / hvac system in my home; all the controls run off 24v relays.

Has anyone else used hobby-boards' 8-relay board, this one?  Has it worked out well?

http://www.hobby-boards.com/store/products.php?product=8-Channel-I%7B47%7DO-(8-Relay-Version)

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
Андрей Штых | 1 Dec 07:16 2014
Picon

Raspberry pi + owfs + DS2408S + LCD don't work!

Hi, all.

I have the following problem:
I connected to my raspberry pi to the LCD display. I used the bus master 1-wire DS2482-100. Next bus connected to it DS2408S and LSD display.
Compiled from source owfs 2.9p8, does not work at all. Any attempt to write in LCD_H leads to an Write error, invalid argument. The individual pins DS2408A managed without any problems!
Display earned only ver 2.8p15-1 from source, or from RPM.

But wich problem to.

---
Andrey.
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Sven Giermann | 28 Nov 23:18 2014
Picon

Fwd: Development status of owexternal


---------- Forwarded message ----------

And the show goes on...

I found the reason for familiy/type properties not being able to be read. Not for the crashes, but making after applying the attached patch to 'ow_read_external.c', it no longer crashed for me.

I found another mistake in the sources: the write script is never being used, instead the read script is being called - find the patch in 'ow_write_external.c'.

Further observations: the last property parameter (called "other") seems never to be used. For everyone to test in real life, I created an example config (just append to your owfs.conf) and a bash script to deliver some memory and disk statistics.
It is working for me with debian version "2.8p15", because of the trainling comma in the configuration. Writing is not implemented yet.

BUT be careful - owserver often crashes without any (obvious) reason. It worked stable before adding the external script, so I will probably remove it again.


So what's next?
How could I debug those memory access errors that lead to the crash?
I tried DDD without success so far :(

Sven


2014-11-28 20:02 GMT+01:00 Sven Giermann <sven.giermann <at> gmail.com>:
Hi Paul,

thanks for these hints. I have to add, that is is sufficient to have a line 'external' in the configuration file, which removes the need for an additional argument (easier with preconfigured start scripts).

I figured out some errors in handling external sensors:

1. parsing the parameters does not trim new-line and tab characters, resulting in the last parameter ending with a new-line and probably a quote, when quoted (the starting quote is being removed) - find my patch attached.
WORKAROUND for existing binary installations: just add another comma at the end of your sensor and script definitions.

2. owserver crashes when configuring an external sensor with a well-formed 1-Wire ID (i.e. "17.FEEDDEADBEAF") while the same ID with non-hex characters is working ("17.FILLDEADBEEF"). Seems as if the external sensors are only handled by aliasing?
WORKAROUND: Do not use valid IDs for external sensors!

3. owserver crashes when reading the type/family properties of external sensors.
WORKAROUND: Do not read these, do not open path to external sensors with owhttpd.
But apart from that, I have multiple crashes for unknown reasons. I always get an "memory access error" :-(


I will continue testing on another system, since owfs (without external sensors) is running stable for some days there.
Until then I don't have a clue where to look for those crashes on reading family and type properties on external sensors...

Sven

2014-11-27 12:45 GMT+01:00 Paul Alfille <paul.alfille <at> gmail.com>:
Svan,

I'm busy with guests today, but a quick perusal of the code suggests:

1. add --external to the command line arguments of owserver
2. Add the SENSOR: and PROPERTY lines to the configuration file

See if it works at all.

Paul

On Thu, Nov 27, 2014 at 5:21 AM, Sven Giermann <sven.giermann <at> gmail.com> wrote:
Paul, thanks for the quick reply!


2014-11-27 1:08 GMT+01:00 Paul Alfille <paul.alfille <at> gmail.com>:
owexternal is actually already built into owserver. It isn't well tested since I had no actual use case, so your help will be very appreciated.

This is the documentation:

I read this, but it's exactly what I don't understand... I don't have any 'owexternal' binary, maybe I have to compile it from source with "--enable-owexternal"?
But even after this - where do I put those configuration options mentioned in the "example syntax"?
Are those 2 separate text files, one for sensors, one for families?
Or do I simply include those lines in owfs.conf, maybe without the need of an additional owexternal binary?

And what is the fourth sensor field (/dev/ttyUSB0), the actual parameter to the read/write scripts?

To give a general use case, I could simply write a bash script to display the current memory usage, disk free space and so on.
If one has a LED or beeper in its system, there would also be a use case for write operations...




On Wed, Nov 26, 2014 at 3:25 PM, Sven Giermann <sven.giermann <at> gmail.com> wrote:
Hi,

I just thought about writing my own "owserver" to support a simple relay card with a serial connection. I already have a binary to read and set relay states but need a way to access it from other software.
Now the idea was to clone owserver by providing the same interface to allow use of every owfs capable client. While starting to read the code I stunbled across "owexternal" and found some threads in this list.

But nothing I could really understand to try it on my own.
So I wanted to ask: what is the current development status of "owexternal"?

Even if it's still unstable/untested I would be interested in contributing to it - but I need a starting point. What needs to be configured and where?
What does the (Perl?) script need to support?

Any ideas where to start?

Thx, Sven.

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers



------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers



------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers





--- owfs-2.9p8/module/owlib/src/c/ow_parse_external.c	Mo  1. Sep 00:33:23 2014
+++ owfs-2.9p8/module/owlib/src/c/ow_parse_external.c	Fr 28. Nov 18:14:16 2014
 <at>  <at>  -40,7 +40,7  <at>  <at> 
 void * family_tree = NULL ;
 void * sensor_tree = NULL ;
 
-// ForAddSensor and AddProperty
+// For AddSensor and AddProperty
 // uses the various tools to get a string into s_name (name is given)
 // start_pointer (a char *) is used and updated.
 #define GetQuotedString( name ) do {                               \
 <at>  <at>  -53,6 +53,10  <at>  <at> 
 	s_##name = unquote_parse( trim_parse( s_##name ) ) ;          \
 } while (0) ;
 
+// For trim_parse
+#define IsNonSpaceChar( c ) \
+	( c != ' ' && c != '\n' && c != '\r' && c != '\t' )
+
 // Look through text_string, ignore backslash and match quoting varibles
 // allocates a new string with the token
 static char * string_parse( char * text_string, char delim, char ** last_char )
 <at>  <at>  -134,7 +138,7  <at>  <at> 
 	char * end_position ;
 	char * return_string ;
 	for ( start_position = raw_string ; start_position[0] ; ++ start_position ) {
-		if ( start_position[0] != ' ' ) {
+		if ( IsNonSpaceChar( start_position[0] ) ) {
 			break ;
 		}
 	}
 <at>  <at>  -144,7 +148,7  <at>  <at> 
 	for ( end_position = return_string + strlen( return_string ) ; end_position >= return_string ; --
end_position ) {
 		if ( end_position[0] == '\0' ) {
 			continue ;
-		} else if ( end_position[0] != ' ' ) {
+		} else if ( IsNonSpaceChar( end_position[0] ) ) {
 			break ;
 		} else {
 			end_position[0] = '\0' ;
--- owfs-2.9p8/module/owlib/src/c/ow_read_external.c	Mo  1. Sep 04:28:05 2014
+++ owfs-2.9p8/module/owlib/src/c/ow_read_external.c	Fr 28. Nov 21:00:57 2014
 <at>  <at>  -67,7 +67,7  <at>  <at> 
 				case et_none:
 					return 0 ;
 				case et_internal:
-					return -ENOTSUP ;
+					return OWQ_format_output_offset_and_size_z( property_n->data, owq ) ;
 				case et_script:
 					return OW_read_external_script( sense_n, property_n, owq ) ;
 				default:
--- owfs-2.9p8/module/owlib/src/c/ow_write_external.c	Mo  1. Sep 04:25:50 2014
+++ owfs-2.9p8/module/owlib/src/c/ow_write_external.c	Fr 28. Nov 22:22:24 2014
 <at>  <at>  -92,7 +92,7  <at>  <at> 
 		// not a text sparse name
 		snp_return =
 		snprintf( cmd, PATH_MAX+1, "%s %s %s %d %s %d %d %s %s",
-			property_n->read, // command
+			property_n->write, // command
 			sensor_n->name, // sensor name
 			property_n->property, // property,
 			pn->extension, // extension
 <at>  <at>  -105,7 +105,7  <at>  <at> 
 	} else {
 		snp_return =
 		snprintf( cmd, PATH_MAX+1, "%s %s %s %s %s %d %d %s %s",
-			property_n->read, // command
+			property_n->write, // command
 			sensor_n->name, // sensor name
 			property_n->property, // property,
 			pn->sparse_name, // extension
Attachment (owexternal-test.conf): application/octet-stream, 1568 bytes
Attachment (owexternal.sh): application/x-sh, 3460 bytes
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Sven Giermann | 28 Nov 23:17 2014
Picon

Fwd: Development status of owexternal


---------- Forwarded message ----------


Hi Paul,

thanks for these hints. I have to add, that is is sufficient to have a line 'external' in the configuration file, which removes the need for an additional argument (easier with preconfigured start scripts).

I figured out some errors in handling external sensors:

1. parsing the parameters does not trim new-line and tab characters, resulting in the last parameter ending with a new-line and probably a quote, when quoted (the starting quote is being removed) - find my patch attached.
WORKAROUND for existing binary installations: just add another comma at the end of your sensor and script definitions.

2. owserver crashes when configuring an external sensor with a well-formed 1-Wire ID (i.e. "17.FEEDDEADBEAF") while the same ID with non-hex characters is working ("17.FILLDEADBEEF"). Seems as if the external sensors are only handled by aliasing?
WORKAROUND: Do not use valid IDs for external sensors!

3. owserver crashes when reading the type/family properties of external sensors.
WORKAROUND: Do not read these, do not open path to external sensors with owhttpd.
But apart from that, I have multiple crashes for unknown reasons. I always get an "memory access error" :-(


I will continue testing on another system, since owfs (without external sensors) is running stable for some days there.
Until then I don't have a clue where to look for those crashes on reading family and type properties on external sensors...

Sven

2014-11-27 12:45 GMT+01:00 Paul Alfille <paul.alfille <at> gmail.com>:
Svan,

I'm busy with guests today, but a quick perusal of the code suggests:

1. add --external to the command line arguments of owserver
2. Add the SENSOR: and PROPERTY lines to the configuration file

See if it works at all.

Paul

On Thu, Nov 27, 2014 at 5:21 AM, Sven Giermann <sven.giermann <at> gmail.com> wrote:
Paul, thanks for the quick reply!


2014-11-27 1:08 GMT+01:00 Paul Alfille <paul.alfille <at> gmail.com>:
owexternal is actually already built into owserver. It isn't well tested since I had no actual use case, so your help will be very appreciated.

This is the documentation:

I read this, but it's exactly what I don't understand... I don't have any 'owexternal' binary, maybe I have to compile it from source with "--enable-owexternal"?
But even after this - where do I put those configuration options mentioned in the "example syntax"?
Are those 2 separate text files, one for sensors, one for families?
Or do I simply include those lines in owfs.conf, maybe without the need of an additional owexternal binary?

And what is the fourth sensor field (/dev/ttyUSB0), the actual parameter to the read/write scripts?

To give a general use case, I could simply write a bash script to display the current memory usage, disk free space and so on.
If one has a LED or beeper in its system, there would also be a use case for write operations...




On Wed, Nov 26, 2014 at 3:25 PM, Sven Giermann <sven.giermann <at> gmail.com> wrote:
Hi,

I just thought about writing my own "owserver" to support a simple relay card with a serial connection. I already have a binary to read and set relay states but need a way to access it from other software.
Now the idea was to clone owserver by providing the same interface to allow use of every owfs capable client. While starting to read the code I stunbled across "owexternal" and found some threads in this list.

But nothing I could really understand to try it on my own.
So I wanted to ask: what is the current development status of "owexternal"?

Even if it's still unstable/untested I would be interested in contributing to it - but I need a starting point. What needs to be configured and where?
What does the (Perl?) script need to support?

Any ideas where to start?

Thx, Sven.

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers



------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers



------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers




--- owfs-2.9p8/module/owlib/src/c/ow_parse_external.c	Mo  1. Sep 00:33:23 2014
+++ owfs-2.9p8/module/owlib/src/c/ow_parse_external.c	Fr 28. Nov 18:14:16 2014
 <at>  <at>  -40,7 +40,7  <at>  <at> 
 void * family_tree = NULL ;
 void * sensor_tree = NULL ;
 
-// ForAddSensor and AddProperty
+// For AddSensor and AddProperty
 // uses the various tools to get a string into s_name (name is given)
 // start_pointer (a char *) is used and updated.
 #define GetQuotedString( name ) do {                               \
 <at>  <at>  -53,6 +53,10  <at>  <at> 
 	s_##name = unquote_parse( trim_parse( s_##name ) ) ;          \
 } while (0) ;
 
+// For trim_parse
+#define IsNonSpaceChar( c ) \
+	( c != ' ' && c != '\n' && c != '\r' && c != '\t' )
+
 // Look through text_string, ignore backslash and match quoting varibles
 // allocates a new string with the token
 static char * string_parse( char * text_string, char delim, char ** last_char )
 <at>  <at>  -134,7 +138,7  <at>  <at> 
 	char * end_position ;
 	char * return_string ;
 	for ( start_position = raw_string ; start_position[0] ; ++ start_position ) {
-		if ( start_position[0] != ' ' ) {
+		if ( IsNonSpaceChar( start_position[0] ) ) {
 			break ;
 		}
 	}
 <at>  <at>  -144,7 +148,7  <at>  <at> 
 	for ( end_position = return_string + strlen( return_string ) ; end_position >= return_string ; --
end_position ) {
 		if ( end_position[0] == '\0' ) {
 			continue ;
-		} else if ( end_position[0] != ' ' ) {
+		} else if ( IsNonSpaceChar( end_position[0] ) ) {
 			break ;
 		} else {
 			end_position[0] = '\0' ;
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Jerry Scharf | 27 Nov 21:10 2014

bus electrical questions

Hi,

I'm in the thick of designing my test rig. It is now over 350 points 
mixed between thermocouples and 18b20s. I decided on 3 buses with 
ds2482-100s to handle this. These and some other things (I2C drivers and 
power) I need will sit on a beaglebone cape. Everything will be running 
at 3.3V

I am designing a little board to handle the 8 thermocouples using 
max31850s and will also have 8 rj45s to handle 18b20s soldered onto the 
end of ethernet cable. There is power and ground and a data in and out 
to keep the bus topology. Because I don't know how many will be 18b20s 
connected, I am putting a dip switch that will allow the bus to bypass 
open rj45s.

This got me thinking about how long a stub I can have running from the 
bus to the actual device. I know an inch on a board trace is fine, but 
how long a stub can I get away with and still have the bus being happy? 
I am wondering if the rj45 cable is 1-2 feet long, could I just leave 
the switch shorted and plug the cable in?

I'm not planning to run it this way, but I was thinking in the case 
where a configuration changes and someone forgets to open the switch 
when they plug the cable in.

While I'm at it, do people put a pull up resistor on the end of their 
buses? I haven't done so in the past but am wondering with a setup that 
really can't fail. If so, what value should it be? I'd just solder a 
resistor on the end of a stub of ethernet cable then shrink wrap it.

thanks,
jerry

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk

Gmane