-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
status code -2 not able to get correct response #101
Comments
The following fields are missing: Description, Steps to Reproduce, Expected Behavior, Actual Behavior, Environment, IDE. Please update the issue with this information. |
HI @Manojkumar0308 Generally, -2 reflects something occurring at the transport layer - the one level down from this. So the TinyGSM transport. -2 often reflects some sort of timeout - i.e. flaky connection. Are you in Arduino IDE or PlatformIO? Be good to see you code and also some debug level serial output. |
I am using Arduino IDE Sir
…On Fri, 26 Jul 2024 at 2:32 PM, Robert Byrnes ***@***.***> wrote:
HI @Manojkumar0308 <https://github.com/Manojkumar0308> Generally, -2
reflects something occurring at the transport layer - the one level down
from this. So the TinyGSM transport. -2 often reflects some sort of timeout
- i.e. flaky connection.
Are you in Arduino IDE or PlatformIO? Be good to see you code and also
some debug level serial output.
—
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXER5PK37EEJSWDRN7W7VA3ZOIGEDAVCNFSM6AAAAABLOIIY42VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJSGI4TENZQGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
15:03:39.784 -> [3495] Connecting to Whats wrong with this example https_7600.ino why i am getting this I am using this module https://github.com/Vajravegha/VVM501_ESP32_4GLTE_MODULE/blob/main/Datasheets/VVM501%20ESP32%204G%20LTE%20MODULE.pdf |
@Manojkumar0308 Looks like these: 15:03:39.904 -> Making GET request securely...
15:03:53.178 -> [16854] ### Unhandled: +CIPCLOSE: 0,0
15:04:24.150 -> Status code: -2
15:04:24.150 -> Response:
15:04:30.160 -> [53873] ### Unhandled: +NETOPEN: 0 are coming from the TinyGSM not the SSLClient. How is your client set up? Need to see your code. |
#define TINY_GSM_MODEM_SIM7600 // SIM7600 AT instruction is compatible with A7670 char a, b; const char apn[] = ""; //APN automatically detects for 4G SIM, NO NEED TO ENTER, KEEP IT BLANK #ifdef DUMP_AT_COMMANDS void setup() pinMode(powerPin, OUTPUT); Serial.println("\nconfiguring VVM501 Module. Kindly wait"); delay(10000); SerialAT.begin(115200, SERIAL_8N1, RXD2, TXD2); // Restart takes quite some time String name = modem.getModemName(); String modemInfo = modem.getModemInfo(); Serial.println("Waiting for network..."); if (modem.isNetworkConnected()) { // GPRS connection parameters are usually set after network registration if (modem.isGprsConnected()) { //Add CA Certificate }
} 14:30:06.975 -> Connecting to success |
check my code |
-2 is coming from HttpClient library. As a timeout as in a lack of response on that endpoint. You should check you cert. You are setting it with root_ca but I don't see the include? is this in ssl_web.h? Other thing I would check is Serial.print() the server url and resource just before making the GET request. You can also capture and output the return value of the GET request itself. Have a look at the HttpClient code for what to expect for success and fail. |
//CA Certificate for www.howsmyssl.com (valid until 12-03-2027) The certificate is also correct i just copied your code its not a problem with httpclient i guess its fail to set certificate use any library including ArduinoHttpClient library still i am getting the same. I am using ESP 32 -WROOM chip with A7672S simcom module |
Okay I have just visited const char root_ca[] PROGMEM =
"-----BEGIN CERTIFICATE-----\n"
"MIIDrDCCAzKgAwIBAgISA0E1OqsFacxPlesosguHQchAMAoGCCqGSM49BAMDMDIx\n"
"CzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MQswCQYDVQQDEwJF\n"
"NTAeFw0yNDA2MjkxMDE2MzVaFw0yNDA5MjcxMDE2MzRaMBQxEjAQBgNVBAMTCXZz\n"
"aC5wcC51YTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABFQS4s3BahgzL0kMSlcn\n"
"sd6YacXTH1mAu+bemjYQCUaML9ae5y1Bmqop0703GipllP9YwMXhckUeWD4lXg4q\n"
"Q1ajggJEMIICQDAOBgNVHQ8BAf8EBAMCB4AwHQYDVR0lBBYwFAYIKwYBBQUHAwEG\n"
"CCsGAQUFBwMCMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFITZnaeHoqIsWozAVrkr\n"
"+uoDPP74MB8GA1UdIwQYMBaAFJ8rX888IU+dBLftKyzExnCL0tcNMFUGCCsGAQUF\n"
"BwEBBEkwRzAhBggrBgEFBQcwAYYVaHR0cDovL2U1Lm8ubGVuY3Iub3JnMCIGCCsG\n"
"AQUFBzAChhZodHRwOi8vZTUuaS5sZW5jci5vcmcvME4GA1UdEQRHMEWCDmtodGMu\n"
"dnNoLnBwLnVhggtsLnZzaC5wcC51YYIMcXIudnNoLnBwLnVhggl2c2gucHAudWGC\n"
"DXd3dy52c2gucHAudWEwEwYDVR0gBAwwCjAIBgZngQwBAgEwggEDBgorBgEEAdZ5\n"
"AgQCBIH0BIHxAO8AdQAZmBBxCfDWUi4wgNKeP2S7g24ozPkPUo7u385KPxa0ygAA\n"
"AZBjthNHAAAEAwBGMEQCIBybCTv2ElV1Lh6Gl/Js+ITHFPV1Z8SK3HkoKhOF9W0r\n"
"AiA6Go1u2kAV6i5XEs6TdR9Seu698LXueFHkxfhMC5py7gB2AO7N0GTV2xrOxVy3\n"
"nbTNE6Iyh0Z8vOzew1FIWUZxH7WbAAABkGO2E1IAAAQDAEcwRQIhAJAVX/K0o7MT\n"
"t8tfe3IavYKdIdMeaSV+/nunKmNRSzjTAiBczdAoqnqLv+Btb5HFHZc6IscMuX7T\n"
"bapXofm45XytYjAKBggqhkjOPQQDAwNoADBlAjBZxJdkF6POxGiY0rUbcIJypOzI\n"
"EepAgEsyrYnT0td6jO3bdHGH+EfsEN1HnLpnLT8CMQCz0W1E+HwS56FSQiqPMQR6\n"
"cYj1x3rD00xq+BpQIHPeCpXesIp4sHlAMmN3HK5DZac=\n"
"-----END CERTIFICATE-----"; try this one instead and see how you get on? |
@Manojkumar0308 I have modified the sketch you copied to allow for my modem being sim800l not sim7600 - my output will be different to yours but basically it works using the the actual latest ISRG Root X1 certificate: Here is my output: rst:0x5 (DEEPSLEEP_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1448
load:0x40078000,len:14844
ho 0 tail 12 room 4
load:0x40080400,len:4
load:0x40080404,len:3356
entry 0x4008059c
Initializing modem...
Modem Name: SIMCOM_Ltd SIMCOM_SIM800L
Modem Info: SIM800 R14.18
Waiting for network...Network connected
Connecting to: giffgaff.com
CCID: 8944110068768898509f
IMEI: 862749051467586
IMSI: 234107596187242
Operator: O2
Network Mode: 0
Local IP: 10.147.235.68
Signal quality: 23
Failed to retrieve IP address
IP Address for www.google.com is 216.239.38.120
Connecting to vsh.pp.ua
Making GET request securely...
Status code: 200
Response:
_____ _____ _____ _____
| | |\ | \_/ | ___ |_____ | | |
| | | \| | |_____| _____|| | |
GPRS disconnected
Poweroff. and here the is correct cert: const char root_ca[] PROGMEM =
"-----BEGIN CERTIFICATE-----\n"
"MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAw\n"
"TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh\n"
"cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4\n"
"WhcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQGEwJVUzEpMCcGA1UEChMgSW50ZXJu\n"
"ZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMTDElTUkcgUm9vdCBY\n"
"MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJHP0FDfzm54rVygc\n"
"h77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbESTtrFj/RQSa78f0uoxmyF+\n"
"0TM8ukj13Xnfs7j/EvEhmkvBioZxaUpmZmyPfjxwv60p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
"TkXWStAmzOVyyghqpZXjFaH3pO3JLF+l+/+sKAIuvtd7u+Nxe5AW0wdeRlN8NwdC\n"
"jNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZAJzVc\n"
"oyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq\n"
"4RgqsahDYVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPA\n"
"mRGunUHBcnWEvgJBQl9nJEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57d\n"
"emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc=\n"
"-----END CERTIFICATE-----"; |
which microcontroller you are using sir.I will do it for tomorrow then i
will use the given certificate by you and just copy paste your code and
will see the output sir i will change SIM800L to SIM7600 because i am using
it with esp 32 wroom microcontroller.
…On Tue, 30 Jul 2024 at 8:53 PM, Robert Byrnes ***@***.***> wrote:
@Manojkumar0308 <https://github.com/Manojkumar0308> I have modified the
sketch you copied to allow for my modem being sim800l not sim7600 - my
output will be different to yours but basically it works using the the
actual latest ISRG Root X1 certificate:
Here is my output:
rst:0x5 (DEEPSLEEP_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1448
load:0x40078000,len:14844
ho 0 tail 12 room 4
load:0x40080400,len:4
load:0x40080404,len:3356
and here the is correct cert:
const char root_ca[] PROGMEM ="-----BEGIN CERTIFICATE-----\n""MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAw\n""TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IF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iIyBpY9umbbjANBgkq\n""hkiG9w0BAQsFAAOCAgEAVR9YqbyyqFDQDLHYGmkgJykIrGF1XIpu+ILlaS/V9lZL\n""ubhzEFnTIZd+50xx+7LSYK05qAvqFyFWhfFQDlnrzuBZ6brJFe+GnY+EgPbk6ZGQ\n""3BebYhtF8GaV0nxvwuo77x/Py9auJ/GpsMiu/X1+mvoiBOv/2X/qkSsisRcOj/KK\n""NFtY2PwByVS5uCbMiogziUwthDyC3+6WVwW6LLv3xLfHTjuCvjHIInNzktHCgKQ5\n""ORAzI4JMPJ+GslWYHb4phowim57iaztXOoJwTdwJx4nLCgdNbOhdjsnvzqvHu7Ur\n""TkXWStAmzOVyyghqpZXjFaH3pO3JLF+l+/+sKAIuvtd7u+Nxe5AW0wdeRlN8NwdC\n""jNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZAJzVc\n""oyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq\n""4RgqsahDYVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPA\n""mRGunUHBcnWEvgJBQl9nJEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57d\n""emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc=\n""-----END CERTIFICATE-----";
—
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXER5PNKQH6BSVEOUEYJXKDZO6VXZAVCNFSM6AAAAABLOIIY42VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJYGYZDANRTGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I got this error of status code -2 with your https_get_7600.ino code Compile error gone which comes yesterday but I just simply copied your code and run and i got this I am using A7672S Gsm module with ESP32 Wroom chip
Output---->
Modem Name: INCORPORATED A7672S-LASC
16:02:26.819 -> [1001] Modem Info: Manufacturer: INCORPORATED Model: A7672S-LASC Revision: A7672M6_V1.11.1 IMEI: 864180054656835 +GCAP: +CGSM,+FCLASS,+DS
16:02:26.859 -> [1016] Waiting for network...
16:02:26.859 -> [1027] Network connected
16:02:26.859 -> [1027] Connecting to
16:02:26.897 -> [1073] GPRS status: connected
16:02:26.897 -> [1080] CCID: 8991000921182727403F
16:02:26.930 -> [1085] IMEI: 864180054656835
16:02:26.930 -> [1090] IMSI: 405540465244694
16:02:26.930 -> [1096] Operator: 40554
16:02:26.930 -> [1101] Network Mode: 8
16:02:26.930 -> [1108] Local IP: 100.89.151.57
16:02:26.930 -> [1113] Signal quality: 19
16:02:26.967 -> [1125] Connecting to vsh.pp.ua
16:02:26.967 -> Making GET request securely...
16:02:29.971 -> [4114] ### Unhandled: +CIPSEND: 0,286,286
16:03:01.112 -> Status code: -2
16:03:01.112 -> Response:
16:03:01.202 -> [35345] ### Unhandled: +CIPCLOSE: 0,0
16:03:07.158 -> [41358] ### Unhandled: +NETOPEN: 0
16:03:07.158 ->
16:03:07.158 -> OK
16:03:12.127 -> [41358] GPRS disconnected
The text was updated successfully, but these errors were encountered: