In short, the first 24 bytes are a header that include information like error
status, message type, version, data length, data format (temperature scale, etc)

Try OWTAP to inspect.

There is an extensive writeup in the web site.
http://www.owfs.org/index.php?page=owtap

It looks like the second message is a PING message, payload = -1

Paul Alfille


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Pedro
Côrte-Real
Sent: Wednesday, August 22, 2007 7:32 PM
To: [email protected]
Subject: Re: [Owfs-developers] Strange read from owserver


On 8/12/07, Pedro Côrte-Real <[EMAIL PROTECTED]> wrote:
> I'm not sure. owread outputs the right thing but so does my ruby code
> if I do a puts to a terminal since printf ignores those characters.
> I'll have to strace owread.

I've straced owread and it's reading 24 extra bytes in the uncached case:

writev(3, [{"\0\0\0\0\0\0\0+\0\0\0\2\0\0\1\2\0\0\37\240\0\0\0\0", 24},
{"/uncached/12.CC8834000000/TAI8570/pressure\0", 43}, {NULL, 0},
{NULL, 0}, {NULL, 0}], 5) = 67
select(4, [3], NULL, NULL, {2, 0})      = 1 (in [3], left {0, 440000})
read(3, "\0\0\0\0\377\377\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 24) = 24
select(4, [3], NULL, NULL, {2, 0})      = 1 (in [3], left {1, 764000})
read(3, "\0\0\0\0\0\0\0\f\0\0\0\f\0\0\1\2\0\0\0\f\0\0\0\0", 24) = 24
select(4, [3], NULL, NULL, {2, 0})      = 1 (in [3], left {2, 0})
read(3, "     996.871", 12)             = 12

than in the cached case:

writev(3, [{"\0\0\0\0\0\0\0\"\0\0\0\2\0\0\1\2\0\0\37\240\0\0\0\0",
24}, {"/12.CC8834000000/TAI8570/pressure\0", 34}, {NULL, 0}, {NULL,
0}, {NULL, 0}], 5) = 58
select(4, [3], NULL, NULL, {2, 0})      = 1 (in [3], left {2, 0})
read(3, "\0\0\0\0\0\0\0\f\0\0\0\f\0\0\1\2\0\0\0\f\0\0\0\0", 24) = 24
select(4, [3], NULL, NULL, {2, 0})      = 1 (in [3], left {2, 0})
read(3, "     996.951", 12)             = 12

What are those first 24 bytes and why do they mean the client should
read another 24?

Thanks,

Pedro.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers


The information transmitted in this electronic communication is intended only 
for the person or entity to whom it is addressed and may contain confidential 
and/or privileged material. Any review, retransmission, dissemination or other 
use of or taking of any action in reliance upon this information by persons or 
entities other than the intended recipient is prohibited. If you received this 
information in error, please contact the Compliance HelpLine at 800-856-1983 
and properly dispose of this information.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to