2.4.6 Serial operations wrapper
Phoneserver
Phoneserver is a generic interfaces will provide TAPI for clients like call enabler, SMS enabler etc.
Phone server keeps exclusive access right to the AT command virtual channel of the modem if multiplexer is enabled, or keeps exclusive access right to modem directly if the multiplexer is disabled.
Phone server interacts with phone relevant applications through IPC bus system. The applications request a phone relevant service, which will be passed on to TAPI, and TAPI will forward the request to phone server through IPC bus message. Once phone server receives the message, it may translate it into corresponding AT command and then write to modem or modem command virtual channel. Response of the AT command, and unsolicited event, such as an incoming call, will be send back to corresponding applications via IPC bus system again.
Phone server is started up once the device is powered on. And then it creates a mirror address book for the phonebook in the SIM card.
The following contents describe telephony API architecture and interfaces provided to applications.

Process engine: tapi.c
Command queue: tapi.c
Utility functions: util.c
Serial wrapper: serial.c
Parser: at_helper.c
Builder: at_helper.c
The event model conforms to the Lips Event model. Please refer to Lips reference model Section 3.10.
All the commands that TAPI send to modem is constructed into a priority FIFO queue. There are three type of priorities, that is defined below
typedef enum {
CMD_PRIORITY_LOW,
CMD_PRIORITY_MEDIUM,
CMD_PRIORITY_HIGH
}cmd_priority;
CMD_PRIORITY_HIGH - Command is sent immediately
CMD_PRIORITY_MEDIUM - Command is inserted into the tail of FIFO priority queue, prior to the CMD_PRIORITY_LOW.
CMD_PRIORITY_LOW - Command is inserted into the tail FIFO priority queue.
All of the command should be sent with CMD_PRIORITY_MEDIUM or CMD_PRIORITY_LOW except two exceptions
Like sending and writing SMS, the message body should be sent immediately after we got the response of the first instruction.
The phoneserver mainly includes the following components:
The procedure of the initialization is described in the following figure:
![]() |
![]() |
![]() |