Net_Ethernet_Intern_doDHCPLeaseTime() problem

General discussion on mikroBasic PRO for PIC32.
Author
Message
phil31
Posts: 348
Joined: 02 Apr 2009 15:02
Location: France
Contact:

Net_Ethernet_Intern_doDHCPLeaseTime() problem

#1 Post by phil31 » 07 May 2018 15:40

Hello,

as several others users i found that the Net_Ethernet_Intern_doDHCPLeaseTime() function is not working as expected.
i set 60 seconds on the DHCP router and the function does not/never return > 0 !

for sure, the Net_Ethernet_Intern_UserTimerSec variable is right incremented by interrupts

several post already explain this problem, but no real answer from ME team :
viewtopic.php?f=101&t=71226
viewtopic.php?f=176&t=39083&p=277858&hi ... ew#p277858

mikroBasic 4.0.0
Ethernet libstock Version: 1.0.8.0 / Last Updated: 2017-07-28


please what is the solution !?

thanks, regards

User avatar
petar.suknjaja
mikroElektronika team
Posts: 683
Joined: 05 Mar 2018 09:44
Location: Belgrade

Re: Net_Ethernet_Intern_doDHCPLeaseTime() problem

#2 Post by petar.suknjaja » 09 May 2018 16:21

Hi,

One of our colleagues has been testing the latest library on the simple example
and we never have find any trouble regarding the DHCP lease time.

Can you supply us with some code example so we could see what is the issue.

Kind regards,
Petar

phil31
Posts: 348
Joined: 02 Apr 2009 15:02
Location: France
Contact:

Re: Net_Ethernet_Intern_doDHCPLeaseTime() problem

#3 Post by phil31 » 09 May 2018 21:02

Petar,

here it is how i try to use it :

------------------------------------- main loop
while TRUE
Random_nonce = rand() ' generate random value for Digest authentication scheme

Net_Ethernet_Intern_doPacket() ' Process incoming Ethernet packets

if(Net_Ethernet_Intern_doDHCPLeaseTime() <> 0) then
Net_Ethernet_Intern_renewDHCP(5) ' it's time to renew the IP address lease, with 5 secs for a reply
end if
.....
.....
wend
--------------------------------------

regards

User avatar
petar.suknjaja
mikroElektronika team
Posts: 683
Joined: 05 Mar 2018 09:44
Location: Belgrade

Re: Net_Ethernet_Intern_doDHCPLeaseTime() problem

#4 Post by petar.suknjaja » 10 May 2018 12:57

Hi,


Well the code that you provided is as in example library.

Could it be that you are exiting from the loop too early.
Before DHCP has provided new IP address?

Kind regards,
Petar

phil31
Posts: 348
Joined: 02 Apr 2009 15:02
Location: France
Contact:

Re: Net_Ethernet_Intern_doDHCPLeaseTime() problem

#5 Post by phil31 » 10 May 2018 15:37

NO, i never see "Net_Ethernet_Intern_doDHCPLeaseTime() <> 0" !!

how can we have a look on this "DHCPLeaseTime" variable ?
i would like to see that counter, if he really decrement or not !


as mentioned in my first message, several others users don't successful to renew dhcp ip !

please let me know exactly which example your colleague has tested ?

phil31
Posts: 348
Joined: 02 Apr 2009 15:02
Location: France
Contact:

Re: Net_Ethernet_Intern_doDHCPLeaseTime() problem

#6 Post by phil31 » 16 May 2018 18:03

Please may i expect a real answer instead "no we try it and it work !?"
let me know which configuration/exemple you tried ?
can we check the "DHCPLeaseTime" variable ?

we can find several thread where several user complaign about this function and never you provide a real answer !


thanks

phil31
Posts: 348
Joined: 02 Apr 2009 15:02
Location: France
Contact:

Re: Net_Ethernet_Intern_doDHCPLeaseTime() problem

#7 Post by phil31 » 21 May 2018 23:45

please ?

User avatar
petar.suknjaja
mikroElektronika team
Posts: 683
Joined: 05 Mar 2018 09:44
Location: Belgrade

Re: Net_Ethernet_Intern_doDHCPLeaseTime() problem

#8 Post by petar.suknjaja » 22 May 2018 15:40

Hi,
please let me know exactly which example your colleague has tested ?
Talking with him, i found out that he used used the example code provided by user to test the lease time bug.
He couldn't reproduce it. So he suggested him to switch to static IP addressing.

Please may i expect a real answer instead "no we try it and it work !?"
Well that's the problem, we don't have basic for declaring it as bug, there are some users who reported issues with lease time,
but those are like 3-4 cases on which we couldn't reproduce the same problem.
In other cases the problem easily could be bug within the code, or something to do with network or dhcp configuration.

I've reported to the development department that there are users that are complaining on the lease time,
But unless you participate with code and configuration,we cannot do much to find what is really behind this problem.

Thank you for understanding,

Kind regards,
Petar

phil31
Posts: 348
Joined: 02 Apr 2009 15:02
Location: France
Contact:

Re: Net_Ethernet_Intern_doDHCPLeaseTime() problem

#9 Post by phil31 » 22 May 2018 18:00

Which example exactly !!?? will try it too !
i use the LAN8720 PHY, but anyway, this problem has no link to the PHY layer !

i participate and show you how i use this function !!
how my other parts of code can alter this "DHCPLeaseTime" variable ??
there is no access to this variable !
and as you say "well the code that you provided is as in example library."

phil31
Posts: 348
Joined: 02 Apr 2009 15:02
Location: France
Contact:

Re: Net_Ethernet_Intern_doDHCPLeaseTime() problem

#10 Post by phil31 » 04 Jun 2018 20:27

so, i don't know what you really test ?

anyway, i do my own tests with YOUR OFFICAL EXAMPLE AND HARDWARE !...
i just add some debug lines .. and adapt to my MB PIC32MX7 board.


setup :
BEWAN 700G router, DHCP release time set to 360 seconds
PC Windows 7 with DHCP activate
PIC32MX7 with DHCP

Wireshark is running on the PC and spy UDP port 67 and 68
=> DHCP is right renewed by my PC, each 360 seconds
=> NO RENEW IP for the MX7 board !!
interrupt each second by TIMER 1

here it is my code. did i miss something ?

thanks
Attachments
HTTP_Demo_Internal - RenewDHCP.zip
(721.87 KiB) Downloaded 114 times

User avatar
petar.suknjaja
mikroElektronika team
Posts: 683
Joined: 05 Mar 2018 09:44
Location: Belgrade

Re: Net_Ethernet_Intern_doDHCPLeaseTime() problem

#11 Post by petar.suknjaja » 06 Jun 2018 09:48

Hi,
I'll review it and let you know what I've found out.
Kind regards,
Petar

phil31
Posts: 348
Joined: 02 Apr 2009 15:02
Location: France
Contact:

Re: Net_Ethernet_Intern_doDHCPLeaseTime() problem

#12 Post by phil31 » 14 Jun 2018 08:01

Hello Petar,

so, 1 week later, what are your conclusions please ?

for remark, this problem is open since several Years on your forum, without any real answer or solution !...
may we close efficiently this doubt or problem for everybody

regards

User avatar
petar.suknjaja
mikroElektronika team
Posts: 683
Joined: 05 Mar 2018 09:44
Location: Belgrade

Re: Net_Ethernet_Intern_doDHCPLeaseTime() problem

#13 Post by petar.suknjaja » 15 Jun 2018 11:09

Hi phil31,

I want to apologize for delayed response, I haven't had time to devote myself completely to testing the code you're submitted, but I will, as soon as possible.

Thank you for your patience,

Kind regards,
Petar

phil31
Posts: 348
Joined: 02 Apr 2009 15:02
Location: France
Contact:

Re: Net_Ethernet_Intern_doDHCPLeaseTime() problem

#14 Post by phil31 » 19 Jun 2018 11:00

as explain, the provided test code is your example !

User avatar
petar.suknjaja
mikroElektronika team
Posts: 683
Joined: 05 Mar 2018 09:44
Location: Belgrade

Re: Net_Ethernet_Intern_doDHCPLeaseTime() problem

#15 Post by petar.suknjaja » 20 Jun 2018 09:23

Hi phil31,
as explain, the provided test code is your example !
Great, than that will make testing easier.

I'll review it in the next couple days, as soon as I finish some earlier jobs and commitments.

Please be patient,

Kind regards,
Petar

Post Reply

Return to “mikroBasic PRO for PIC32 General”