First ARP request does not seem to be transmitted (the link is probably not
fully established). Reduce the timeout between tries and increase number of
tries.
for(i=0;i<6;i++)
cached_mac[i] = 0;
- for(tries=0;tries<5;tries++) {
+ for(tries=0;tries<100;tries++) {
/* Send an ARP request */
fill_eth_header(&txbuffer->frame.eth_header,
broadcast,
send_packet();
/* Do we get a reply ? */
- for(timeout=0;timeout<2000000;timeout++) {
+ for(timeout=0;timeout<100000;timeout++) {
microudp_service();
for(i=0;i<6;i++)
if(cached_mac[i]) return 1;