Dhcp 및 tcp 관련 문의
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: Dhcp 및 tcp 관련 문의
by irina WIZnet ·
안녕하세요.
위즈네트 DHCP 라이브러리는 초기에 한 번 수행되어야 하는 DHCP_init() 함수와 메인 루틴에서 동작 되어야 하는 DHCP_run() 함수로 구성됩니다.
(1)번 문의의 경우, 기본적인 구성은 언급하신 내용이 맞습니다만, 상세 내용 중에 빠진 부분이 있을까 싶어 자세히 적습니다.
우선, DHCP용으로 사용할 socket 번호와 사용자가 DHCP용 버퍼로 사용할 배열 공간을 정의하여 DHCP_init 함수를 통해 설정하는 과정이 선행되어야 합니다. 그리고 DHCP를 통해 IP를 할당 받은 후, reg_dhcp_cbfunc() 함수에 ‘my_ip_assign()’ 과 같은 callback function이 등록되어 있다면 다음과 같은 동작이 수행되어 W5500 칩에 네트워크 정보가 설정됩니다. (다음 예제코드와 같은 동작 함수가 포함되어 있지 않은 경우, 직접 칩 register에 설정해주셔야 합니다)
자세한 동작 flow는 다음 페이지를 참고하시면 좋을 것 같습니다.
github.com/Wiznet/W5500_EVB/blo … src/main.c
(2)번 문의의 경우, DHCP를 위해 할당된 socket이 정상적으로 DHCP_init()함수를 통해 등록되었다면 해당하는 socket의 Sn_RX_RSR register의 값은 수신된 데이터가 있을 때 마다 그 길이를 알리게 됩니다. 그렇지 않은 경우라면 제품과 정상적으로 네트워킹 할 수 있는 DHCP 서버(공유기 등 )가 있는지 확인 부탁 드립니다.