EtherLinkCallback doesn't execute on first load
Posted: Wed Feb 19, 2014 2:30 pm
If the ethernet cable is unplugged on device boot (MOD5270 & MOD5270B), when you plug it in for the very first time, EtherLinkCallback isn't executed.
The problem comes from the following snippet in MOD5270/system/ethernet.cpp:
bEverHadLink would be set to false, causing the function to return and the callback to never be executed indicating that the ethernet interface has come up.
Solution:
The problem comes from the following snippet in MOD5270/system/ethernet.cpp:
Code: Select all
if( !bEverHadLink ) // Is this the first link since a full ethernet reset
{
bEverHadLink = TRUE;
ResetEnetPart2();
return;
}
Solution:
Code: Select all
if( !bEverHadLink ) // Is this the first link since a full ethernet reset
{
bEverHadLink = TRUE;
ResetEnetPart2();
if (EtherLinkCallback) {
(*EtherLinkCallback)(TRUE);
}
return;
}