星期一, 十一月 05, 2007

MMS

MMs and dcd are known business, and their principle is the same.

The Flow is:
When you send a MMS, the terminate send you request to China Mobile Server, it then sends notify through Short Msg to the aim termiate, this called push. After succeed, the aim termiate will get the MMS from CMS througn WAP, this called polling.

Short Message is short, Push once is enough.

MMS represented by SMIL language, when New a MMS or View a MMS, it's the same as compose a SMIL file and View(or Play) a SMIL file.

Lwip's ppp

It's designed very greate.
PPP is used for dialing to Internet by low-level Link, including three steps on this process.

Initppp():
Just make Ppp_Ctrl[i].OpenFlag = 0;

OpenPpp():
1, this function will return a 'pd' which identifies a current requested Dials. this pd is set being used by set ppp_Ctrl[pd].OpenFlag = 1, and then it will do fsm_up().
2, fsm is status machine. Perfect design to use fsm to control lcp->pap->ipcp dialing in each step.

ClosePpp():
closing a ppp connection.

Using callback machnism:
if there is any error or expection happened, the connection will report it to a 'cb' which set at OpenPpp(CallBack_LinkStatus linkStatus, ...)

Output and Input Data interface:
Lwip use mailBox for dealing message. When the Incoming interface receives datas, it will make a message and pass it(including data) to message queue, then the TCPIP_thread treats the message queue, it just pass sth to the core of tcpip.