Baker ReCO2ver User manual

Rapid Recovery CO2 Incubator
Baker Packet
Communications
Protocol
User’s Guide
This Manual applies to Models: • REC 602, • REC 602 -Plus

July 2021
2
Table of Contents
Table of Contents .............................................................................................................................................................. 1
Introduction ....................................................................................................................................................................... 4
Purpose .............................................................................................................................................................................. 4
Overview ............................................................................................................................................................................ 4
Startup Messages ..................................................................................................................................................... 4
Periodic Messages ................................................................................................................................................... 4
Sporadic Messages .................................................................................................................................................. 4
Packet Description ............................................................................................................................................................ 5
Incubator Specific Example Packets ........................................................................................................................... 7
Incubator Specific Operation ........................................................................................................................................ 9
Receiver: Unpacking the packet ................................................................................................................................... 9
Incubator: Payload Unpacking ..................................................................................................................................... 9
Incubator: Data Unpacking ..................................................................................................................................... 10
Incubator: Event Unpacking ................................................................................................................................... 10
Sender: Packaging client payload .............................................................................................................................. 10
Sender: Packaging client payload into a packet ....................................................................................................... 10
Messages .................................................................................................................................................................... 11
State/Status Events ................................................................................................... Error! Bookmark not defined.
Normal Operation ............................................................................................................................................... 11
State/Status Events ................................................................................................... Error! Bookmark not defined.
Environmental Alarms ........................................................................................... Error! Bookmark not defined.
H2O2 ........................................................................................................................ Error! Bookmark not defined.
Errors/Faults Alarms ............................................................................................. Error! Bookmark not defined.
User Action Events ..................................................................................................... Error! Bookmark not defined.
Python V3.6.5 Sample Application Code ....................................................................................................................... 21
Packet Processor ........................................................................................................................................................ 21
GUI ................................................................................................................................................................................ 26
Glossary ........................................................................................................................................................................... 32
Communications Protocol .......................................................................................................................................... 33
Master/Server/Host ................................................................................................................................................ 33
Slave/Client/Peripheral ........................................................................................................................................... 33
Physical Medium ..................................................................................................................................................... 33

July 2021
3
Network Topology ................................................................................................................................................... 33
Link Type ................................................................................................................................................................. 33
Point-to-Point (P2P) ............................................................................................................................................ 33
Point-to-Multipoint .............................................................................................................................................. 34
Multipoint-to-Point .............................................................................................................................................. 34
Duplex ...................................................................................................................................................................... 34
Packet Protocol ....................................................................................................................................................... 34

July 2021
4
Introduction
Description of an ASCII based communications protocol for communicating between Baker products
and third party devices.
Purpose
To provide the information necessary for a third party vendor to implement the protocol on a receiving
device associated with the incubator.
Overview
The incubator utilizes the Baker Packet Protocol to provide the current state and status of the incubator.
The payload portion of the packet contains information specific to the Incubator. The packets are
generated in three phases:
Startup Messages
• Provides power-on/reset notifications.
• Any detected system failures.
Periodic Messages
• Provides information on the incubator’s interior chamber environmental values
(CO2, RH, Air Temperature).
Sporadic Messages
• Providing warnings of chamber out-of-bounds performance.
• Providing system failure (hardware communications or internal errors)
• Providing “user action required” notifications.
• Providing user initiated events like door open/close and changes to the parameters of the device.

July 2021
5
Packet Description
Both the Sender and Receiver shall use the same packet structure.
Figure 1 Packet description. See BakerPacketProtocolHeaderPayload.pdf
Preamble:
• The `#@` ASCII characters denote the start of a packet.
Packet Protocol Version:
This field contains a major and minor version number to be used to identify the version of the Baker
Packet Protocol in use. This protocol shall follow the semantic versioning system of the minor version
number changing to indicate minor changes and backward compatibility with previous versions and the
major number indicating major changes to the incubator system which no longer assures compatibility
with previous versions.

July 2021
6
Sender Address:
• The sender address field defines the bus address of the transmitting device.
• The sender shall populate this field with its own unique bus address.
• The receiver will use this address to direct its responses.
• The address is two ASCII characters representing a hexadecimal value.
• Address Range: 0x00 to 0xFE (0 to 254), 0xFF is a broadcast address.
Sender Id:
• This field identifies the process on the sending device that initiated the message.
Receiver Address:
• The receiver address field defines the bus address of the receiving device.
• The transmitter shall populate this field with the bus address of the intended receiver.
• The address is two ASCII characters representing a hexadecimal value.
• Address Range: 0x00 to 0xFF (0 to 255), 0xFF is a broadcast address.
Receiver Id:
• This field identifies the process on the receiving device that should process this message.
Flags:
• Part of the protocol’s error detection features.
• An ACK request flag is set by the transmitter to indicate to the receiver if an ACK response is expected.
• A receiver can also use this field to specify a NAK when a bad packet is received.
• Please see the Packet diagram for the possible values for the flags field.
Type:
• This field identifies the type of traffic this message belongs to. The two primary types are client traffic
and flow control traffic. This allows the transport element of the protocol to immediately identify traffic
that is outside of the normal client Sender Addr/Id to Receiver Addr/Id traffic.
Sequence Number:
• The Sequence Number, placed in the upper half of the length field, is used in conjunction with the ACK
Flag to inform the transmitter which packet is being ACK-ed.
• Each packet sent via the protocol will have a ‘unique’ Sequence Number.
• Unique value in the realm of 0x0-0xFF in ASCII representation.
• The Packet ID is a two ASCII character representing a hexadecimal number.
• The Packet ID Range is `0x0` to `0xFF` (0-255)
Length:
• This field specifies the length of the entire packet (Header + Payload)

July 2021
7
Checksum:
• The checksum and termination field will be four ASCII characters representing the hexadecimal
checksum.
• The checksum range is from 0x0000 to 0xFFFF
• The algorithm is a Fletcher32 checksum truncated to 16 bits.
• Including the preamble `#@`, the algorithm encompasses the entire message with checksum field set
to binary zero’s, including all commas `,`.
Payload System Type:
• Identifies the Baker product initiating the packet. It will always be ‘C’ for incubator.
Payload Message Category:
• Identifies the category of message defined in the payload. It will always be ‘L’ for incubator Logging.
Payload Message Type:
• The message type defines what the contents of the body will contain and how the receiver should parse
its contents.
• The message type is a single ASCII character
• There are only two message types:
1. ‘E’ for Events
2. ‘D’ for Data
Payload Body:
• The Payload is made up of a fixed size Payload Header and a dynamic size Body field.
• The body field is of variable length and is dependent on the payload.
• The body field is limited to 65500 characters.
• The comma `,` is used to delimit sub-fields within the body.
Incubator Specific Example Packets
Packet is transmitted from the incubator to the endpoint. Protocol is configured for point-to-point
communications with ACK/NAK disabled.

July 2021
8
Figure 2 Data Packet
Figure 3 Event Packet

July 2021
9
Incubator Specific Operation
1. Every minute the incubator sends an unsolicited type `D` data message. This feature is not
configurable.
2. Additionally, packets of message type event ‘E’ (these messages provide operational Event
information) are automatically transmitted as they occur.
3. The incubator uses a FIFO buffer for transmitting packets. No precedence will be given based on the
type of message in the packet.
4. Flow control is not supported.
5. Packet retransmission in the case of an error in transmission is not supported.
Receiver: Unpacking the packet
1. Read incoming stream scanning for packet header preamble
2. Upon recognition of the packet header preamble, read from the stream the number of bytes contained
in the packet header.
3. Decode the packet protocol version, use the decoded version to determine validity. If the version is
invalid reset to step #1.
4. Using the protocol version, determine where the packet length field resides in the packet header.
Decode the packet header length field, if the value is invalid, then reset to step #1
Length validity depends on the maximum length packet the recipient is expecting.
5. Using the protocol version, determine where the recipient address resides in the packet header.
Decode the recipient address. If the recipient address is not ‘ourselves’ reset to step #1
6. Using the protocol version, determine where the flags field resides in the packet header. Decode the
flags. If the flags are not ‘0’ (nothing special), then reset to step #1
7. Using the protocol version, determine where the type field resides in the packet header. Decode the
type field. If the type of packet is not ‘0’ (client traffic), then reset to step #1
8. Using the protocol version, determine where the sequence number resides in the packet header.
Decode the sequence number. If the sequence number does not decode to a value between 0-0xFF,
then reset to step #1
9. Using the protocol version, determine where the checksum value resides in the packet header.
Decode the checksum value. Fill the checksum value field with binary zero and compute a checksum
for the whole packet.
10. Compare the computed checksum value to the decoded checksum value. If they match then the
message is valid.
11. Turn the message over to the process identified by the recipient ID for processing of the payload.
Incubator: Payload Unpacking
1. Ensure the payload is from a incubator by checking the System Type field for a ‘C’
2. Ensure the Message Category field is ‘L’ for logging.
3. Ensure the Message Type field contains either a ‘D’ or a ‘E’
4. If the Message Type field contains a ‘D’ follow the incubator: Data Unpacking

July 2021
10
5. If the Message Type field contains an ‘E’ follow the incubator: Event Unpacking
Incubator: Data Unpacking
1. Parse the first comma delimited field as the time in the format of hh:mm:ss.
2. Parse the second comma delimited field as the date in the format of mm:dd:yy.
3. The first space delimited field contains the Air Temperature datums.
These are the following, each separated by a comma.
I. Current Temperature
II. Set Point (desired Air Temperature)
III. High Alarm set point
IV. Low Alarm set point
4. The second space delimited field contains the Relative Humidity datums.
These are the following, each separated by a comma.
I. Current Relative Humidty
II. Set Point (desired Relative Humidty percentage)
III. High Alarm set point
IV. Low Alarm set point
5. The third space delimited field contains the CO2 datums.
These are the following, each separated by a comma.
I. Current CO2 percentage
II. Set Point (desired CO2 percentage)
III. High Alarm set point
IV. Low Alarm set point
Incubator: Event Unpacking
1. Parse the first comma delimited field as the time in the format of hh:mm:ss.
2. Parse the second comma delimited field as the date in the format of mm:dd:yy.
3. The third comma delimited field is the event description
4. The fourth field is the event code. Note: not all events have event codes.
Sender: Packaging client payload
1. Set the System Type field to ‘C’
2. Set the Message Category field to ‘L’
3. Set the Message Type field to either ‘D’ or ‘E’ depending on the body of the payload
Sender: Packaging client payload into a packet
Given:
• client data and message type
• all multi-byte fields are stored in MSB
1. Allocate a packet buffer
Table of contents

















