This chapter provides reference material for the modem manager API. The header file ModemMgr.h
declares the modem manager API.
Modem Manager Functions
MdmDial Function
Purpose
Initialize the modem, dial the phone number and wait for result.
Declared In
ModemMgr.h
Prototype
Err MdmDial ( MdmInfoPtr modemP, Char *okDialP, Char *userInitP, Char *phoneNumP )
Parameters
-
modemP
- Pointer to modem info structure (filled in by caller)
-
okDialP
- (NOT IMPLEMENTED) Pointer to string of chars allowed in dial string
-
userInitP
- Pointer to modem setup string without the AT prefix.
-
phoneNumP
- Pointer to phone number string
Returns
0 if successful; otherwise mdmErrNoTone
, mdmErrNoDCD
, mdmErrBusy
, mdmErrUserCan
, mdmErrCmdError
Comments
When executing this function, the system performs these steps:
- Switch to the requested initial baud rate.
- If HW hand-shake is requested, enable CTS/RTS hand-shaking; otherwise, disable it.
- Reset the modem.
- Execute the setup string (if any).
- Configure the modem with required settings.
- Dial the phone number.
- Wait for CONNECT XXXXX or other response.
- If auto-baud is requested, switch to the connected baud rate.
MdmHangUp Function
Purpose
Declared In
ModemMgr.h
Prototype
Err MdmHangUp ( MdmInfoPtr modemP )