Post Go back to editing

ADIN 1110 lwIP Example

Category: Software
Product Number: EVAL-ADIN 1110 EBZ
Software Version: Driver v1.1.0.0

Hallo, 

hope you are well!

I am testing the lwIP example program for ADIN-1110 and I have a problem. There is in lwIP_adin1110_app.c file in the function rxCallback a "netif" and "p" not defineirt!

Is this intended and do I have a problem when porting lwIP stack or these variables should be passed from previous called functions!

MIB2_STATS_NETIF_ADD(netif, ifinoctets, p->tot_len);
if (unicast)
{
MIB2_STATS_NETIF_INC(netif, ifinucastpkts);
}
else
{
MIB2_STATS_NETIF_INC(netif, ifinnucastpkts);
}
 

I tried to comment on these lines and bring Program in the run, but a ping did not work out.

here I also share the whole function:


static void rxCallback(void *pCBParam, uint32_t Event, void *pArg)
{
adin1110_DeviceHandle_t hDevice = (adin1110_DeviceHandle_t)pCBParam;
adi_eth_BufDesc_t *pRxBufDesc;

pRxBufDesc = (adi_eth_BufDesc_t *)pArg;

uint16_t frmLen = pRxBufDesc->trxSize;

int unicast = ((pRxBufDesc->pBuf[0] & 0x01) == 0);

LINK_STATS_INC(link.recv);
MIB2_STATS_NETIF_ADD(netif, ifinoctets, p->tot_len);
if (unicast)
{
MIB2_STATS_NETIF_INC(netif, ifinucastpkts);
}
else
{
MIB2_STATS_NETIF_INC(netif, ifinnucastpkts);
}

writePQ(&pQ[0], pRxBufDesc->pBuf, frmLen);
/* Since we're not doing anything with the Rx buffer in this example, */
/* we are re-submitting it to the queue. */
rxBufDesc[0].pBuf = &rxBuf[0][0];
rxBufDesc[0].bufSize = MAX_FRAME_BUF_SIZE;
rxBufDesc[0].cbFunc = rxCallback;
adin1110_SubmitRxBuffer(hDevice, pRxBufDesc);

Have you had this problem too and how can I solve!

Thank you and I look forward to your feedback

Regards,

  • Hi,

    The following lines can be commented out:

    These lines however have no influence on the ping command not working.

    Can you try the following?

    -In main.c, line 55, select IP_FIXED

    -In main.c, configure lines 40 to 53 for a manual IP configuration compatible with the network you're using.

    Kind regards,

    Raquel

  • Hallo Raguel, 

    thank you for your feedback! actually that's exactly what i did. because this comment line are only important in SNMP case. But still it didn't work. i allocated the gateway ip address to my switch and made ping command from a computer which is connected to the switch. You can see the MAC address of ADIN+µC in the switch but ping did not work.

    Do you have any suggestions or have you had similar problems.

    Many greetings

  • Hi Raquel,

    I think I made a mistake when I imported the lwIP into my project. Because it didn't fudnen some files. for example in the file lwip_check.h #include <config.h> .
    #include <check.h> . So I removed this whole test folder from the build. There was also a problem with the http file, which is why I removed it also from the build as well.

    It also did not know at LWIP_init function this line.

    //http_set_ssi_handler(ssiHandler, NULL, 0);
    //httpd_init();

    Somehow I compiled together expecting only the icmp protocol for ping, but it didn't work.

    Thanks in advance

     

  • Hi,

    We only provide lwIP as part of our examples to use with our evaluation board. This is a 3rd party open-source software stack in which ADI is not involved, so we cannot offer support to port their code to other platforms.

    I recommend that you go to the lwIP developers to get support in how to port their TCP/IP stack to your development platform.

    Kind regards,

    Raquel