IEI Integration AUPS UART Protocal SPC User Manual

AUPS IEI T
echnology Corp
.
AUPS UART PROTOCOL SPECIFICATION
Programmer Reference Manual
Version 1.5
AUPS IEI T
Revision History
Revision Issue Date Comments
V1.0 2007/6/5 Initial release
V1.1 2008/6/20 Add protocol
V1.2 2008/8/11 Add LAN function protocol
V1.3 2008/12/10 Modify read protocol and add Board type command(0x6A)
V1.4 2009/10/15 Add COM port configuration
V1.5 2010/03/30 Add Example of temperature
echnology Corp
.
AUPS IEI T
Agenda
Communication Protocol
Command List
COM port configuration Example
echnology Corp
.
AUPS IEI T
echnology Corp
.
Communication Protocol
Commands to MCU and data returned from MCU are conveyed in the following communication format :
STX Length
Write :
Name
STX
Length Length of data
Command Command 1
Communication Protocol
Command /
Data
Description
Start of text 0x02
Ex 1 byte is 0x01
Checksum
Size
2 bytes is 0x02
CR
1
1
Data data 0 ~ 16
Checksum
CR Carriage return 0x0D 1
Read:
Name
STX
Length Length of data
Command Command 1
Data returned data 0 ~ 16
Checksum = (STXLengthCommand
Data) MOD 0x100
Description
Start of text 0x02
Ex 1 byte is 0x01
Size
2 bytes is 0x02
1
1
1
Checksum
CR Carriage return 0x0D 1
Checksum = (STXLengthCommand
Data) MOD 0x100
1
AUPS IEI T
Command List
You can use following pre-defined commands un the application to communicate with
MCU and to receive data returned from MCU.
Command List:
echnology Corp
.
Command
0x01
0x02
0x22
0x09
0x0A
0x08
0x0F
0x11
0x40
0x41
0x42
0x43
Select Smart Battery A
Select Smart Battery B
Read Smart Battery Type ( LION: 4C and NIMH: 4E )
Read Smart Battery Output Voltage ( mV )
Read Smart Battery Electric Current ( mA )
Read Smart Battery Internal Temperature (
Read Smart Battery Capacity ( % )
Read Smart Battery Discharging Time ( Minute )
Read Smart Battery Status 1
Read Smart Battery Status 2
Read MCU Firmware Version
Enable Buzzer
None
Description
None
None
2
2
1
2
Return bytes
2
2
ºC ) 2
2
1 byte
byte
byte
byte
byte
byte
byte
byte
byte
0x44
0x45
0x46
0x47
0x48
0x50
0x51
0x52
0x53
0x54
0x55
0x56
0x57
Disable Buzzer
Turn On UPS Output
Turn Off UPS Output
Enable LAN
Disable LAN
Read IP Address
Write IP Address
Read Gateway
Write Gateway
Read Primary DNS
Write Primary DNS
Read Secondary DNS
Write Secondary DNS 4 bytes
None
None
None
None
None
4
4
4
4
4
4
4
byte
byte
byte
byte
byte
byte
byte
AUPS IEI T
echnology Corp
.
0x58
0x59
0x60
0x61
0x62
0x63
0x64
0x65
0x66
0x68
0x6A
0x30
0x31
Read Host Name 16 bytes
Write Host Name 16 bytes
Read DHCP ( If 1 = DHCP is enabled else is disabled) 1 bytes
Write DHCP ( If 1 = DHCP is enabled else is disabled) 1 bytes
Read Subnet MASK 4 bytes
Write Subnet MASK 4 bytes
Read MAC Address 6 bytes
Write MAC Address 6 bytes
Read Save LAN Setup Result ,(if 0=ok else saving now ) 1 bytes
Set SOFT_OFF=0 (If 1 =window OS is Shut Down)
Read Board TYPE(if 0=no LAN, if 1=A/D board, if 2=main board) 1 bytes
Read Protected NAME 10 bytes
Write Protected NAME 10 bytes
None
0x32
0x33
0x34
Read Protected Pass Word 10 bytes
Write Protected Pass Word 10 bytes
Load Default LAN Setup
None
AUPS IEI T
COM port configuration
Com port configuration setting
Baud rate 9600
Data bit 8
Parity check bit None
Stop bit 1
echnology Corp
.
AUPS IEI T
Read Smart Battery Alarm (Command :0x40),and return 2 bytes
echnology Corp
.
High byte
Return byte
Bit 0
Bit 1
Bit 2
Bit 3
Bit 4
Bit 5
Bit 6
Bit 7
Low byte
Return byte
UPSONOFF_ACTF
Name
ADIN_ACTF
BUZZER_ACTF
LAN_ACTF
BATB_ACTF
BATA_ACTF
None
None
Description
If 1 = DC Power is connected to AUPS module
If 1 = Buzzer is enabled
If 1 = UPS output is turned on
If 1 = LAN is enabled
If 1 = Battery B is connected
If 1 = Battery A is connected
Don’t Care
Don’t Care
Name
Description
Bit 0
Bit 1
Bit 2
Bit 3
Bit 4
Bit 5
Bit 6
Bit 7
Note: None : Read as ‘0’
BATA3_ACTF
BATB3_ACTF
BATA4_ACTF
BATB4_ACTF
BATA2_ACTF
BATB2_ACTF
SOFT_OFF
None
If 1 =
Battery A type is 3 packs in serial
If 1 =
Battery B type is 3 packs in serial
If 1 =
Battery A type is 4 packs in serial
If 1 =
Battery B type is 4 packs in serial
If 1 =
Battery A type is 2 packs in serial
If 1 =
Battery B type is 2 packs in serial
If 1 =window OS is Shut Down
Don’t Care
AUPS IEI T
Read Smart Battery Status (Command :0x41),and return 2 bytes
High byte
echnology Corp
.
Return byte
Bit 0
Bit 1
Bit 2
Bit 3
Bit 4
Bit 5
Bit 6
Bit 7
Low byte
Return byte
Bit 0
Bit 1
Name
TEMPOVER_A
TEMPOVER_B
TEMPGOVER_A
TEMPGOVER_B
VOLOW_A
VOLOW_B
VOLOVER_A
VOLOVER_B
Name
BATTERYFULL_A
BATTERYFULL_B
Description
If 1 = Battery A
If 1 = Battery B
If 1 = Battery A
If 1 = Battery B
If 1 = Battery A Output Voltage < normal rated voltage
If 1 = Battery B Output Voltage < normal rated voltage
If 1 = Battery A Output Voltage > normal rated voltage
If 1 = Battery B Output Voltage > normal rated voltage
If 1 = Battery A Full
If 1 = Battery B Full
is not charging ,
is not charging
is charging,
is charging
temperature > 45 ºC
, temperature > 45 ºC
Description
temperature > 60 ºC
, temperature > 60 ºC
Bit 2
Bit 3
Bit 4
Bit 5
Bit 6
Bit 7
BATA_CHGF
BATB_CHGF
BATA_STANDBY
BATB_STANDBY
BATA_USE
BATB_USE
If 1 = Battery A is charging
If 1 = Battery B is charging
If 1 = Battery A is standby
If 1 = Battery B is standby
If 1 = Battery A is discharging
If 1 = Battery B is discharging
AUPS IEI T
Example
echnology Corp
AP SEND MCU RAED Voltage Command:
AP->MCU
STX0x02 Length0x01 Command0x09 CR0x0D Checksum:(0x02+0x01+0x09)MOD 0x100 = 0x0C
MCU->AP: Response<02><03><09><3E><80><CC><0D>
STX0x02 Length0x03 Command0x09 Data0x3E80 CR0x0D Checksum:(0x02+0x03+0x09+0x3E+0x80)MOD 0x100 = 0Xcc Return Value:0x3E80(16000mV)
Command<02><01><09><0C><0D>
MCU Response AP Voltage Value:
AP SEND MCU RAED IP Address Command:
:
AP->MCU
STX0x02 Length0x01 Command0x50 CR0x0D Checksum:(0x02+0x01+0x50)MOD 0x100 = 0x53
MCU->AP:
STX0x02 Length0x05 Command0x50 Data1:0xA9
Checksum:(0x02+0x05+0x50+0xA9+0xFE+0x01+0x01)MOD 0x100 = 0x00 Return IP Address: A9: FE: 01: 01
AP->MCU:
STX0x02 Length0x05 Command0x51 Data1:0xA9
Checksum:(0x02+0x05+0x51+ 0xA9+0xFE+ 0x01+ 0x01)MOD 0x100=0x01
Command<02><01><50><53><0D>
MCU Response AP IP Address:
Response<02><05><50><A9><FE><01><01><00><0D>
AP SEND MCU Write IP Address Command:
Command+ data<02><05><51><A9><FE><01><01><01><0D>
Notes: Angle brackets < > : indicate data in hex value.
:
Data2:0xFE Data3: 0x01 Data4 :0x01 CR0x0D
Data2:0xFE Data3: 0x01 Data4 :0x01 CR0x0D
.
- 10 -
AUPS IEI T
AP SEND MCU RAED
Temperature
Command:
echnology Corp
AP->MCU
STX0x02 Length0x01 Command0x08 CR0x0D Checksum:(0x02+0x01+0x08)MOD 0x100 = 0x0B
MCU->AP: Response<02><03><08><0B><A5><BD><0D>
STX0x02 Length0x03 Command0x08 Data0x0BA5 CR0x0D Checksum:(0x02+0x03+0x08+0x0B+0xA5)MOD 0x100 = 0XBD
°K Absolute temperature °C Celsius temperature [ °K -> °C ] Formula [ °K / 10 – 273 = °C ]
Example
Command<02><01><08><0B><0D>
MCU Response AP
Return Value:0x0BA5(2981°K)
:
Temperature
25.1°C = 2981/10 - 273
Value:
.
- 11 -
Loading...