Start
This document aims to give a detailed overview of how to communicate with the RAVAS RedBox scale using the RedBox protocol. The protocol uses protocol buffers to encode its messages.
Glossary
- Scale: The weighing scale. A Ravas Redbox can contain multiple weighing scales. Usually only one scale is used (Index 0)
- Loadcell: A straingauge to measure the applied weight and converts this into a electrical signal
- Tare: Subtracting e.g. the weight of a pallet
- Gross weight: Total weight on the scale
- Net weight: Weight with tare subtracted.
Getting started
Protocol buffer decoding/encoding libraries exist for all popular languages. See: protobuf-compiler-installation.
Schema file (.proto)
See redbox-protobuf
Packet structure
Each packet starts with a 3 byte header. This header contains a fixed preamble byte (0x3A) and the length of the protobuf message (u16).
The header is followed by Length bytes, which is the encoded protobuf message. Multiple packets can be sent one after the other. This packets will be handled sequentially.Transport layer: TCP/IP
The protocol is available over multiple physical transport layers. For now the scope of this document is limited to the TCP/IP layer. The RedBox is listening on TCP port 49112 for a connection. Once connected, you can start sending Requests.
To discover a RedBox on the network, send an empty UDP broadcast packet to port 49111. The RedBox responds with its own empty UDP packet.
Usage
Initially the communication can follow a basic Request
- Response
flow.
Example
See Basic example (C#) for a minimal example.