This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

NDK multicast support

Other Parts Discussed in Thread: OMAPL138

hi

 i am trying to receive  multicast packets on EVM6678 board and i am using NDK 2.21.

can  you tell what are the modification is needed in any UDP reception cade for enabling multicast support.

Pratik jain

  • Pratik,

    Have you checked out the NDK API Reference Guide?

  • HI

     have tried with following option

    setsockopt (sudp, IPPROTO_IP, IP_ADD_MEMBERSHIP, (void *)&group, sizeof(group))

    with this i am able to connect to multicast group but my application is not able to receive multicast packet.

    packets are received in EMAC .

    can you tell me what is the problem.

    pratik jain

  • Hi Pratik Jain,

    I am working to reproduce your problem locally and will update you as soon as I have more information.

    As soon as I know something more, I'll respond in the original thread Alan linked above.

    Thank you for your patience.

    Steve

  • hi steven

      thanks  

      do you able to recreat the problem ? do you need more details?

    i am still not able to receive mulicast packets.

     Pratik jain

  • Pratik jain,

    I've been able to set up some simple Linux side client and server apps for multicast.  Basically, I've verified that the client, who joins a multicast group, is able to receive multicast messages sent by the server.  Again, this is on Linux.

    I then took the same client code and brought it into an NDK task.  So the task joins the same multi cast group.  When I re-run the test scenario, the Linux client app is still able to receive the multicast message; however the NDK application does not!

    So, there's definitely something not right here; I'm also not able to receive multicast messages in my NDK app.  Right now I'm working on different hardware than you (I'm on the evmOMAPL138), however the NDK stack is generic C code so it doesn't matter what hardware I try on.

    What is different is the driver.  I see in the driver that there are settings for configuring multicast to be enabled, and I also see the EMAC register counter for received multicast packets received (RXMCASTFRAMES on OMAPL138) is being incremented.

    But, I've confirmed that I'm not seeing them come up into the NIMU layer and hence into the stack itself.  (The Nimu layer connects the driver to the stack. Packets are passed up from the driver (data link layer) to the NIMU layer and then from the NIMU layer, passed to the appropriate layer 3 protocol (e.g. IP, ARP, etc.).)

    I've verified this by adding a debug print statement into the stack code in nimu.c, in the function NIMUReceivePacket():

        /* Set the flags to indicate the type of packet: Unicast, Broadcast or Multicast */
        if (ptr_eth_header->DstMac[0] & 0x1)
        {
            /* The packet is either a multicast or broadcast packet. */
            if (ptr_eth_header->DstMac[1] == 0xFF) {
                ptr_pkt->Flags |= FLG_PKT_MACBCAST;
            }
            else {
                printf("NIMUReceivePacket: got a Mcast packet!\n");
                ptr_pkt->Flags |= FLG_PKT_MACMCAST;
            }
        }

    So, I'm trying to figure out why I'm never hitting the above print in bold.  But, I'm suspecting that this is a driver issue.  Perhaps something is not configured correctly for multicast in the driver for OMAPL138 ... this is also a possibility for your driver.

    Could you try putting the above print statement into your version of the NDK code?  To see if you are hitting that?

    Note that this will require a rebuild of the stack ... you can find a link to a wiki about that in the release notes for the NDK.

    Steve

  • Hi Pratik,

    I was able to finally get the multicast working here.  It works successfully on another hardware platform which uses the same NDK but a different driver.

    This tells me that the driver does not have multicast enabled.  I'm going to ask someone that knows the driver to help you on this.

    Thanks,

    Steve

  • Pratik,

    I am going to mark this thread as "answered", as I assume that any further discussion on this topic will take place in your other thread:

    http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/p/199755/751430.aspx#751430

    Dave