This article instructs users to implement the application monitoring and control device via SMS using the OpenCPU solution on the M66 module, which is demoed on a GSM-EVB-KIT board with Quectel's M66-TE-A board.

     1.  Introduction of GSM-EVB-KIT


 

      GSM-EVB-KIT  is a board format developed by Quectel for the purpose of helping users test and evaluate the functionality of the GSM module, thereby accelerating the development and application development of the user. Board  GSM-EVB-KIT  supports all GSM module firm Quectel as: M10 / M12 / M72 / M75 / M95 / M66, ...

     For more information as well as a user manual for GSM-EVB-KIT board user refer to the document:  Quectel_GSM_EVB_User_Guide_V3.3.pdf  at  http://www.quectel.com/UploadImage/Downlad/Quectel_GSM_EVB_User_Guide_V3.3. .pdf

      2.  Introduction of M66-TE-A

          The M66  is an extremely compact GSM / GPRS module from Quectel that supports GSM, GPRS, SMS, protocols such as TCP, FTP, HTTP, HTTPS, ...

          A prominent feature of the M66 module is the  Open CPU. With this feature, users can load the controller into the microcontroller chip inside the M66 module to execute the application without the need for an additional external microcontroller, saving space when designing and spending. Production fee of the product. 

          Here are the memory resources that the M66 supports so that the user can use the Open CPU feature:

          On the other hand, the M66 also features Bluetooth 3.0 wireless technology that operates in the 2.4 GHz band of IEEE802.15, transmits data at high speeds (up to 3 Mbps), supports SPP and OPP improves connectivity, communication capabilities in user applications, and enhances product usability while still ensuring high-cost competitiveness.

          For ease of user study of M66 module features, Quectel has provided M66-TE-A full support for the M66 module.

 

   3. Application control and monitoring device via SMS

          To implement the application we perform the following steps:

           Step 1: Prepare

                                        • Hardware: + GSM-EVB-KIT board.

                                                           + M66-TE-A board.

                                        • Software: + GCC Compiler (Sorcery CodeBench Lite for ARM EABI).

                                                        + IDE: Eclipse (optional).

                                                        + Qflash .

           Step 2: Install the software

               The user installs the following packages:

                      Install GCC Compiler, on the user's guide to the documentation reference:

                                    Quectel_OpenCPU_GCC_Installation_Guide_V1.1.pdf

                      Tutorial on IDE: Eclipse (optional) User Reference Document:

                                   OpenCPU_GCC_Eclipse_User_Guide_V1 0_Preliminary.pdf

                      Guidance on installing and using Qflash users reference software:

                                   Quectel_QFlash_OpenCPU_User_Guide_V1.0.pdf

               All software packages, documentation and reference materials for the MCP OpenCPU solution are available for download at:

                      Http://www.quectel.com/qdownload/M66_OpenCPU_SDK.html 

          Step 3: Connect the hardware

            We use the single Led to simulate the regulator, the connection diagram between the M66 Module and the devices as shown below:

 

      Connect the corresponding device control pins on the GSM-EVB-KIT board

 

        Attach the GSM antenna and sim card to the GSM-EVB-KIT board then connect the GSM-EVB-KIT board and the M66-TE-A board. Proceed for power supply board for GSM-EVB-KIT board.

       Switch the POWER switch on the GSM-EVB-KIT board to the ON position for power

 

       Step 4: Load the application code for Module M66

           Users can download the source code in Module M66.

           The program downloaded after the download to the computer should be recompiled with the Eclipse software.

           We proceed to extract the file Demo_M66_OpenCPU.rar to the working directory of the Eclipse software under the  path: D:\OpenCPU\eclipse_workspace

 

     Then open Eclipse software and proceed to Import program file follow these steps: Go to File  ->  Import

  

       Select " Existing Projects into Workspace " -> click Next.

       Then click on " Select root directory " and then click Browse to the directory Demo_M66_OpenCPU extracted. 


       Select Finish to finish the import process.

           We modify the phone number in the code to send the message board to the state of the device.

 

 

           Then we modify the board password, password board is a sequence of 6 digits.

     Next step we proceed to recompile the program. First, we reset the Eclipse compilation operation to the following : Go to Project  ->  Build Configurations  ->  Set active  ->  Release .

  

      Compile the program: Go to Project  ->  Build Project

   

        Next we make "Make Target Build" to update the .bin file . Project  ->  Make Target ->  Build

       Click on GenBinHeader  -> select Build

  

       Users load programs into the M66 module via Qflash software.

      Connect the MAIN UART on the EVB-KIT board to the PC via the USB to UART cable and then open the Qflash software. Next, the user selects the COM port that is connected to the MAIN UART on the EVB- KIT, and Baudrate for the code load (Baudrate then suggested by the manufacturer is 460800).

         Next we proceed to download the program file: choose Load FW Files -> give the path to the program .cfg file, located in the folder Release :     

              D: \ OpenCPU \ eclipse_workspace \ Demo_M66_OpenCPU \ Release

  

         Select Open to execute, then in Module Type user select M66. Next, press Start on the Qflash software and at the same time switch the D/L switch on the EVB-KIT GSM board to the ON position (the switch from OFF to ON of the D/L switch should be no longer than 30 seconds from the start. On Qflash software ) to start loading the program for Module M66 .

 

        The process of loading the program into module M66. 

         Finish the process, load the program successfully.

       After loading the program, proceed to reboot the system, switch the D/L switch on the EVB-KIT GSM board to the OFF position, switch the POWER switch on the board to the OFF position and return to the ON position. Push the PWRKEY button on the board to activate the M66 Module boot process.

 

        We can monitor and monitor the operation of the M66 Module through the terminal software ( connect the PC to the EVB-KIT GSM board via DEBUG UART, Baudrate: 115200).

     Once the system has booted up, it will automatically send a " GSM Function is ready " message to the user's phone number (the phone number is changed in step 4).

     To control the device we send a message with the control syntax as follows:

#control‹distance›‹password›‹distance›‹key word›.

     In which keyword includes the following cases:

  • On 1
  • On 2
  • On 3
  • On 4
  • Off 1
  • Off 2
  • Off 3
  • Off 4

         Note: all control messages start with a sharp ( # ) and end with a dot ( . ) .

         After controlling the device, the board will report the device status to the phone number that has been installed.  

     4. Video demo