請問:
我有參照M487_Ethernet\M480_BSP_CMSIS_V3.05.000\SampleCode\NuMaker-PFM-M487\LwIP_TCP_EchoClient\ 這包sample code
想執行http request 到如下URL取得JSON Data
URL: http:/xxxxx.xxx.xx/Signage_Vincent/BusStop/getStopUpdateVer.php?ProductID=JP-000-00-0-01-9996
我嘗試改code 裡的 char string與server ip如下, 然後wireshare監控, M487並不會發送HTTP 請求到49.212.117.47
所以我也取不到response data, 能否協助我需調整code的那些地方
static void tcp_echoclient_netconn_thread(void *arg)
{
struct netconn *conn;
err_t err;
ip_addr_t server_ip;
struct netbuf *inbuf;
char* buf;
u16_t buflen;
char string[] = "GET /Signage_Vincent/BusStop/getStopUpdateVer.php?ProductID=JP-000-00-0-01-9996 HTTP/1.1\r\n Host: bussys5931.sakura.ne.jp\r\nConnection: Keep-Alive\r\n";
IP4_ADDR(&server_ip, 49, 212, 117, 74);
/* Create a new TCP connection handle */
conn = netconn_new(NETCONN_TCP);
.........
}
|