http://www.wavecom.com/forum

Open AT ®  Release version:
4.10

Sample - Port_Manager

Changes

Dependencies

This sample depends on the following libraries :

Application Description

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)
CommandAnswers
AT+PMGRSTART?+PMGRSTART: <state>
OK
AT+PMGRSTART=?+PMGRSTART: (0-1)
OK
AT+PMGRSTART= <state> +CME ERROR: 3
or
OK
 
ParameterValues rangeDescriptionDefault value
state0-1The 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)
CommandAnswers
AT+PMGRINFO=?+PMGRINFO: (2)
OK
AT+PMGRINFO= <Port> +PMGRINFO : <Port>,<State>
OK
 
ParameterValues rangeDescriptionDefault value
Port2Port identifier to query (in hexadecimal format between 0 and FF) ;
please refer to ADL User Guide for more information.
mandatory
State0-1Port 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)
CommandAnswers
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
 
ParameterValues rangeDescriptionDefault value
Mode0-2Signal 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
Port2Port identifier to query (in hexadecimal format between 0 and FF) ;
please refer to ADL User Guide for more information.
mandatory
Signal0-1Port's signal to monitor
0 : port's CTS input signal
1 : port's DSR input signal
mandatory
State0-1Port'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;