New GSM module test



  • I just got the new GSM module (M6315). I can burn the EasyLoader successfully. After reboot, it shows a BLANK screen. If I burnt the GSM sample code from Arduino IDE to the M5stack, it shows a BLANK screen also. Is there anything I can try or have I missed anything?


  • M5Stack

    Hi @zw29 did you look at the Arduino code?

    #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(2, OUTPUT);
      digitalWrite(2, 0);
      delay(3000);
      digitalWrite(2, 1);
    }
    
    void loop() {
     if(M5.BtnA.wasReleased()){
        M5.Lcd.fillScreen(TFT_BLACK); 
        M5.Lcd.setCursor(60,80,2);
        get_time();
      }
    }
    
    

    The code really doesn't seem to do much other than fill the screen with black and supposedly print the time to the screen, Was there any output on the serial terminal?

    It looks as though it is simply a template and you need to add in your own AT commands. I do not have a GSM module to test unfortunately´╝îWhat is your intended use for the project?