Skip to content

T-SIM7000G Quick Start

Required Libraries

LibraryVersionSource
TinyGSMLatestGitHub
TinyGPSPlusLatestGitHub

Arduino

  1. Install VS Code and the PlatformIO IDE extension
  2. Clone the repository:
    bash
    git clone https://github.com/Xinyuan-LilyGO/LilyGO-T-SIM7000G.git
  3. Open platformio.ini and select the target example
  4. Click to build, connect via Micro USB, click to upload

Arduino IDE

1. Install ESP32 Board Support

  1. Open Arduino IDE → FilePreferences
  2. Add to "Additional Board Manager URLs":
    https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
  3. Go to ToolsBoardBoards Manager, search esp32, install esp32 by Espressif Systems

2. Board Settings

SettingValue
BoardESP32 Wrover Module
Upload Speed921600
CPU Frequency240 MHz (WiFi)
Flash Size4 MB (32Mb)
Partition SchemeHuge APP (3MB No OTA/1MB SPIFFS)
PSRAMEnabled

3. Upload

Connect via Micro USB and click Upload.


Examples

ExampleDescription
HTTP_POSTHTTP POST via NB-IoT/LTE-M
MQTT_PublishMQTT publish over cellular
GPS_TestGNSS location fix
SMS_SendSMS messaging
FactoryFull factory test

Peripheral Examples

NB-IoT / LTE-M Data (TinyGSM)

cpp
#define TINY_GSM_MODEM_SIM7000
#include <TinyGsmClient.h>

// SIM7000G UART: RX=26, TX=27, PWR_PIN=4
HardwareSerial modemSerial(1);
TinyGsm modem(modemSerial);

void setup() {
  Serial.begin(115200);
  modemSerial.begin(9600, SERIAL_8N1, 26, 27);
  // Power on modem
  pinMode(4, OUTPUT);
  digitalWrite(4, HIGH); delay(1000);
  digitalWrite(4, LOW);  delay(3000);

  modem.restart();
  Serial.println("Modem: " + modem.getModemInfo());
  modem.setNetworkMode(38); // LTE-M + NB-IoT
  modem.gprsConnect("your.apn", "", "");
  Serial.println("Connected: " + String(modem.isGprsConnected()));
}

void loop() { delay(1000); }

GPS (SIM7000G built-in GNSS)

cpp
void setup() {
  // modem already initialized
  modem.enableGPS();
  Serial.println("GPS enabled");
}

void loop() {
  float lat, lon, speed, alt;
  int vsat, usat;
  if (modem.getGPS(&lat, &lon, &speed, &alt, &vsat, &usat)) {
    Serial.printf("Lat: %.6f Lon: %.6f Sats: %d\n", lat, lon, usat);
  }
  delay(2000);
}

FAQ

Q: Modem not responding?
A: Insert a valid nano SIM. Connect both LTE and GPS antennas. Use PWR_PIN to power on the SIM7000G module before sending AT commands.

Q: GPS not getting a fix?
A: Move outdoors. Cold start takes 1–3 minutes with a clear sky view. Ensure the GPS antenna is connected.