AT+M2M=3

AT+M2M=3 starts the user M2M application execution in accordance with the level of DTR control line.

To perform the example described in the next chapter on DTE - refer to Fig. 5 - is installed the Telit AT Controller application because it provides the feature to change manually the DTR line. DTR is an output control line of the DTE, when it is low (active) informs the module that the DTE is ready to establish a communication.

For example, assume that the module has the factory-setting configuration +M2M=0,10,0, and no user M2M application installed on it. Power on the module and upload the user M2M application into /MOD directory (driver 0).

AT#M2MWRITE=”user_m2mapz.bin”,61684,1

>>> 

OK

 

Check the current +M2M value defining the application start mode on next reboot. AT+M2M?

+M2M: 0,10,0         à the execution of any application is disabled on next reboot (default)

OK

 

Force the DTR control line to low using the proper button provided by the Telit AT Controller application (click twice on the green DTR check marker, it becomes red). Enter the command below to reboot the module. DTR is low, the module starts the default M2M application because the just uploaded user application does not have the RUN permission, refer to Error! Reference source not found.

AT+M2M=3

OK

 

After rebooting, the default M2M application is executed and displays on DTE the following message:

Telit Communications S.p.A - AppZone M2M Default Application...

OK

 

The AT parser can still receive AT commands from the operator on the serial line. Check the current +M2M value stored in NVM after the previous rebooting.

AT+M2M?

+M2M: 3,10,0

OK

 

Force the DTR control line to high (click twice on the read DTR check marker, it becomes green), and power off/on the module. After rebooting, no M2M application is started (DTR is high), the operator may continue to enter AT commands into the module, refer to Error! Reference source not found..

Check the current +M2M value stored in NVM after the previous rebooting.

AT+M2M?

+M2M: 3,10,0

OK

 

Enter the next command to check which user M2M application has RUN permission.

AT#M2MRUN?

OK                                  à no user M2M application has RUN permission

 

Use the following command to set the RUN permission for user_m2mapz.bin application and reset RUN permission for all other applications included the default M2M application.

AT#M2MRUN=2,"user_m2mapz.bin"

OK

 

Check which M2M application has RUN permission.

AT#M2MRUN?

#M2MRUN: "user_m2mapz.bin"

OK

 

Force the DTR control line to low (click twice on the green DTR check marker, it becomes red), and power off/on the module, refer to Error! Reference source not found.. After rebooting, the user M2M application is started and displays on DTE, for example, the following message:

Hello World

 

The operator may not enter more AT commands into the module. The user M2M application has permanently captured the serial line. Follow the steps below to exit this scenario:

1.  Force the DTR control line to high (click twice on the read DTR check marker, it becomes green);

2.  Turn off/on the module.

After rebooting, no M2M applications have been started, the AT parser accepts again AT commands, refer to Error! Reference source not found.. Check the current +M2M value stored in NVM after the previous rebooting.

AT+M2M?

+M2M: 3,10,0

OK

The following table summarizes the four cases described.

DTR

Run Permission

Enter

Start

Low

No

AT+M2M=3

Default M2M Appl.

High

No

OFF/ON

No M2M Appl.

Low

Yes

OFF/ON

User M2M Appl.

High

Yes

OFF/ON

No M2M Appl.