Skip to content

A7670E (LILYGO T-SIM-A7670E) cannot establish GPRS or TCP connection #846

@ollio

Description

@ollio

Environment

  • Board: LILYGO T-SIM-A7670E (ESP32)
  • Modem: SIMCom A7670E-LNXY-UBL
  • Library: TinyGSM (official, v0.12.x)
  • APN: sensor.net (1NCE IoT SIM, private VPN)
  • Firmware: AT+CGMR → A7670E_LNXY_UBL (no embedded IP stack)
  • Connection target: TCP server at 10.64.0.2:8000 (reachable over VPN)

Minimal reproducible example

#define TINY_GSM_MODEM_A7670
#include <TinyGsmClient.h>

#define MODEM_BAUDRATE 115200
#define MODEM_TX_PIN 26
#define MODEM_RX_PIN 27
#define BOARD_PWRKEY_PIN 4
#define BOARD_POWERON_PIN 12
#define SerialAT Serial1

TinyGsm modem(SerialAT);
TinyGsmClient client(modem);

void setup() {
  Serial.begin(115200);
  delay(1000);

  pinMode(BOARD_POWERON_PIN, OUTPUT);
  digitalWrite(BOARD_POWERON_PIN, HIGH);
  pinMode(BOARD_PWRKEY_PIN, OUTPUT);
  digitalWrite(BOARD_PWRKEY_PIN, HIGH);
  delay(500);
  digitalWrite(BOARD_PWRKEY_PIN, LOW);
  delay(5000);

  SerialAT.begin(MODEM_BAUDRATE, SERIAL_8N1, MODEM_RX_PIN, MODEM_TX_PIN);

  if (!modem.restart()) Serial.println("Modem failed");
  if (!modem.waitForNetwork()) Serial.println("No network");

  if (!modem.ping("10.64.0.2")) Serial.println("Ping failed");
  if (!modem.gprsConnect("sensor.net", "", "")) Serial.println("GPRS failed");

  if (client.connect("10.64.0.2", 8000))
    client.println("{\"signal\":\"GO_LEFT\"}");
  else
    Serial.println("TCP connect failed");
}

void loop() {}

Observed behaviour

  • The modem registers to LTE network (+CEREG: 0,5)
  • modem.gprsConnect() always fails
  • client.connect()TCP connect failed
  • AT commands such as AT+NETOPEN, AT+IPINIT, AT+CIPOPEN, and AT+CIPRXGET=1 return ERROR

Expected behaviour

  • The modem should establish a data connection via APN sensor.net
  • A TCP socket connection to the given IP/port should succeed
  • The examples like HTTPClient, MQTTClient from the TinyGSM_Fork lib should work

Additional notes

  • I have tried to update the firmware like suggested in the documentation, but the flash tool fails and the firmware is still the old version.

Thanks for maintaining TinyGSM – this board is becoming popular, and I’d be happy to test any fixes or patches.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions