W6100 DHCP로 TCP/IP 연결 관련 질문
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: W6100 DHCP로 TCP/IP 연결 관련 질문
by becky ·
TCP도 됩니다.
RE: RE: W6100 DHCP로 TCP/IP 연결 관련 질문
by Member 11128 ·
답변감사합니다.
io6library에 있는 DHCPv4.c 를 사용하여 DHCP 설정을 진행하고 있습니다.
우선 UDP의 경우는 연결에 성공을 하였습니다.
TCP로 통신을 하고 싶어 아래 코드와 같이 수정을 하였습니다.
-------------------------------------------------------원본----------------------------------------------------------
dhcpv4.c - DHCPv4_run(void)
-socket(DHCPV4_SOCKET, Sn_MR_UDP, DHCPV4_CLIENT_PORT, 0x00);
-------------------------------------------------------수정----------------------------------------------------------
dhcpv4.c - DHCPv4_run(void)
-socket(DHCPV4_SOCKET, Sn_MR_TCP, DHCPV4_CLIENT_PORT, 0x00);
Sn_MR_UDP → Sn_MR_TCP 로 수정을 한 후에 테스트를 해보니
Sokcet.c - sendto() 함수안의 아래 부분에서 무한루프를 타네요.
while(1)
{
}
혹시 어떤게 잘못되었을까요?
RE: W6100 DHCP로 TCP/IP 연결 관련 질문
by becky ·
DHCP는 IP를 할당받기 위한수단입니다.
TCP통신을 하기 위해서는 DHCP로 IP를 할당 받은 이후, TCP 소켓을 열어 TCP 통신을하시면 됩니다.
dhcpv4.c에서 UDP 로 소켓을 오픈한이유는 DHCP가 UDP 기반의 프로토콜이기 때문입니다.
아래코드대로 작성하신후 DHCP Success이후 TCP Socket을 open하여 통신하시면 됩니다.
callback 함수는 아래와같습니다.
RE: W6100 DHCP로 TCP/IP 연결 관련 질문
by becky ·
main.zip (4.3 KB)
제가 테스트시 사용한 main.c 파일 첨부해드립니다.
RE: W6100 DHCP로 TCP/IP 연결 관련 질문
by Member 11128 ·
답변 감사합니다.
제품 양산 개발을 위해 W6100을 사용하고 있는데 처음 Ethernet 프로젝트라서 모르는 점이 많이 있네요.
답변 많은 도움 됩니다.
한번 주신 파일로 테스트 진행 해보겠습니다.