Barionet TCP Protocol v2

Revision as of 11:38, 12 April 2013 by StefanG (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The Barionet TCP Protocol Version 2 is still quite similar to version one.

It is implemented in the Barionet firmware from Version 2.30 onwards. Configuration/Selection is done via browser in the setup. While the protocol is using the same commands as the previous version, there are some changes:

  • it can be configured if the device sends status updates for relays, digital I/O and digital inputs by default (backward compatible)
  • it can be configured if a "getio" command automatically subscribes (and subsequently, a "statechange" is sent)

Setting of I/O remains unchanged.


With both configuration options set (the recommended case), when a host connects to the Barionet, it defaults to "no active subscriptions", so no statechanges are sent. The host can now "prime" the interface by reading every interesting variable exactly once using the "getio" command. The answer will be returned as a "statechange" message, and subsequent changes of the variable will be reported, no further "getio" for the variable are needed.

If auto-subscription is not configured, the host can poll the variables using "getio" at its descretion, no status updates will be sent automatically (unless they are configured for the main I/O group).

The interface now supports long (signed) values. Digital I/O and analog values are still returned as short (unsigned) integers, however, values for temperature sensors, their ID's etc can be negative, same with the 701..1000 general registers.

When the host disconnects, the interface is reset to "no subscriptions".

"interval" is not any more supported, as a TCP connection is reliable, and it does not make much sense to send the status updates in regular intervals (it is still supported on the UDP interface).


Back to FAQ