http://www.wavecom.com/forum Open AT ® Release version: 4.10 |
This sample depends on the following libraries :
This application allows to monitor the module's ports state and signals.
As this application uses the MultiApp library, the following start/stop command has to be used to control the application execution.
AT+PMGRSTART (Port_Manager start/stop command)
Command | Answers |
AT+PMGRSTART? | +PMGRSTART:
<state>
OK |
AT+PMGRSTART=? | +PMGRSTART:
(0-1)
OK |
AT+PMGRSTART= <state> | +CME ERROR: 3 or OK |
Parameter | Values range | Description | Default value |
state | 0-1 | The current application running state. This parameter is stored in non-volatile memory. | 0 |
The init entry point sent to the MultiApp library is the pMgr_init() function. The start/stop entry points linked to the +PMGRSTART command are the pMgr_run() and pMgr_stop() functions.
This application provides a command set to monitor the module's ports state and signals.
AT+PMGRINFO (Ports state query command)
Command | Answers |
AT+PMGRINFO=? | +PMGRINFO:
(2)
OK |
AT+PMGRINFO= <Port> | +PMGRINFO : <Port>,<State> OK |
Parameter | Values range | Description | Default value |
Port | 2 | Port identifier to query (in hexadecimal format between 0 and FF) ; please refer to ADL User Guide for more information. | mandatory |
State | 0-1 | Port state 0 : closed or unavailable ; 1 : available | NA |
In addition to this +PMGRINFO command, each time a module's port becomes available or unavailable (due to the AT+WMFM command, the external 27.010 multiplex driver or a BlueTooth peripheral connection), the following unsolicited result is sent :
Where Port and State parameters are the same ones that in the +PMGRINFO command.
AT+PMGRSIGNAL (Port's signals monitoring command)
Command | Answers |
AT+PMGRSIGNAL=? | +PMGRSIGNAL:
(0-2)
,
(2)
,
(0-1)
OK |
AT+PMGRSIGNAL? | +PMGRSIGNAL:
<Mode>
,
<Port>
,
<Signal>
,
<State>
OK |
AT+PMGRSIGNAL= <Mode> , <Port> , <Signal> | +CME ERROR: 3 or +PMGRSIGNAL: <Mode>,<Port>,<Signal>,<State> OK |
Parameter | Values range | Description | Default value |
Mode | 0-2 | Signal monitoring mode 0 : Single read (state is immediatly returned) 1 : Starts a 1 second polling process on the required port's signal 2 : Stops a running polling process on the required port's signal 3 : Unsolicited result (see below) | mandatory |
Port | 2 | Port identifier to query (in hexadecimal format between 0 and FF) ; please refer to ADL User Guide for more information. | mandatory |
Signal | 0-1 | Port's signal to monitor 0 : port's CTS input signal 1 : port's DSR input signal | mandatory |
State | 0-1 | Port's signal state 0 : signal not set, or success for a start/stop polling request ; 1 : signal set ; Negative Value : ADL start/stop polling function returned error code | NA |
In addition to this +PMGRSIGNAL command, if a polling process is required on one or several single port's signals (all the running polling processes have to run on the same port), each time this signal changes (within the 1 second polling time), the following unsolicited result is sent :
Where Port, Signal and State parameters are the same ones that in the +PMGRSIGNAL command.
Updated: Tue Sep 19 17:13:28 CEST 2006;