我想将数据从Atmega32发送到Laravel站点,为此我得到了一个WIZ107转换器,它被设置为自动连接到端口80上的Laravel站点。 ATMEGA - (HTTP) - > WIZ107 - (HTTP) - >服务器
问题是来自服务器的响应时间很慢,几乎所有时间都是5秒。从浏览器访问延迟不再是。我正在运行XAMPP v3.2.2
如何摆脱这种延迟?
这是发送HTTP请求的函数
void http_send_get(char *code, char *code_source, char *turnistle_id)
{
usart_putstring("GET ");
usart_putstring(HTTP_SERVER_PHP_SCRIPT_LOCATION);
usart_putstring("?code=");
usart_putstring(code);
usart_putstring("&source=");
usart_putstring(code_source);
usart_putstring("&turnistle_id=");
usart_putstring(turnistle_id);
usart_putstring(" HTTP/1.1\r\n");
usart_putstring("Accept: text/html,application/xhtml+xml,application/xml;q=0.8\r\n");
usart_putstring("Accept-Encoding: gzip, deflate\r\n");
usart_putstring("Accept-Language: ro-RO,ro;q=0.8,en-US;q=0.6,en-GB;q=0.4,en;q=0.2\r\n");
usart_putstring("Connection: keep-alive\r\n");
usart_putstring("Host: 192.168.1.7\r\n");
usart_putstring("Upgrade-Insecure-Requests: 1\r\n");
usart_putstring("User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:48.0) Gecko/20100101 Firefox/48.0\")\r\n");
usart_putstring("\r\n");
usart_putc(0x10);
}