I have found and corrected the problem in node-owfs, but whilst
analysing it I noticed that sometimes I get 20 or more per second
dummy headers whilst waiting for the data from owserver.  Normally it
is around 1 per second. Any suggestions as to why this might be
happening? It does not seem to cause any ill effects and if I did not
have the debug enabled I would never know it was happening.

Colin

On 5 March 2017 at 21:41, Stefano Miccoli <mo...@icloud.com> wrote:
> Sorry for the confusione between message payload and message size… I forgot
> about this difference:
> https://github.com/owfs/owfs/blob/d0c3abac8f16d38c0fe5fb9e0c62c57f2e6696fb/module/owlib/src/include/ow_message.h#L45-L63
> (but in most cases payload == size, or payload == size+1 to accomodate for a
> terminating null byte)
>
> So I confirm: headers with payload == -1 are to be discarded and the client
> should continue waiting for the answer.
>
> S.
>
> On 5 Mar 2017, at 21:08, Colin Law <clan...@gmail.com> wrote:
>
> The extra header contains version: 0, payload: -1, ret: 0, flags: 0,
> size: 0, offset: 0
> So the element described as size of data element is 0 though that
> described as length of payload data is -1.
>
> Colin
>
> On 5 March 2017 at 19:34, Colin Law <clan...@gmail.com> wrote:
>
> Can I just check there I not a confusion here, I am talking about comms
> between client and owserver, not between server and sensor.
>
> On 5 Mar 2017 6:43 p.m., "Stefano Miccoli" <mo...@icloud.com> wrote:
>
>
> What you describe (0-size payload message followed by another valid
> message) cannot happen.
> May be what you really mean is a -1 size payload message? This is a “ping”
> which owserver sends every 1 second or so when it is still gathering data or
> under heavy payload.
>
> This is an aspect of the owserver protocol which easily gets unnoticed by
> implementers: please see https://github.com/miccoli/pyownet/pull/1 where
> Johan Ström corrected a similar bug in my pyownet.
>
> S.
>
> On 5 Mar 2017, at 17:51, Colin Law <clan...@gmail.com> wrote:
>
> I am trying to debug a problem on the node.js owserver client
> node-owfs and am looking for some clarification of the owserver
> protocol if possible please.
>
> Referring to [1] in response to a 1-wire read I expect to see a header
> with a payload of the size indicated in the header. Very often what I
> actually see is a header specifying a payload size of 0 followed by
> another header with the expected payload size and valid data.  Is that
> normal or is there something strange going on?
>
> This is owserver 3.1p4-1 from the raspbian jessie testing repository
> on a pi zero.
>
> [1] http://owfs.org/index.php?page=owserver-protocol
>
> Colin
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to