Open AaronConvery opened 11 months ago
I have narrowed it down, I am getting successful get request logs on my server side indicating the communication is happening between my ESP my server however there is something closing the TCP connection as soon as the get request is happening on the arduino side resulting in no result being output to the serial. The only logs it displays is the below 10:34:14.587 -> +CIPOPEN: 0,0 10:34:14.624 -> AT+CIPCLOSE=0 10:34:14.624 -> 10:34:14.624 -> OK 10:34:14.624 -> Failed to make GET request, error: -1
[ ] I have read the Troubleshooting section of the ReadMe
What type of issues is this?
[ ] Request to support a new module
[ ] Bug or problem compiling the library [ ] Bug or issue with library functionality (ie, sending data over TCP/IP) [ ] Question or request for help
What are you working with?
Modem: SIM7600E-H Main processor board: ESP-32-WROVER-E TinyGSM version: 0.11.7 Code: /** *
**/
define TINY_GSM_MODEM_SIM7600
// Set serial for debug console (to the Serial Monitor, default speed 115200)
define SerialMon Serial
// Set serial for AT commands (to the module)
define SerialAT Serial1
// See all AT commands, if wanted // #define DUMP_AT_COMMANDS
// Define the serial console for debug prints, if needed
define TINY_GSM_DEBUG SerialMon
/*
define TINY_GSM_TEST_GPRS true
define TINY_GSM_TEST_TCP true
// powerdown modem after tests
define TINY_GSM_POWERDOWN true
// set GSM PIN, if any
define GSM_PIN ""
// Your GPRS credentials, if any const char apn[] = "your_apn"; // Your operator APN const char gprsUser[] = "your_gprs_user"; const char gprsPass[] = "your_gprs_password";
// Server details to test TCP/SSL const char server[] = "your_server"; const char resource[] = "/your_resource"; const int port = 443;
include
include
include "SSLClient.h"
include "utilities.h"
include "certs.h"
ifdef DUMP_AT_COMMANDS
include
StreamDebugger debugger(SerialAT, SerialMon); TinyGsm modem(debugger);
else
TinyGsm modem(SerialAT);
endif
// HTTPS Transport TinyGsmClient base_client(modem, 0); SSLClient secure_layer(&base_client); HttpClient client = HttpClient(secure_layer, server, port);
void setup() { // Set console baud rate SerialMon.begin(115200); delay(10);
}
void light_sleep(uint32_t sec ) { esp_sleep_enable_timer_wakeup(sec * 1000000ULL); esp_light_sleep_start(); }
void loop() { bool res ;
if TINY_GSM_TEST_GPRS
endif
if TINY_GSM_TEST_GPRS
endif
if TINY_GSM_TEST_TCP && defined TINY_GSM_MODEM_HAS_TCP
endif
if TINY_GSM_TEST_GPRS
endif
if TINY_GSM_POWERDOWN
endif
}
Scenario, steps to reproduce
When I use the example HTTPS Get code for the SIM7600 provided with the SSLClient library I can make a successful Get request to the given server and resource. However when I change the address to my specific server and resource it keeps closing the connection straight after making the request then re-opening it and closing again with an error. I can see on my server side that it is actually logging the get requests as successful with status code 200 but it never prints in my serial
Expected result
I should be receiving the expected string back from my server after a successful get request
Actual result
Below are the logs of what Im actually getting with server name redacted 10:11:45.493 -> [1521] Connecting to [server] 10:11:45.532 -> Making GET request securely... 10:11:45.532 -> AT+CIPCLOSE=0 10:11:45.532 -> 10:11:45.532 -> +CIPCLOSE: 0,4 10:11:45.532 -> 10:11:45.532 -> ERROR 10:11:45.532 -> AT+CIPRXGET=1 10:11:45.532 -> 10:11:45.532 -> OK 10:11:45.532 -> AT+CIPOPEN=0,"TCP","[server]",443 10:11:45.532 -> 10:11:45.532 -> OK 10:11:45.736 -> 10:11:45.736 -> +CIPOPEN: 0,0 10:11:45.736 -> AT+CIPCLOSE=0 10:11:45.736 -> 10:11:45.736 -> OK 10:11:45.736 -> Failed to make GET request, error: -1 10:11:45.736 -> Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Debug and AT command log