C
ONFIGURATION
C
OMMAND
S
ET
- F
IRMWARE
R
EVISION
2.4.0_
BETA
-
V
ERSION
1.0.0
length of
<cmd>
commands is limited to 1500 characters. The common
syntax in this case is:
<cmd_1>;<cmd_2>;<cmd_3>….<cmd_n>
<parameter>
The
<parameter>
can contain different valid parameters supported
by the MAMBOII firmware. In some PFAL commands the
<parameter>
entry is
omitted. However, the specified parameter depends on the defined <cmd>
command. Some parameters do not require any value, so it will be left
empty. According to this explanation, the improved syntax to specify the
<parameter>
is:
<parameter>=<value>
[<*CKSUM>]*
If the checksum
<*CKSUM>
is used, it consists of an asterisk
“*”
character (without double quotes) followed by two hex values. In order to
calculate the Checksum, use your own application. Below a small source
code written in Visual Basic:
//*****************************************
Public Sub CheckSum(field As String)
If field = “” then CS = “*”
CS = 0
For i = 1 to Len(field)
CS = CS Xor Asc(Mid$(field, i, 1))
Next
CS = Hex(CS)
If Len(CS) =1 then CS = “0” & CS
CS = “*” & CS
END SUB
//*****************************************
Therefore, the string over which the checksum has to be calculated is:
field = PFAL,<cmd>,<parameter>
excluding
“$”
character
.
The
“CS”
variable in the CheckSum procedure must
be declared as a global variable.
[<CRLF>]*
Carriage Return plus Line Feed (ASCII CODE #13#10 (without any spaces) -
hexadecimal: 0x0D 0x0A)
According to the explanations above, the improved syntax to specify a PFAL command is:
$PFAL,<c_type>.<c_index>.<c_subindex>,<parameter>=<value><*CKSUM><CR><LF>
or
$PFAL,<c_type>.<c_index>.<c_subindex>,<parameter>=<value><CR><LF>
or
PFAL,<c_type>.<c_index>.<c_subindex>,<parameter>=<value><*CKSUM><CR><LF>
or
PFAL,<c_type>.<c_index>.<c_subindex>,<parameter>=<value><CR><LF>
For example:
1)
$PFAL
,SYS.Device.Reset*31<CR><LF>
2)
$PFAL
,Sys.Trigger5<CR><LF>
3)
$PFAL
,IO.Beep3=hpulse,1000 <CR><LF>
4)
$PFAL
,IO.Vibration=hpulse,5000;MSG.Send.Serial,0,”Phone is vibrating“<CR><LF>
5)
$PFAL
,Sys.Timer0.Start=single,5000<CR><LF>
6)
$PFAL
,Cnf.Set,DEVICE.NAME=”myMAMBOII”<CR><LF>
7)
$PFAL
,Cnf.Set,AL0=IO.BTN.e0=short:IO.Beep3=hpulse,1000<CR><LF>
*
Optional
This confidential document is a property of FALCOM and may not be copied or circulated without previous permission.
Page 21 of 271