The Tonino firmware implements a simple protocol that can be used to adjust basic settings of the Tonino roast color meter.
- baudrate: 115200 (Classic Tonino), 57600 (Tiny Tonino)
- bytesize: 8
- parity: none
- stopbits: 1
The following EBNF production rules define the general syntax of the command language:
sep = " " ;
newline = "\n" ;
number = int | float ;
values = number | values, sep, number ;
cmdline = cmd, [ sep, values ], newline ;
result = cmd, [ ":", values ], newline ;
Each cmdline that is successfully processed is answered by a result with the same cmd and a potentially empty list of numbers.
Commands supported by all Toninos
Commands cmd = |
Purpose |
|---|---|
TONINO |
return version information |
SCAN |
scan and return T-value |
I_SCAN |
scan and return internal value |
II_SCAN |
scan and return raw values |
D_SCAN |
scan unilluminated and return raw values |
SETCAL |
store calibration values |
SETSCALING |
set scaling values |
GETSCALING |
get scaling values |
SETBRIGHTNESS |
set brightness |
GETBRIGHTNESS |
get brightness |
RESETDEF |
reset to defaults |
Additional commands supported only by the Classic Tonino
Commands cmd = |
Purpose |
|---|---|
GETCAL |
retrieve calibration values |
SETSAMPLING |
set sampling |
GETSAMPLING |
get sampling |
SETCMODE |
set color measure mode |
GETCMODE |
get color measure mode |
SETLTDELAY |
set delay between can-up and scan |
GETLTDELAY |
get delay between can-up and scan |
SETCALINIT |
set check calibration at start |
GETCALINIT |
get check calibration at start |
Additional commands supported only by the Tiny Tonino
Commands cmd = |
Purpose |
|---|---|
SETTARGET |
set target and range |
GETTARGET |
return target and range |
SETSCALE |
set scale name |
GETSCALE |
get scale name |
SETNAME |
set user name |
GETNAME |
get user name |
SETDFLIP |
set display flip (removed in v2.2.0 and later) |
GETDFLIP |
get display flip (removed in v2.2.0 and later) |
Additional commands supported only by the Tiny Tonino firmware v2.2.0 or later
Commands cmd = |
Purpose |
|---|---|
SETDSCALE |
set default scale |
SETDSCALE |
get default scale |
-
TONINO
Get firmware version (major minor build)-
Arguments: none
-
Results:
value type major intminor intbuild int -
Example:
request reply TONINO\nTONINO:1 0 1\n
-
-
-
Arguments: none
-
Results:
value type T-value int -
Example:
request reply SCAN\nSCAN:58\n
-
-
I_SCAN
Scan and return internal value-
Arguments: none
-
Results:
value type Internal value float -
Example:
request reply I_SCAN\nI_SCAN:3.434770\n
-
-
II_SCAN
Scan and return raw values-
Arguments: none
-
Results:
value type white floatred floatgreen floatblue floatT-value int -
Example:
request reply II_SCAN\nII_SCAN:30330 0 0 8980 58\n
-
-
D_SCAN
Scan unilluminated and return raw values-
Arguments: none
-
Results:
value type white floatred floatgreen floatblue float -
Example:
request reply D_SCAN\nD_SCAN:30330 0 0 8980\n
-
-
-
Arguments:
param type b int[0,..,15]] -
Results:: none
-
Example:
request reply SETBRIGHTNESS 10\nSETBRIGHTNESS\n
-
-
-
Arguments: none
-
Results:
value type b int -
Example:
request reply GETBRIGHTNESS\nGETBRIGHTNESS:10\n
-
-
-
Arguments: none
-
Results: none
-
Example:
request reply RESETDEF\nRESETDEF\n
-
-
-
Arguments:
param type slope floatintercept float -
Results:: none
-
Example:
request reply SETCAL 1.024999 -0.032341\nSETCAL\n
-
-
-
Arguments: none
-
Results::
value type slope floatintercept float -
Example:
request reply GETCAL\nGETCAL:1.024999 -0.032341\n
-
-
SETSCALING
Set set scaling values-
Arguments: ax^3 + bx^2 + cx + d
param type a floatb floatc floatd float -
Results:: none
-
Example:
request reply SETSCALING 0.0 0.0 91.248359 -254.914581\nSETSCALING\n
-
-
-
Arguments:: none
-
Results: ax^3 + bx^2 + cx + d
value type a floatb floatc floatd float -
Example:
request reply GETSCALING\nGETSCALING:0.000000 0.000000 91.248359 -254.914581\n
-
-
-
Arguments: sampling duration = 1sec / d
param type d int[1,..,255] -
Results: none
-
Example:
request reply SETSAMPLING 5\nSETSAMPLING\n
-
-
-
Arguments: none
-
Results: sampling duration = 1sec / d
value type d int -
Example:
request reply GETSAMPLING\nGETSAMPLING:5\n
-
-
SETCMODE
Set color measure mode-
Arguments:
1 : white
2 : red
4 : green
8 : bluee.g. 1+8=9 activates white and blue
param type c int -
Results:: none
-
Example:
request reply SETCMODE 9\nSETCMODE\n
-
-
GETCMODE
Get color measure mode-
Arguments: none
-
Results:
1 : white
2 : red
4 : green
8 : bluee.g. 1+8=9 returns white and blue
value type c int -
Example:
request reply GETCMODE\nGETCMODE:9\n
-
-
SETLTDELAY
Set delay between can-up and scan-
Arguments: delay = d * 1/10sec
param type d int[0,..,255] -
Results:: none
-
Example:
request reply SETCMODE 10\nSETCMODE\n
-
-
GETLTDELAY
Get delay between can-up and scan-
Arguments: none
-
Results: delay = d * 1/10sec
value type d int -
Example:
request reply GETCMODE\nGETCMODE:10\n
-
-
SETCALINIT
Set check calibration at start-
Arguments:
param type on int(0 for false or 1 for true) -
Results: none
-
Example:
request reply SETCALINIT 1\nSETCALINIT\n
-
-
GETCALINIT
Get check calibration at start-
Arguments: none
-
Results:
value type on int(0 for false or 1 for true) -
Example:
request reply GETCALINIT\nGETCALINIT:1\n
-
-
SETTARGET
Set set scaling values-
Arguments:
param type target intrange int -
Results:: none
-
Example:
request reply SETTARGET 100 5\nSETTARGET\n
-
-
-
Arguments:: none
-
Results:
value type target intrange int -
Example:
request reply GETTARGET\nGETTARGET:100 5\n
-
-
-
Arguments:
param type name str -
Results: none
-
Example:
request reply SETSCALE Agtron\nSETSCALE\n
-
-
-
Arguments: none
-
Results:
value type name str -
Example:
request reply GETSCALE\nGETSCALE:Agtron\n
-
-
-
Arguments:
param type name str -
Results: none
-
Example:
request reply SETNAME Steve\nSETNAME\n
-
-
-
Arguments: none
-
Results:
value type name str -
Example:
request reply GETNAME\nGETNAME:Steve\n
-
-
SETDFLIP
Set display flip mode-
Arguments:
param type on int(0 for false or 1 for true) -
Results: none
-
Example:
request reply SETDFLIP 1\nSETDFLIP\n
-
-
GETDFLIP
Get display flip mode-
Arguments: none
-
Results:
value type on int(0 for false or 1 for true) -
Example:
request reply GETDFLIP\nGETDFLIP:1\n
-
-
-
Arguments:
param type scale int(0 for Tonino or 1 for Agtron) -
Results: none
-
Example:
request reply SETDSCALE 1\nSETDSCALE\n
-
-
-
Arguments: none
-
Results:
value type scale int(0 for Tonino or 1 for Agtron) -
Example:
request reply GETDSCALE\nGETDSCALE:1\n
-