We are using DigiConnect Wi-ME through a serial port (digi is linked to the Altera DE2-70 FPGA).
Is there any way to read IP that was assigned by DHCP to the digi module?
We need to read the IP and display it on our FPGA LCD display, i am quite stuck cause no manuals mention internal Digi memory structure, is this possible to read the IP out of some register on Digi Wi-ME ?
Best regards
Which firmware are you using? statndard or custom?
I am using standard firmware
If you are programming the Digi, you can easily get the DHCP address using Treck calls. If you are using the preprogrammed setup, you are out of luck.
{
// compare with ttDeviceEntry in treck/include/trtype.h
// following is typedef void TM_fAR * in treck/include/trsocket.h
int ifCount;
ttUserInterface *pIfList;
ttUserInterface interfaceHandle; // gets recast as above
int ndx = 0;
char nameBuf[TM_MAX_DEVICE_NAME];
// for the compiler
pIfList = tfGetInterfaceList(&ifCount);
//TRACE( "
Interface list (%d):
", ifCount);
while (ifCount--)
{
interfaceHandle = pIfList[ndx++];
// init the name string
memset(nameBuf, ' ', TM_MAX_DEVICE_NAME);
tfGetIfName((ttUserInterface) interfaceHandle, nameBuf, TM_MAX_DEVICE_NAME);
if( !strcmp(nameBuf, "eth0") )
{
tfGetIpAddress(interfaceHandle, &lAddr, 0);
//tfGetIfGateway(interfaceHandle, &lGateway, 0);
//tfGetNetMask(interfaceHandle, &lMask, 0);
//tfGetPppDnsIpAddress(interfaceHandle, &lDNS1, TM_DNS_PRIMARY);
//tfGetPppDnsIpAddress(interfaceHandle, &lDNS2, TM_DNS_SECONDARY);
break;
}
}
}