Statistics: Posted by Tom83 — Thu Feb 02, 2023 12:45 am
Statistics: Posted by Amorphous — Wed Feb 01, 2023 8:03 pm
Statistics: Posted by Tom83 — Thu Jan 19, 2023 10:39 pm
Statistics: Posted by hiddenotebook — Mon Nov 07, 2022 12:36 am
Statistics: Posted by rayleong — Mon Oct 17, 2022 5:20 pm
Statistics: Posted by xytsrm — Thu Oct 13, 2022 12:45 am
Statistics: Posted by xytsrm — Tue Sep 20, 2022 10:48 pm
Code:
AT+CIPSTART=0,"TCP","192.168.1.103",80\r\n
AT+CIPSEND=0,132\r\n
POST /insert.php, HTTP/1.1\r\n
Host: 192.168.1.103\r\n
User-Agent: Mozilla\r\n
Content-Type: application/x-www-form-urlencoded\r\n\r\n"]
\r\n\r\n
Content-Length: 20\r\n
\r\n\r\n
Col_1=,Dec Value1,&Col_2=,Dec Value2,\r\n\r\n
\r\n\r\n
The response from ESP8266:-
AT+CIPSTART=0,"TCP","192.168.1.103",80
0,CONNECT
OK
AT+CIPSEND=0,132
OK
>
Recv 132 bytes
SEND OK
+IPD,0,488:HTTP/1.1 302 Found
Date: Wed, 18 May 2022 17:00:17 GMT
Server: Apache/2.4.53 (Win64) OpenSSL/1.1.1n PHP/8.1.5
X-Powered-By: PHP/8.1.5
Location: http://192.168.1.103/
Content-Length: 254
Content-Type: text/html; charset=UTF-8
<br />
<b>Warning</b>: Undefined array key "Col_1" in <b>
C:\xampp\htdocs\insert.php</b> on line <b>17</b><br />
<br />
<b>Warning</b>: Undefined array key "Col_2" in <b>
C:\xampp\htdocs\insert.php</b> on line <b>18</b><br />
record created successfully
0,CLOSED
Statistics: Posted by David-OLW — Sun May 22, 2022 11:02 pm
Code:
AT+CIPSTART=0,"TCP","192.168.1.103",80\r\n
AT+CIPSEND=0,132\r\n
POST /insert.php, HTTP/1.1\r\n
Host: 192.168.1.103\r\n
User-Agent: Mozilla\r\n
Content-Type: application/x-www-form-urlencoded\r\n\r\n"]
\r\n\r\n
Content-Length: 20\r\n
\r\n\r\n
Col_1=,Dec Value1,&Col_2=,Dec Value2,\r\n\r\n
\r\n\r\n
The response from ESP8266:-
AT+CIPSTART=0,"TCP","192.168.1.103",80
0,CONNECT
OK
AT+CIPSEND=0,132
OK
>
Recv 132 bytes
SEND OK
+IPD,0,488:HTTP/1.1 302 Found
Date: Wed, 18 May 2022 17:00:17 GMT
Server: Apache/2.4.53 (Win64) OpenSSL/1.1.1n PHP/8.1.5
X-Powered-By: PHP/8.1.5
Location: http://192.168.1.103/
Content-Length: 254
Content-Type: text/html; charset=UTF-8
<br />
<b>Warning</b>: Undefined array key "Col_1" in <b>
C:\xampp\htdocs\insert.php</b> on line <b>17</b><br />
<br />
<b>Warning</b>: Undefined array key "Col_2" in <b>
C:\xampp\htdocs\insert.php</b> on line <b>18</b><br />
record created successfully
0,CLOSED
Statistics: Posted by David-OLW — Thu May 19, 2022 2:56 am
Statistics: Posted by HankB — Fri Apr 15, 2022 11:36 am
Statistics: Posted by andrea05256 — Sat Mar 26, 2022 7:55 am
Statistics: Posted by Inquisitor — Fri Mar 11, 2022 5:06 am
Statistics: Posted by ChrisO — Tue Jan 11, 2022 6:15 am
Statistics: Posted by Her Mary — Fri Dec 17, 2021 10:23 am
Statistics: Posted by xytsrm — Sat Dec 04, 2021 10:51 pm
Statistics: Posted by ashelybrown — Wed Dec 01, 2021 11:50 pm
Statistics: Posted by jenya7 — Wed Nov 24, 2021 11:13 pm
Statistics: Posted by Her Mary — Mon Nov 22, 2021 5:31 pm
Statistics: Posted by Her Mary — Mon Nov 22, 2021 5:30 pm
Statistics: Posted by Her Mary — Mon Nov 22, 2021 5:26 pm
Statistics: Posted by alexweefs — Thu Nov 11, 2021 1:25 am
Code:
uint8_t UDP_Start(char* ssid, char* pass, uint16_t loc_port)
{
uint32_t timeout = 0;
if (WiFi.status() != WL_CONNECTED)
{
rt_parameters.wifi_mode = WIFI_STA;
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, pass);
if (sys_parameters.debug)
Serial.println("Waiting for connection");
while (WiFi.status() != WL_CONNECTED)
{
delay(DELAY_TICK);
if (sys_parameters.debug)
Serial.print('.');
timeout++;
if (timeout >= sys_parameters.ap_con_timeout)
{
if (sys_parameters.debug)
Serial.println();
return UDP_WIFI_ERR;
}
}
Serial.print("\nConnection time (ms) ");
Serial.println(DELAY_TICK * timeout);
}
rt_parameters.wifi_status = WiFi.status();
IPAddress ip_addr = WiFi.localIP();
memcpy(sys_parameters.loc_ip, ip_addr, 4);
if (sys_parameters.debug)
{
Serial.print("Connected! IP address: ");
Serial.println(ip_addr);
Serial.printf("UDP server on port %d\n", loc_port);
}
if (udp.begin(loc_port) == 0)
return UDP_CONNECT_ERR;
return UDP_OK;
}
Statistics: Posted by jenya7 — Wed Nov 10, 2021 2:54 pm
Statistics: Posted by Her Mary — Fri Oct 08, 2021 2:40 pm
Code:
Serial.println("UDP OK");
Code:
void UART_Get()
{
char chr;
if (Serial.available() > 0)
{
chr = Serial.read();
//for debug
Serial.print(chr);
}
}
Code:
void loop()
{
UART_Get();
}
Statistics: Posted by jenya7 — Tue Oct 05, 2021 3:15 pm
Statistics: Posted by RicDG — Fri Oct 01, 2021 8:11 pm
Statistics: Posted by alenrexy — Thu Sep 16, 2021 8:01 pm
Statistics: Posted by iceman — Tue Sep 14, 2021 1:06 am
Statistics: Posted by Her Mary — Fri Sep 10, 2021 11:10 am
Statistics: Posted by elimark1 — Sat Sep 04, 2021 6:02 am
Statistics: Posted by jenya7 — Sun Jul 04, 2021 6:23 pm
Statistics: Posted by watson — Mon Jun 07, 2021 9:54 am
Statistics: Posted by Foruture — Thu Jun 03, 2021 11:17 am
Statistics: Posted by Her Mary — Fri May 07, 2021 11:35 am
Statistics: Posted by yakshatantra — Fri Apr 30, 2021 2:09 am
Statistics: Posted by Her Mary — Thu Apr 22, 2021 5:19 pm
Code:
nvs_handle mHandler;
if (nvs_open(WIFI_TAG, NVS_READWRITE, &mHandler) == ESP_OK)
{
nvs_set_str(mHandler, NVS_SSID, wifi_ssid);
nvs_set_str(mHandler, NVS_PASS, wifi_pass);
if (nvs_commit(mHandler) == ESP_OK)
{
i2c_oled_showstr(0, 6, "W");
}
nvs_close(mHandler);
}
Code:
nvs_handle mHandler;
bool ret = false;
ret = nvs_open(WIFI_TAG, NVS_READONLY, &mHandler);
ESP_ERROR_CHECK(nvs_get_str(mHandler, NVS_SSID, wifi_ssid, &wifi_ssid_length));
ESP_ERROR_CHECK(nvs_get_str(mHandler, NVS_PASS, wifi_pass, &wifi_pass_length));
nvs_close(mHandler);
return ret;
Statistics: Posted by alphasion — Sat Apr 17, 2021 10:42 am
Statistics: Posted by Her Mary — Tue Mar 02, 2021 4:46 pm
Statistics: Posted by nhuanhuynh — Thu Feb 18, 2021 10:36 am
Statistics: Posted by Her Mary — Thu Jan 28, 2021 5:19 pm
Statistics: Posted by pzygmunt — Tue Jan 26, 2021 9:03 pm
Statistics: Posted by caleyfeli85 — Thu Jan 21, 2021 10:24 pm
Statistics: Posted by Her Mary — Tue Jan 19, 2021 10:16 am
Statistics: Posted by mbins — Thu Jan 07, 2021 1:56 pm