HI,
I am having trouble with using DHCP in Int ethernet lib
I have set the mac address as 00:14:A5:74:19:3f and an IP address of 0.0.0.0.
I am calling
Ethernet_Intern_Init(myMacAddr, myIpAddr, _ETHERNET_CFG_SPD100 | _ETHERNET_CFG_FULLDUPLEX); where myMacAddr and myIPAddr equate to above.
Ethernet_Intern_enable(_ETHERNET_FILTER_TYPE_CRC | _ETHERNET_FILTER_TYPE_MULTICAST);
i am then trying to request DHCP using
while (1) {
Ethernet_Intern_initDHCP(5); // get network configuration from DHCP server, wait 5 sec for the response
}
no Ip address is being received and I am not even seeing the request go out onto network (using Wireshark).
Am I missing something?
thanks
If I manually enter the IP address. Interface works and is pingable.
Internal Ethernet Library - DHCP
- biljana.nedeljkovic
- mikroElektronika team
- Posts: 1043
- Joined: 30 Jun 2015 15:15
Re: Internal Ethernet Library - DHCP
Hello,
as I have already answered you to the helpdesk, I suggest to continue our conversation there and leave this topic open in case someone has the similar problem or advice for you.
Kind regards,
Biljana
as I have already answered you to the helpdesk, I suggest to continue our conversation there and leave this topic open in case someone has the similar problem or advice for you.
Kind regards,
Biljana
Re: Internal Ethernet Library - DHCP
Hi
I fixed the timer by enabling interrupts
DHCP is now delivering Ip address and unit is now pingable.
However I am unable to fetch IP address using Ethernet_Intern_getIPAddress function.
I am trying to write the IP address to console using UART1_Write but it is delivering 00s.
The debugger shows that the correct IP address is located at Ethernet_Intern_IpAddr.
Can anyone suggest how to get this working.
The memcpy routine Ethernet_Intern_getIpAddress() listed in Library doesn't seem to do the job.
I probably have my pointer syntax wrong.
thanks
I fixed the timer by enabling interrupts
DHCP is now delivering Ip address and unit is now pingable.
However I am unable to fetch IP address using Ethernet_Intern_getIPAddress function.
I am trying to write the IP address to console using UART1_Write but it is delivering 00s.
The debugger shows that the correct IP address is located at Ethernet_Intern_IpAddr.
Can anyone suggest how to get this working.
The memcpy routine Ethernet_Intern_getIpAddress() listed in Library doesn't seem to do the job.
I probably have my pointer syntax wrong.
thanks
- biljana.nedeljkovic
- mikroElektronika team
- Posts: 1043
- Joined: 30 Jun 2015 15:15
Re: Internal Ethernet Library - DHCP
Hello,
I have answered you at the helpdesk. Please answer there.
Kind regards,
Biljana
I have answered you at the helpdesk. Please answer there.
Kind regards,
Biljana