|
|
|
|
AR1688 Development Guide - UI Protocols |
There are currently 7 kind of string based high level UI protocols between AR1688 and external controller:
1. Key, format "KEY x", where 'x' comes from mcs51\hook.c and mcs51\key.c, indicate a key or a hook event occurs on external controller side and send it to handle in AR1688 function.c function UI_HandleKeys.
2. LCD, format "LCD lxxxxxxxxxxxxxxxx", where 'l' stands for display lines, '0' to display on the first line, '1' on second, possible '2' and '3' on third and fourth. "xxxxxxxxxxxxxxx" is the string to display, transferred from AR1688 to external controller.
3. LCD Cursor, format "LCDClps", 'l' for line number same as above, 'p' for cursor position, '0' as first. 's' for show or hide cursor, '0' to hide, '1' to show. Same as 2, this command is also from AR1688 to external controller.
4. LED, format "LED ts", 't' is the LED type listed below, 's' for status, '0' - On, '1' - Off, '2'- Blink. This command is from AR1688 to external controller too. LED type (mcs51\led.c, inc\bank1.h):
'0' - LCD
'1' - KEYPAD
'2' - MESSAGE
'3' - MUTE
'4' - HOLD
'5' - TRANSFER
5. Loop test, format "LOOPXXXXXXXXXXX", indicate peer to loop back "XXXXXXXXXXX".
6. Status report, format "STATxxx", indicate a status change in AR1688, where "xxx" is from include\core.h UI_YYYY_ZZZZ defines just before function TaskUIHandler.
For example, "logon ok", AR1688 will send "STAT10" to peer, as UI_LOGON_OK defined as "10" in core.h. Just as "LCD ", "LCDC" and "LED " commands, "STAT" is also only from AR1688 to external controller.
7. Text exchange, format "TEXTxxx", where "xxx" is the actual text user wish to exchange.
Like "LOOP" command, This command is used in both side. When external controller send "TEXTxxx" to AR1688 by UART, AR1688 will send the string "TEXTxxx" to the other AR1688 in the call by standard SIP MESSAGE request.
And the receiving party will display it and send it to its own external controller via UART, using exactly the same command.
|
|