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.

CC3220SF-LAUNCHXL: Gratuitous ARP using the SimpleLink stack.

Part Number: CC3220SF-LAUNCHXL

Hi,

The WiFi chip on our sensor is running code similar to the network_terminal example.
It is currently running the latest stack version: simplelink_cc32xx_sdk_3_40_00_05.

In the our wireless routers, we have found that the TI WiFi chip is not showing up in its -ARP list. (All other devices do.)
We are wondering, does the SimpleLink stack do a gratuitous ARP after obtaining an IP address?

If not, is there a way that we can command the WiFi chip to do an ARP?

Thanks, Glenn.

  • Hi Glenn,

    Have you tried performing some network activity that would trigger an ARP on the CC3220? As part of your code, you'll probably be connecting to a remote server and as part of that connection the CC3220 will perform an ARP automatically. This ARP should populate your AP's ARP list.

    That being said, there is a method to trigger a manual ARP request. You can open a raw socket, build the ARP request, and then send out this ARP request. I detail this procedure in my post here:

    https://e2e.ti.com/support/wireless-connectivity/wifi/f/968/p/845693/3134002#3134002

    Let me know if you need more clarification or have further questions on performing that ARP.

    Regards,

    Michael

  • Hi Michael,

    I tried using the code you referenced, my version attached below.
    I verified my IP and my gateway and I can ping my address and see that on the Wireshark capture.
    I don't see any ARPs from this send.

    Do you see anything wrong in my function?

    Thanks, Glenn.

    int WiFi_Send_Arp(void)
    {
       int len, lstatus;
       char buf[100];

       struct arp_hdr* arp1;
       struct arp_ethip* ethip;
       struct arp_eth_hdr* ethhdr1;
       unsigned char dest_mac[6] = {0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF};
       unsigned char eth_type[2] = {0x08, 0x06};

      //Check for network connection
       if ( !(app_CB.CON_CB.IpAddr) && !(app_CB.CON_CB.GatewayIP) )
           return -3;

      //setup the packet
       ethhdr1 = (struct arp_eth_hdr*)buf;
       memcpy(ethhdr1->dst_mac, dest_mac, ETH_ADDR_LEN);
       memcpy(ethhdr1->src_mac, myMacAddress, ETH_ADDR_LEN);
       memcpy(ethhdr1->type, eth_type, 2); 

       arp1 = (struct arp_hdr*)(buf+ ETH_HDR_LEN);
       arp1->ar_hrd = sl_Htons(ARP_HRD_ETH);
       arp1->ar_pro = sl_Htons(ARP_PRO_IP);
       arp1->ar_hln = ETH_ADDR_LEN;
       arp1->ar_pln = IP_ADDR_LEN;
       arp1->ar_op = sl_Htons(ARP_HRD_ETH);

       ethip = (struct arp_ethip*)(buf + ARP_HDR_LEN + ETH_HDR_LEN);
       memcpy(ethip->ar_sha, myMacAddress, ETH_ADDR_LEN);
       memcpy(ethip->ar_spa, (void *)app_CB.CON_CB.IpAddr, IP_ADDR_LEN); //src IP
       memcpy(ethip->ar_tha, dest_mac, ETH_ADDR_LEN);
       memcpy(ethip->ar_tpa, (void *)app_CB.CON_CB.GatewayIP, IP_ADDR_LEN); //dst IP                 

       len = ARP_HDR_LEN + ARP_ETHIP_LEN + ETH_HDR_LEN;

      //send the packet
       lstatus = sl_Send(app_CB.socket, buf, len, 0);
       return (lstatus);
    }

  • you can close this. I.m working now.