DIBAL POS Scale Serial Settings & Communication Protocol

 

 

The serial settings must be 9600, n, 8, 1.

We send to the scale a string with the fields: 98, a 5-digit price, and a checksum, followed by CRLF.

You can find the checksum as follows:

  • Add together all the digits of the price (P1–P5) → Sum1

  • XOR this sum (Sum1) with all elements (characters/bytes) of the string → Sum2

  • Finally, checkSum = Sum1 XOR Sum2

The simplest way to communicate with the scale is to keep sending 98000001CRLF and the scale will return the weight.

The format of the response from the scale is: 9900031600000004CRLF

  • 99: response code

  • 0: correct reception

  • 00316: the weight (in this example, 316 grams—in 5 digits, with the last 3 considered as decimals)

  • 0

  • 000000

  • 4: checksum, which is calculated as the sum of the digits in 99000316