Hello,
I'm using Wio LTE library to controlling my Quectel EC21 Gsm+Gps module.
I need to get data from a web page with http get method.
The httpGET function is on ethernet.h but its empty function and not located on ethernet.cpp.
There is another way to query get, TCP IP method but I coudnt succeeded.
Here is my code;
#include "ethernet.h"
Ethernet eth = Ethernet();
// APN setting here
const char apn[25] = "internet";
// https://webhook.site/457acaa4-ea36-459a-a8c8-b275a21a5df2
const char URL[100] = "webhook.site";
char http_cmd[100] = "GET /457acaa4-ea36-459a-a8c8-b275a21a5df2 HTTP/1.0\r\n\r\n";
int port = 80;
int ret = 0;
void setup() {
// Power up the modem...
Serial.begin(9600);
Serial.println("Begin...");
eth.Power_On();
while (false == eth.Check_If_Power_On()) {
Serial.println("Waitting for module to alvie...");
delay(1000);
}
// Initialization
while (!eth.init()) {
delay(1000);
Serial.println("Accessing network...");
}
Serial.println("Initialize done...");
eth.join(apn);
Serial.print("\n\rIP: ");
Serial.print(eth.ip_string);
if (eth.connect(URL, port, TCP)) {
eth.write(http_cmd);
while (MODULE_PORT.available()) {
serialDebug.write(MODULE_PORT.read());
}
eth.close(1);
} else {
Serial.println("Connect Error!");
}
}
void loop() {
/* Debug */
AT_bypass();
}
And here is my serial monitor response...
Begin...
Initialize done...
IP: 10.78.243.74
+QIURC: "recv",0,1420
HTTP/1.1 500 Internal Server Error
Server: nginx
Content-Type: text/html; charset=UTF-8
Connection: close
Cach Aug 2023 15:22:28 GMT
pragma: no-cacheize:1em}[hidden]{dibefore{box-sizing:border-box}.bg-gray-100{--bg-opacity:1;background-color:#f7fafc;background-color:rgba(247,250,252,var(--bg-opacity))}.border-gray-200{--border-opacity:1;border-color:#edf2f7;border-color:rgba(237
+QIURC: "recv",0,1420
,242,247,var(--border-opacity))}.borde}5-animation-timing-funct{transform:translateY(0);-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}@media (min-width:640px){.sm\:rounded-lg{border-radius:.5rem}.sm\:block{display:block}.sm\:items-center{align-items:center}.sm\:justify-start{justify-content:flex-start}.sm\:justify-between{justify-content:space-between}.sm\:h-20{height:5rem}.sm\:ml-0{margin-left:0}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:pt-0{padding-top:0}.sm\:text-left{text-align:left}.sm\:text-right{text-align:right}}@media (min-width:768px){.md\:border-t-0{border-top-width:0}.md\:border-l{border-left-width:1px}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:1024px){.lg\:px-8{padding-left:2rem;padding-right:2rem}}@media (prefers-color-scheme:dark){.dark\:bg-gray-800{--bg-opacity:1;background-color:#2d3748;background-color:rgba(45,55,72,var(--bg-opacity))}.dark\:bg-gray-900{--bg-opacity:1;background-color:#1a202c;background-color:rgba(26,32,44,var(--bg-opacity))}.dark\:border-gray-700{--border-opacity:1;border-color:#4a5568;border-color:rgba(74,85,104,var(--border-opacity))}.dark\:text-white{--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.dark\:text-gray-400{--text-opacity:1;color:#c
+QIURC: "recv",0,1063
bd5e0;color:rgba(203,213,224,var(--tex
How can I do get query?