W406-CE User’s Manual
Application Development
Visual C++ Examples
The C++ examples are available on the software CD for your reference.
Net Compact Framework Library
For .Net programming, MOXA also provides a .Net Compact Framework library.
GPRS/SIM/SMS
The definition header file includes the entire library APIs, you can find it in the Software
CD
Opens a cellular modem.
Class Name:
GPRS
Method:
bool Open()
Inputs:
None
Return Values:
True indicates success, False means failure.
Remark:
You must open the cellular modem first before you use the other GPRS method.
Closes a cellular modem.
Class Name:
GPRS
Method:
void Close()
Inputs:
none
Return Values:
none
Remark:
You must close the cellular modem handle resource if you don’t need to use cellular modem
APIs
later.
Sends AT command to the cellular modem directly and gets the responded string.
Class Name:
GPRS
Method:
int SendATCommand(string atCmd, ref string szRecv, uint timeout)
Inputs:
<atCmd> AT command string; Remember to concatenate the “\r” in the end of string
<szRecv> The Responded string
<timeout> Timeout in milliseconds.
Return Values:
Number of bytes returned, otherwise the function fails
Remark:
B-11