Chip:MK64FN1M0VMD12(not an NXP Borad,it is made by myself)
SDK :SDK_2_11_0_FRDM-K64F_FULL(LwIP2.2.0)
OS:FreeRTOS
The board has a SIM card slot connecting to a 4G module using AT command to oprerate..This is the flow in my program as below:
1.reset 4G module
2.enable CMUX function using AT command "AT+CMUX=0,0,5,1024",after this,all command should follow gsm0710 protocol.
3.Initialize two virtual com channel,one for ppp frames,one for AT command.
4.call tcpip_init(NULL, NULL);
5.send a list of AT command to the ppp channel to initialize and enable ppp.Especially AT+CGDATA="PPP",1 should be sent.
6.call pppapi_pppos_create,pppapi_set_default and pppapi_connect
7.Now the PPP data will send to UART then dispatch to PPP virtual com.Then call pppos_input_tcpip to send the data to the LwIP kernel.
The 16 bytes is received by PPP virtual com after PPP is connected.