01.06.2013 Views

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Comments<br />

// If IP is set to a string != "0.0.0.0" client<br />

// wants to use this IP during the ppp session<br />

char PPPClieRemipAddrStr[16]; // If RemoteIP is set to "0.0.0.0" client allow<br />

// the peer to use its own IP during the PPP session,<br />

// the RemoteIP is filled in after successful connection<br />

char PPPClienetMaskStr[16]; // subnet mask<br />

char PPPClieipGatewayStr[16]; // gateway<br />

// If RemoteIP is set to a string != "0.0.0.0"<br />

// client wants to configure the remote peer with this IP<br />

PPPDial pppdial[PPP_MAX_DIAL]; // modem/dial entries<br />

PPP_ModemHangup modem_hangup; // modem hang-up commands<br />

int break_modem; // Flag for breaking <strong>SC12</strong> - modem<br />

// control communication (dialing, waiting for connect)<br />

// Setting break_modem to 1 breaks current modem control communication<br />

// between <strong>IPC<strong>@CHIP</strong></strong> and the modem at a PPP client open or close call.<br />

// The PPP client reads this flag and breaks the dialing, if flag is set.<br />

// This flag can be set from another task. It will not break an established<br />

// PPP link! Don't forget to clear this flag to zero after breaking.<br />

} PPPClient_Init;<br />

The PPPClient_Init structure is used to open a PPP client session.<br />

The flow control mode XON/XOFF applied to PPP has not been tested. It is not advisable to use it. Since <strong>@CHIP</strong>-<strong>RTOS</strong><br />

1.02B XON/XOFF mode is also available if the DMA receive mode for the selected serial port is enabled, but due to the<br />

internal functionality of DMA it is not possible to immediately detect an XON or XOFF from the peer. Therefore it is possible<br />

that an overrun situation can occur at the connected peer (e.g. GSM modem). We now offer this mode because GSM<br />

modems (any??) support only XON/XOFF flow control.<br />

The PPPClient_Init structure contains an array of the PPPdial structures used for initializing and dialing a modem.<br />

These modem commands will be executed at the start of establishing a connection to a PPP server.<br />

The PPPClient_Init structure also contains a PPP_ModemHangup structures for closing the modem connection.<br />

For how to initialize and use these structures see the PPPCLIE.C example.<br />

Related Topics<br />

Top of list<br />

Index page<br />

PPPDial<br />

Comments<br />

API function PPPCLIENT_OPEN - Open PPP client session.<br />

PPPdial dial-up command data<br />

typedef struct tag_pppdial_init<br />

{<br />

char far * modemcmd; // modem command string<br />

char far * modemans; // modem answer string (max. 80 characters + '\0')<br />

int timeout; // seconds, 0 = no time out<br />

int retries; // Maximum number of dial attempts.<br />

char expect_send; // = 0: PPP client sends modem AT command<br />

// and expects modem answer (e.g. OK).<br />

// = 1: PPP client expects modem answer<br />

// (e.g. CONNECT) and sends modem command.<br />

} PPPDial;<br />

Page 172 / 400

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!