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.

WL18xx R8.4 Multicast

Other Parts Discussed in Thread: WL1835

Dear Sirs:

  We are now using the WL1803 with R8.4 driver, however, we faced a problem that the multicast is not received in the application. However, with the same multicast setting in kernel and route, we are able to receive the same multicast group 224.1.1.1 and 225.1.1.1 in driver R8.3SP1.

  Meanwhile, the unicast and the broadcast traffic is okay.

  Do you have any idea for this?

  The mode we are using is AP mode, siso20 setting in 2.4GHz.

Regards,

/ckhsu

  • Hi,

    This is not expected...
    Can you share the exact recreation steps so I can try it on my setup here?

    Regards,
    Gigi Joseph.

  • Hi Joseph:

      Here are my test steps in both R8.3SP1 and R8.4, and only R8.3SP1 can receive the multicast. The kernel configuration is identical.

    1. Insert modules including compat.ko, cfg80211.ko, mac80211.ko, wlcore.ko, wl18xx.ko, wlcore_sdio.ko ( We use  sdio interface to connect WL1803)

    2. iw reg set US

    3. ifconfig wlan0 192.168.11.1 netmask 255.255.255.0 up

    4. hostapd -B /tmp/hostapd.v2.ol_r8.a8.10.conf -P /tmp/hostapd.pid

    Start hostapd in 2.4GHz by using following configurations:

    =========================================

    driver=nl80211
    logger_syslog=-1
    logger_syslog_level=2
    logger_stdout=-1
    logger_stdout_level=2
    dump_file=/tmp/hostapd.dump
    ctrl_interface=/var/run/hostapd
    hw_mode=g
    channel=1
    beacon_int=100
    dtim_period=2
    max_num_sta=255
    rts_threshold=2347
    fragm_threshold=2346
    supported_rates=60 120 240 360 480 540
    basic_rates=60 120 240
    preamble=1
    ignore_broadcast_ssid=0
    wpa_group_rekey=0
    wpa_gmk_rekey=0
    wpa_ptk_rekey=0
    interface=wlan0
    ssid=OL_R8_A8_10
    macaddr_acl=0
    auth_algs=3
    wmm_enabled=1
    wmm_ac_bk_cwmin=4
    wmm_ac_bk_cwmax=10
    wmm_ac_bk_aifs=7
    wmm_ac_bk_txop_limit=0
    wmm_ac_bk_acm=0
    wmm_ac_be_aifs=3
    wmm_ac_be_cwmin=4
    wmm_ac_be_cwmax=10
    wmm_ac_be_txop_limit=0
    wmm_ac_be_acm=0
    wmm_ac_vi_aifs=2
    wmm_ac_vi_cwmin=3
    wmm_ac_vi_cwmax=4
    wmm_ac_vi_txop_limit=94
    wmm_ac_vi_acm=0
    wmm_ac_vo_aifs=2
    wmm_ac_vo_cwmin=2
    wmm_ac_vo_cwmax=3
    wmm_ac_vo_txop_limit=47
    wmm_ac_vo_acm=0
    uapsd_advertisement_enabled=1
    wep_rekey_period=0
    own_ip_addr=127.0.0.1

    ap_table_max_size=255
    ap_table_expiration_time=60
    wps_state=2
    ap_setup_locked=1
    uuid=12345678-9abc-def0-1234-56789abcdef0
    eap_server=1
    disassoc_low_ack=1
    ap_max_inactivity=10000
    ieee80211n=1
    ht_capab=[SHORT-GI-20]
    # information elements
    device_name=Blaze
    manufacturer=TexasInstruments
    model_name=TI_Connectivity_module
    model_number=wl18xx
    serial_number=12345
    device_type=0-00000000-0
    wpa=3

    wpa_passphrase=12345678

    wpa_key_mgmt=WPA-PSK

    wpa_pairwise=CCMP TKIP
    ==============================================

    5. route add -net 0.0.0.0 gw 192.168.11.1 dev wlan0

    6. route add -net 224.1.1.1 netmask 255.255.255.255 wlan0

    7. route add -net 239.1.1.1 netmask 255.255.255.255 wlan0

    8. Start DHCP server in background

    9. Start a Multicast receiver.

    ==================================

    #include <stdio.h>
    #include <stdlib.h>
    #include <sys/types.h>
    #include <sys/time.h>
    #include <sys/msg.h>
    #include <time.h>
    #include <unistd.h>
    #include <ctype.h>
    #include <string.h>
    #include <sys/socket.h>
    #include <sys/ioctl.h>
    #include <netinet/in.h>
    #include <arpa/inet.h>
    #include <net/if.h>
    #include <sched.h>
    #include <pthread.h>
    #include <signal.h>

        #define DEBUG(args...)              \
                fprintf( stdout, args);     \
                fflush( stdout);

    static int discover_fd = 0;

    static void BindSocket(char *pInterface)
    {
        struct sockaddr_in  s;
        int                 on = 1;
        struct ip_mreq      mreq;
        const int           loopback = 0; /* no loopback */
        int                 RC = 0;

        /* Clean discover_fd */
        if(discover_fd > 0)
        {
            close(discover_fd);
            discover_fd = 0;
        }

        do
        {
            /* Open discover socket */
            if((discover_fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0)
            {
                DEBUG("Discover socket create error\n");
                break;
            }

            s.sin_family      = AF_INET;
            s.sin_addr.s_addr = htonl(INADDR_ANY);
            s.sin_port        = htons(3455);

            if(bind(discover_fd, (struct sockaddr *) &s, sizeof(s)))
            {
                DEBUG("socket bind error\n");
                break;
            }

            if(ioctl(discover_fd, FIONBIO, &on) < 0)
            {
                DEBUG("socket ioctl error\n");
                break;
            }

            /* join a multicast group */
            if(setsockopt(discover_fd,IPPROTO_IP,IP_MULTICAST_LOOP,
                          (char*)&loopback,sizeof(loopback)) != 0)
            {
                DEBUG("socket error IP_MULTICAST_LOOP\n");
                break;
            }

            mreq.imr_multiaddr.s_addr = inet_addr("224.1.1.1");
            mreq.imr_interface.s_addr = INADDR_ANY;
            if(setsockopt(discover_fd, IPPROTO_IP, IP_ADD_MEMBERSHIP,
                         (char *)&mreq, sizeof(mreq)) != 0)
            {
                DEBUG("socket error join multicast\n");
                break;
            }

            RC = 1;
        } while(0);

        if(RC)
        {
            DEBUG("socket init OK on %s, enter service loop\n", pInterface);
        }
        else
        {
            if(discover_fd > 0)
            {
                close(discover_fd);
                discover_fd = 0;
            }
        }
    }

    void ThreadInit( void)
    {
        BindSocket("wlan0");
    }

    static void ResponseMsg(int sockfd)
    {
        char               recvMsg[1600];
        int                 len;
        struct sockaddr_in  from;
        int                 fromLen = sizeof(from)/sizeof(char);

        memset(recvMsg, 0x0, 1600);
        len = recvfrom(sockfd,
                       recvMsg,
                       1400,
                       0,
                       (struct sockaddr *)&from,
                       (socklen_t *)&fromLen);

        if(len > 0)
        {

            DEBUG("received: %s\r\n", recvMsg);

        }
    }

    void ThreadLoop( void)
    {
        fd_set          read_fd;
        struct timeval  seltime;

        DEBUG("ThreadLoop %s: %s\r\n", __DATE__, __TIME__);

        /* setup signal handlers */
        FD_ZERO(&read_fd);
        if(discover_fd > 0)
        {
            FD_SET(discover_fd, &read_fd);

            seltime.tv_sec  = 1;
            seltime.tv_usec = 0;
            if(select(discover_fd+1, &read_fd, 0, 0, &seltime) < 0)
            {
                /* Some errors happened */
                DEBUG("select error, abort**********\r\n");
                return;
            }

            if(FD_ISSET(discover_fd, &read_fd))
            {
                DEBUG("Discover receive\r\n");
                ResponseMsg( discover_fd);
            }
            else
            {
                DEBUG("Discover: select timeout\r\n");
            }

        }
    }

    int main( void)
    {
        struct  timeval selTime;

        ThreadInit();

        while(1)
        {
            ThreadLoop();

            selTime.tv_sec  = 0;
            selTime.tv_usec = 5000;
            select( 0, NULL, NULL, NULL, &selTime);
        }

        return 0;
    }

    =============================

    10. When using R8.3SP1, we are able to receive the multicast 224.1.1.1 in the application, but with R8.4, we receive nothing. Even we change the step 6 to use a mask 240.0.0.0 to include all multicast.

    Regards,

    /ckhsu

  • Hi Joseph:

      By the way, for the broadcast, the normal AP will forward a broadcast packet ( To 255.255.255.255 FF-FF-FF-FF-FF-FF)to other STA. But in WL18xx AP mode, it can rceive the packet in AP application, but will not receive in the STA connect to that WL18xx AP.

    Regards,

    /ckhsu

  • Dear Sirs:

      Is there any progress on the issue or I should told the customer for this situation?

    Regards,

    /ckhsu

  • Dear Sirs:

      Please skip the broadcast, focus on the multicast issue. The broadcast is now confirmed just a configuration issue on our environment.

    Regards,

    /ckhsu

  • Dear Sirs:

      Not only receiving, but also sending multicast is impossible in this version.

     I also tried to use the LLDP in linux,

    http://vincentbernat.github.io/lldpd/

      And clearly, it is not working in R8.4.

    Regards,

    /ckhsu

  • Hi,

    I just tried your app on R 8.4 and could receive multicast packets successfully... The only difference is, I used the conf files (hostapd.conf/udhcpd.conf) from http://processors.wiki.ti.com/index.php/WiLink8_WLAN_Demo:_Linux#AP_.28create_AP_with_no_security.29

    I think you can start with this version, and keep adding your specific parameters. Some of them are not supported.
    For eg: max_num_sta in your case is "255". We don't support this. The max supported is "10".

    Please see "wl18xx-target-scripts/conf/hostapd.conf" for the supported parameters & value.

    Regards,
    Gigi Joseph.

  • Hi Joseph:

      Thank you for the reply. And we tried in max_num_sta=10, but the result is the same. And we will tried again in no encryption mode.

      Can you tell us what's the version of SDK you are using? We are testing this in SDK6.0 kernel.

    Regards,

    /ckhsu

  • Hi,

    I used SDK 7.0 - with the hostapd.conf I mentioned.

    You can try with the same hostapd.conf that I used and confirm if it works at your end too and then add each parameter for your specific usecase. 

    Regards,
    Gigi Joseph.

  • Joseph Gigi said:
    think you can start with this version, and keep adding your specific parameters. Some of them are not supported

    Hi Joseph,

    We have been trying to send udp multicast messages on the WiFi network over the wl1835. The multicast messages don't show up on the WiFi network (they are not blocked by the WiFi network because they are visible when running the same code on a laptop with WiFi). I have looked on the e2e forums and noticed a few posts about multicast and the wl18xx, which makes me wonder if the driver we have supports multicast.

    Can you comment on driver support for multicast? If supported, which driver version did it start?

    Patrick

  • Hi Patrick,

    Multicast is supported from the beginning...

    Regards,
    Gigi Joseph.