Hi,
In some AP router(I'm using AnyGate ..), DSWifi can't get IP Address from the DHCP Server...
So, I changed the DHCP source code in "arm9/source/sgIP_DHCP.c".
If you any problems, send me feedback ....
You can get the changed source code in here .
1. In sgIP_DHCP_Start function, remarks the setting to non-blocking socket ..
/*
i=1;
ioctl(dhcp_socket,FIONBIO,&i);
*/
2. In sgIP_DHCP_Update function, use the select function
struct timeval tv;
fd_set readfds;
tv.tv_sec=1;
tv.tv_usec=0;
FD_ZERO(&readfds);
FD_SET(dhcp_socket, &readfds);
if(select(dhcp_socket+1, &readfds, NULL, NULL, &tv) <= 0) break;
l=recvfrom(dhcp_socket,p,sizeof(sgIP_DHCP_Packet),0,(struct sockaddr *)&sain,&n);
if(l==-1) break;
Had some trouble with that download link; attached here for convenience.