Skip to content

Commit

Permalink
Merge pull request #4 from WIZnet-ioLibrary/develop1
Browse files Browse the repository at this point in the history
add connect ipv6 address method
  • Loading branch information
TeddyWiz committed May 7, 2019
2 parents 516b188 + ad9fa9f commit 40ac7a9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ best fits for low-end Non-OS devices connecting to Ethernet for the Internet of
<img width="60%" src="https://github.com/WIZnet-ioLibrary/W6100EVB-HTTP_Server/wiki/Result_01.png" />
</p>

- Connect Ipv6 Address <br>
<p align="center">
<img width="60%" src="https://github.com/WIZnet-ioLibrary/W6100EVB-HTTP_Server/wiki/Result_04.png" />
</p>

- Internet Explorer HTTP Server Device Network Information <br>
<p align="center">
<img width="60%" src="https://github.com/WIZnet-ioLibrary/W6100EVB-HTTP_Server/wiki/Result_02.png" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ void httpServer_run(uint8_t seqnum)
#ifdef _HTTPSERVER_DEBUG_
printf("> HTTPSocket[%d] : CLOSED\r\n", s);
#endif
if(socket(s, Sn_MR_TCP, HTTP_SERVER_PORT, 0x00) == s) /* Reinitialize the socket */
if(socket(s, Sn_MR_TCPD, HTTP_SERVER_PORT, 0x00) == s) /* Reinitialize the socket */
{
#ifdef _HTTPSERVER_DEBUG_
printf("> HTTPSocket[%d] : OPEN[%d]\r\n", s, HTTP_SERVER_PORT);
Expand Down
29 changes: 14 additions & 15 deletions TrueStudio/W6100EVB-HTTP_Server/Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@

/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD */
uint8_t socknumlist[] = {2, 3, 4, 5};

uint8_t socknumlist[] = {0, 1, 2, 3};
uint8_t RX_BUF[DATA_BUF_SIZE];
uint8_t TX_BUF[DATA_BUF_SIZE];
uint8_t URX_BUF[DATA_BUF_SIZE];
Expand All @@ -76,20 +75,20 @@ wiz_NetInfo gWIZNETINFO = { .mac = {0x00,0x08,0xdc,0xff,0xff,0xff},
.dns = {168, 126, 63, 1},
.lla = {0xfe,0x80, 0x00,0x00,
0x00,0x00, 0x00,0x00,
0x02,0x08, 0xdc,0xff,
0xfe,0xff, 0xff,0xff},
.gua={0x20,0x01,0x02,0xb8,
0x00,0x10,0x00,0x01,
0x02,0x08,0xdc,0xff,
0xfe,0xff,0xff,0xff},
.sn6={0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0x02,0x00, 0xdc,0xff,
0xfe,0x57, 0x57,0x62},
.gua={0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00},
.sn6={0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,
0x00,0x00,0x00, 0x00,
0x00,0x00,0x00,0x00},
.gw6={0xfe, 0x80, 0x00,0x00,
.gw6={0x00, 0x00, 0x00,0x00,
0x00,0x00,0x00,0x00,
0x02,0x00, 0x87,0xff,
0xfe,0x08, 0x4c,0x81}
0x00,0x00, 0x00,0x00,
0x00,0x00, 0x00,0x00}
};


Expand Down Expand Up @@ -240,8 +239,8 @@ int main(void)
for(i = 0; i < MAX_HTTPSOCK; i++) httpServer_run(i); // HTTP Server handler

//loopback server
loopback_tcps(0, data_buf, 5000, AS_IPV6);
loopback_tcps(1, data_buf, 5001, AS_IPV4);
loopback_tcps(5, data_buf, 5000, AS_IPV6);
loopback_tcps(6, data_buf, 5001, AS_IPV4);
}
/* USER CODE END 3 */
}
Expand Down

0 comments on commit 40ac7a9

Please sign in to comment.