Files
2021-02-26 17:27:20 +08:00

5.6 KiB
Raw Permalink Blame History

Module GSM {docsify-ignore-all}

   


📝Description      🔌Schematic      :octocat:Code      EasyLoader       🛒Purchase

Description

This is a 2G and industrial wireless communication module, integrated an GSM/GPRS module M6315, released by China Mobile, supported GPRS class12 and GPRS CS-1, CS-2, CS-3, CS-4 encode, M6315 has LCC package type, features tiny dimension, highly reliability, strong anti-interference capability.
It can apply to the comunication requirement on diversity industrial, electricity, petroleum, transportation, financial, etc

In the GSM module scheme, we added more hardware resources, 1 reserved speaker- SPK1, 1 onboard speaker-SPK2, LEDs, 2 alternative antenna.
M6315 is 2.8V power input, so in the hardware of GSM module, we added a Bidirectional Voltage-Level Translator (TXS0104E), to switch the power supply to 2.8V.

Power Operation:

  • Power On: GPIO2 stay HIGH for 2s
  • Power Off: GPIO2 stay HIGH for 8s
  • Power On: Button long-press for 2s
  • Power Off: Button long-press for 8s
  • Reset module: GPIO26 HIGH




The Global System for Mobile Communications (GSM) is a standard developed by the European Telecommunications Standards Institute (ETSI) to describe the protocols for second-generation (2G) digital cellular networks used by mobile devices such as mobile phones and tablets.

Product Features

Product Feature:

  • Serial communication: Uart 16/17
  • Alternative Antenna
  • GSM 2G industrial level
  • SIM card type: Nano
  • 2x LEDs
  • 2X speakers: SPK1 reserved, SPK2 connected to PIN25
  • M6315
    • Tem-40°C ~ + 85°C
    • Frequency BandMHz:
      • 850/900/1800/1900
    • Data Transmit:
      • spped: (kbps) 85.6(UL)/85.6(DL)
      • GPRS: Class12
      • SMS: supported PDU/TEXT mode
      • Network Protocol: IPV4/IPV6*/TCP/UDP/PPP/HTTP/FTP/MQTT
    • Consumption:
      • <2mA@DRX=5
  • Product Size54.2mm x 54.2mm x 12.8mm
  • Product weight12.8g

Include

  • 1x GSM module

Application

  • M2M industrial
  • Wireless communication
  • Industrial Application

Schematic

EasyLoader

click to download EasyLoade

1.EasyLoader is a simple and fast program burner. Every product page in EasyLoader provides a product-related case program. It can be burned to the master through simple steps, and a series of function verification can be performed.(Currently EasyLoader is only available for Windows OS)

2.After downloading the software, double-click to run the application, connect the M5 device to the computer via the data cable, select the port parameters, and click "Burn" to start burning.

!>3.The CP210X (USB driver) needs to be installed before the EasyLoader is burned. Click here to view the driver installation tutorial

Code

1. Arduino IDE

To get complete code, please click here.

#include <M5Stack.h>

void IotWriteCommand(char cmd[],char date[]){
  char buf[256] = {0};
  if(cmd == NULL)
  sprintf(buf,"AT\r\n");
  else if(date == NULL)
  sprintf(buf,"AT+%s\r\n",cmd);
  else
  sprintf(buf,"AT+%s=%s\r\n",cmd,date);
  
  Serial2.write(buf);
}
//AT+CSQ=?
void get_time(void){
  IotWriteCommand("CSQ=?",NULL);
  while(Serial2.available()){
    uint8_t ch = Serial2.read();
    Serial.write(ch);
    M5.Lcd.write(ch);
  }
}

void setup() {
  M5.begin();
  Serial.begin(115200);
  Serial2.begin(115200, SERIAL_8N1, 16, 17);
  pinMode(5, OUTPUT);
  digitalWrite(5, 1);
}

void loop() {
 if(M5.BtnA.wasReleased()){
    M5.Lcd.fillScreen(TFT_BLACK); 
    M5.Lcd.setCursor(60,80,2);
    get_time();
  }
}


Pin Map

M5StackGPIO16GPIO175VGND
GSM ModuleRXTX5VGND