While using the aoLibrary I just can’t get the DHCP on the wiznet 5100 to start working.
I own a ethernetshield for arduino with the wiznet 5100 and it works immediatly using the ethernet libraries.
As of right now this is the basic code structure:
spi0_master_init();
user_ethernet_init();
DHCP_time_handler();
DHCP_init(DHCP_SERVER_PORT, dhcp_buff);
reg_dhcp_cbfunc(my_ip_assign, my_ip_assign, my_ip_conflict);
while(true){
printf("\r\n Entering DHCP state machine");
switch (DHCP_run()) {
case DHCP_IP_ASSIGN:
printf("\r\nIP assigned");
break;
case DHCP_IP_CHANGED:
printf("\r\n IP changed");
break;
case DHCP_RUNNING:
printf("\r\n DHCP running");
get_network_address();
dhcp_is_leased = true;
break;
case DHCP_FAILED:
printf("\r\n DHCP failed");
break;
case DHCP_STOPPED:
printf("\r\n DHCP failed");
break;
default:
break;
}
}
void DHCP_time_handler(void)
{
dhcp_tick_1s++;
}
I am not seeing any request for message with wireshark and the loop just keeps returning " DHCP is running " .
I have no idea what I should do with the timer and if I have that correctly set up. I am using the wiznet5100 on a nRF52840