Closed t-az closed 7 months ago
Hello. I am having an issue where the SIM7000G will only power on if I push the reset button on the board to reboot the ESP32. If I unplug the USB and plug it back in, the SIM7000G never powers on. Any help would be appreciated. Thanks
Pin definitions and power functions
#define UART_BAUD 115200 #define PIN_DTR 25 #define PIN_TX 27 #define PIN_RX 26 #define PWR_PIN 4 #define LOCK_PIN 0 #define UNLOCK_PIN 36 #define REMOTESTART_PIN 39 void modemPowerOn(){ pinMode(PWR_PIN, OUTPUT); digitalWrite(PWR_PIN, LOW); delay(1080); digitalWrite(PWR_PIN, HIGH); } void modemPowerOff(){ pinMode(PWR_PIN, OUTPUT); digitalWrite(PWR_PIN, LOW); delay(1500); digitalWrite(PWR_PIN, HIGH); } void modemRestart(){ modemPowerOff(); delay(1000); modemPowerOn(); }
Setup function
void setup() { //Configure output pins pinMode(LOCK_PIN, OUTPUT); digitalWrite(LOCK_PIN, LOW); pinMode(UNLOCK_PIN, OUTPUT); digitalWrite(UNLOCK_PIN, LOW); pinMode(REMOTESTART_PIN, OUTPUT); digitalWrite(REMOTESTART_PIN, LOW); delay(1000); modemRestart(); delay(6000); // Set GSM module baud rate //TinyGsmAutoBaud(SerialAT, GSM_AUTOBAUD_MIN, GSM_AUTOBAUD_MAX); SerialAT.begin(115200, SERIAL_8N1, PIN_RX, PIN_TX); delay(2000); #if TINY_GSM_USE_GPRS // Unlock your SIM card with a PIN if needed if (GSM_PIN && modem.getSimStatus() != 3) { modem.simUnlock(GSM_PIN); } #endif if (!modem.waitForNetwork(600000L, true)) { delay(10000); return; } delay(3000); #if TINY_GSM_USE_GPRS // GPRS connection parameters are usually set after network registration modem.gprsConnect(apn, gprsUser, gprsPass); if (!modem.isGprsConnected()) { delay(10000); return; } #endif // MQTT Broker setup mqtt.setServer(broker, 8883); mqtt.setCallback(mqttCallback); }
Hello. I am having an issue where the SIM7000G will only power on if I push the reset button on the board to reboot the ESP32. If I unplug the USB and plug it back in, the SIM7000G never powers on. Any help would be appreciated. Thanks
Pin definitions and power functions
Setup function