at module bug fix
This commit is contained in:
parent
046c2159e8
commit
6d0c363034
|
@ -23,7 +23,15 @@
|
|||
|
||||
//extern UART_HandleTypeDef huart2;
|
||||
//static UART_HandleTypeDef *pAtUart = &huart2;
|
||||
extern sRingbuff g_ring_tcp_buff[];
|
||||
//extern sRingbuff g_ring_tcp_buff[];
|
||||
|
||||
void HAL_AT_Init()
|
||||
{
|
||||
/* 配置串口接收buf的存储位置 */
|
||||
//HAL_UART_Receive_IT(pAtUart, g_ring_buff.buffer, 1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int HAL_AT_Read(_IN_ utils_network_pt pNetwork, _OU_ unsigned char *buffer, _IN_ size_t len)
|
||||
{
|
||||
|
|
|
@ -87,6 +87,10 @@ int32_t ofc_fetch(void *handle, uint32_t size_fetched, char *buf, uint32_t buf_l
|
|||
FUNC_EXIT_RC(rc);
|
||||
}
|
||||
|
||||
#ifdef SUPPORT_AT_CMD
|
||||
/* wait at module recv data */
|
||||
HAL_SleepMs(5000);
|
||||
#endif
|
||||
h_ofc->http_data.response_buf = buf;
|
||||
h_ofc->http_data.response_buf_len = buf_len;
|
||||
h_ofc->http_data.response_content_len = 0;
|
||||
|
|
|
@ -122,7 +122,7 @@ static int _http_send_header(http_client_t *client, char *host, const char *path
|
|||
memset(send_buf, 0, HTTP_CLIENT_SEND_BUF_SIZE);
|
||||
len = 0; /* Reset send buffer */
|
||||
|
||||
if(size_fetched != 0)
|
||||
if(range_len != 0)
|
||||
{
|
||||
HAL_Snprintf(buf, sizeof(buf), "%s %s HTTP/1.1\r\nHost: %s\r\nRange: bytes=%d-%d\r\n", pMethod, path, host, size_fetched, size_fetched + range_len); /* Write request */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue