-
Notifications
You must be signed in to change notification settings - Fork 732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTPClient.h and ArduinoHttpClient.h side by side #283
Comments
What version of the ESP32 core are you using? It is this problem: #269 |
Hello, no. I get slightly different error (i got the one you suggested but i applied fix toTinyGsmClientSIM800.h) after that i now get:
sketch_may18a:88:12: error: cannot declare variable 'http' to be of abstract type 'HttpClient'
HttpClient http(client, server, port);
I copy-pasted HTTPClient.ino example from GIT
[softLabLogo87x25]
Tomislav Kralj
Voditelj razvoja
+385 091 724-0724 (mob)
[email protected]
Softlab obrt
S. Radića 16, 10430 Samobor
Croatia
www.softlab.hr
From: Sara Damiano <[email protected]>
Sent: Saturday, May 18, 2019 1:13 PM
To: vshymanskyy/TinyGSM <[email protected]>
Cc: Tomislav <[email protected]>; Author <[email protected]>
Subject: Re: [vshymanskyy/TinyGSM] HTTPClient.h and ArduinoHttpClient.h side by side (#283)
What version of the ESP32 core are you using?
It is this problem: #269<#269>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#283?email_source=notifications&email_token=AH6ST2W2PYX52XSLTVG23G3PV7QFHA5CNFSM4HNZ474KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVWMUNI#issuecomment-493668917>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AH6ST2W6DVLYNA2ELFRIYM3PV7QFHANCNFSM4HNZ474A>.
|
The compiler problems with the ESP32 and ESP8266 should now be fixed. |
I'm still getting the error with my ESP32 and SIM868
|
Ok, sorry, I'm seeing the issue now. This isn't something TinyGSM can fix. The ArduinoHTTPClient library just isn't compatible with ESP32 core v1.0.2. The powers in the ESP32 world added extra virtual functions to their core Client.h that are not in the Arduino standard. That breaks compatibility with every other type of Arduino library that uses a Client. I overhauled TinyGSM to make it compatible with v1.0.2, but ArduinoHTTPClient isn't. You'll have to roll back to 1.0.1, comment out the extra virtual functions as here, or hand-do the http requests using a web client. Also, I'd suggest commenting on the issue for the ESP32 core: espressif/arduino-esp32#2755 |
Hello, or maybe it's something else because i did roll back to esp32 1.0.1 core and commented out two lines in Client.h and i use tinygsm 0.7.4 but it still does not work 😊 I guess i will have to do it using web client.
But TinyGSM seemed so promissing and realy well to me.
[softLabLogo87x25]
Tomislav Kralj
Voditelj razvoja
+385 091 724-0724 (mob)
[email protected]
Softlab obrt
S. Radića 16, 10430 Samobor
Croatia
www.softlab.hr
From: Sara Damiano <[email protected]>
Sent: Thursday, May 23, 2019 5:47 PM
To: vshymanskyy/TinyGSM <[email protected]>
Cc: Tomislav <[email protected]>; Author <[email protected]>
Subject: Re: [vshymanskyy/TinyGSM] HTTPClient.h and ArduinoHttpClient.h side by side (#283)
Ok, sorry, I'm seeing the issue now. This isn't something TinyGSM can fix. The ArduinoHTTPClient library just isn't compatible with ESP32 core v1.0.2. The powers in the ESP32 world added extra virtual functions to their core Client.h that are not in the Arduino standard. That breaks compatibility with every other type of Arduino library that uses a Client. I overhauled TinyGSM to make it compatible with v1.0.2, but ArduinoHTTPClient isn't. You'll have to roll back to 1.0.1, comment out the extra virtual functions as here<#269 (comment)>, or hand-do the http requests using a web client.
Also, I'd suggest commenting on the issue for the ESP32 core: espressif/arduino-esp32#2755<espressif/arduino-esp32#2755>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#283?email_source=notifications&email_token=AH6ST2SHLQDM3VIONRWNNKLPW236PA5CNFSM4HNZ474KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWCUYEQ#issuecomment-495275026>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AH6ST2VKIRXLS3UH57CZCNDPW236PANCNFSM4HNZ474A>.
|
It builds for me TinyGSM 0.7.4, ESP32 core v1.0.1, and ArduinoHttpClient 0.4.0. It also builds for me if I use ESP32 core v1.0.2 but comment out the two offending lines in Cores/esp32/Client.h. |
Hello Sara, it builds for me also but it does not work well. It's not problem with build. I can build and run code but code does not run as it should. Instead it loops without getting response even though TinyGSM downloaded the file because i can see it in debug mode.
[softLabLogo87x25]
Tomislav Kralj
Voditelj razvoja
+385 091 724-0724 (mob)
[email protected]
Softlab obrt
S. Radića 16, 10430 Samobor
Croatia
www.softlab.hr
From: Sara Damiano <[email protected]>
Sent: Thursday, May 23, 2019 8:46 PM
To: vshymanskyy/TinyGSM <[email protected]>
Cc: Tomislav <[email protected]>; Author <[email protected]>
Subject: Re: [vshymanskyy/TinyGSM] HTTPClient.h and ArduinoHttpClient.h side by side (#283)
It builds for me TinyGSM 0.7.4, ESP32 core v1.0.1, and ArduinoHttpClient 0.4.0. It also builds for me if I use ESP32 core v1.0.2 but comment out the two offending lines in Cores/esp32/Client.h.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#283?email_source=notifications&email_token=AH6ST2UDWVQPU7CUETYSVTLPW3Q53A5CNFSM4HNZ474KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWDEIRA#issuecomment-495338564>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AH6ST2TJKRS5HAJIAF3NKM3PW3Q53ANCNFSM4HNZ474A>.
|
Hello Sara, would it be too much trouble to try to make TinyGSM compatible with ESP32 HTTPClient.h also along with ? ArduinoHTTPClient ?
So for example i could code something like this:
TinyGsmClient client(modem);
HTTPClient http(client, server, port); // this is HTTPclient from esp32 libraries folder.
Best regards
[softLabLogo87x25]
Tomislav Kralj
Voditelj razvoja
+385 091 724-0724 (mob)
[email protected]
Softlab obrt
S. Radića 16, 10430 Samobor
Croatia
www.softlab.hr
From: Sara Damiano <[email protected]>
Sent: Thursday, May 23, 2019 8:46 PM
To: vshymanskyy/TinyGSM <[email protected]>
Cc: Tomislav <[email protected]>; Author <[email protected]>
Subject: Re: [vshymanskyy/TinyGSM] HTTPClient.h and ArduinoHttpClient.h side by side (#283)
It builds for me TinyGSM 0.7.4, ESP32 core v1.0.1, and ArduinoHttpClient 0.4.0. It also builds for me if I use ESP32 core v1.0.2 but comment out the two offending lines in Cores/esp32/Client.h.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#283?email_source=notifications&email_token=AH6ST2UDWVQPU7CUETYSVTLPW3Q53A5CNFSM4HNZ474KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWDEIRA#issuecomment-495338564>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AH6ST2TJKRS5HAJIAF3NKM3PW3Q53ANCNFSM4HNZ474A>.
|
I had the same problem. The build was fine with 1.0.1 and some of the ArduinoHttpClient's functions worked just as desired but when I tried to do a basic http GET-request with TinyGSM's example-sketch it gets stuck and never prints out the response. According to the debug output I believe it has something to do with the fact that ArduinoHttpClient is designed for 16 bit integers and ESP32 uses 32 bit integers. |
I am working to solve the bugs with the SIM800, but I don't have time to work on specific ESP32 core library compatibility problems. |
It seems like the problem is not just with the HttpClient, but also with the TinyGSM library since in the Diagnostics-sketch the code uses only TinyGSMClient to do the http-request but still can't print out the response body. Debug log shows the output just as supposed but you can't save it to any variable. |
Nevermind, I updated the library and it seems to be working now |
@uuperi Which library did you update? I get the same error today, using what is supposed to be the latest of both TinyGSM and ArduinoHTTPClient for an ESP32 based project, testing on the HttpClient.ino (from TinyGSM). |
@eabase the TinyGSM library. You are using ESP32 board version 1.0.1 right? |
@uuperi |
Hi, I am testing with platformIO: PLATFORM: Espressif 32 (2.0.0) > DOIT ESP32 DEVKIT V1 And it doesn´t work. Does anyone have any sugestion to posting http data over GPRS without using the HTTPClient.h library for ESP32 without have to downgrade the esp32 core? Thanks. |
@alexandreberg The issue being discussed here last summer was only an issue with core version 1.0.2, and the issue was related to compiling the library, not using it. Based on the little bit you posted (ie, the reference to "WiFiGeneric.cpp) I'm guessing you're improperly trying to supply the esp core's wifi libraries with a GSM client. That will simply not work: #422 (comment) |
It would be very much appreciated if someone would have a combined example of:
I've been trying to combine the ArduinoHTTP requests and the one from TinyGSM but the latter only has a GET and the first seems to have issues working with the TinyGSMSecure variant. Some help would be greatly appreciated. |
Hi this example is working and makes a post with HTTPd, not HTTPS and sends data do a mysql database stored in BlueHost. The sketch: // Teste com buzzer // Your GPRS credentials (leave empty, if not needed) // SIM card PIN (leave empty, if not defined) // Server details // Keep this API Key value to be compatible with the PHP code provided in the project page. #define MODEM_RX PB10 // Set serial for debug console (to Serial Monitor, default speed 115200) // Configure TinyGSM library // Define the serial console for debug prints, if needed #include <Wire.h> #ifdef DUMP_AT_COMMANDS // TinyGSM Client for Internet connection #define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds / #define IP5306_ADDR 0x75 void setup() { //Buzzer delay(3000); // Unlock your SIM card with a PIN if needed void loop() { SerialMon.print("Connecting to APN: ");
} platformio.ini file: [env:bluepill_f103c8] ;STM32duino lib_deps = Hope it may help you. |
I have to echo this request. I am running against walls trying to get HTTPS to work in any way. |
I have spent over 2,5 week finding a way to get this to work properly. Since I developed this for my company, I'm not at liberty to share any code with you. |
@genotix Nice of you to take advantage of other people's work but not to share back. That's the way to keep open source alive and kicking.... |
@datamann, as you can see on my profile I will share sourcecode when I develop something myself or when I extend sources of others. I have been doing so way before Github even existed and I am very well aware of the GNU/GPL. This is a contribution I did in 2003 on the Gentoo platform: As I said, in this case I am not allowed to submit sourcecode, I simply am not at liberty. I contribute my part to the community, just you worry about your own contributions. I have spent reading about 2000 articles for 2,5 weeks and ended up writing a very specific implementation in 2,5 days with the tip I provided above. I just saved you about 15 days, start coding. |
Hello. I would like to use HTTPClient.h and ArduinoHttpClient.h side by side. It seems that this two libs cannot co-exist together. I'm using HTTPClient.h with ESP32 to GET / POST but unfortunately I cannot use TinyGsm with this HTTPClient also. The problem is when I include ArduinoHttpClient.h i get compile errors:
The code is:
TinyGsmClientSecure client_gsm(modem);
const char server[] = "vsh.pp.ua";
const char resource[] = "/TinyGSM/logo.txt";
const int port = 443;
HttpClient http = HttpClient(client_gsm, server, port);
And the error i get:
networkgsm:24:54: error: invalid cast to abstract class type 'HttpClient'
HttpClient http (client_gsm, server, port);
Is there a way to get around it ?
The text was updated successfully, but these errors were encountered: