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.

CCS: [CC3220SF/SDK4.10] How to capture NWP log?

Other Parts Discussed in Thread: CC3220SF, CC3120, SYSCONFIG

Tool/software: Code Composer Studio

Hi TI,

I use network_terminal_CC3220SF_LAUNCHXL_tirtos_ccs to try and follow following link, I don't find out the file of CC3220SF_LAUNCHXL.c or CC3220SF_LAUNCHXL_initGeneral. Please show me how to capture NWP log. Thanks.

  • Hi Eric,

    With the introduction of SysConfig generating the driver source files, the instructions have updated a bit. Please see the Capture NWP Log section of the NWP Programmer's Guide.

    Best regards,

    Sarah

  • Hi Sarah,

    Thanks. I will check it first.

  • Hi Sarah,

    If I use ubuntu to capture NWP log, only 2 tty devices show up, ttyACM0 and ttyACM1. Which should I use? and How do I know the binary log is correct? Thanks.

  • Hi Eric,

    Are you using the CC3xxxEMUBOOST or a serial-to-USB converter?

    I would expect to see ttyACM0 and ttyACM1 if you are plugging in the LaunchPad. You should see ttyUSBx for a FTDI cable.

    Best regards,

    Sarah

  • Hi Sarah,

    I'm using CC3220SF LAUNCHXL board, I think I use serial-to-USB converter to access console.

    I do not see ttyUSBx when I plugged the LaunchPad, so ttyUSBx should show up when I enable capture NWP log feature?

    Thanks.

  • Hi Eric,

    You cannot collect NWP logs with just the LaunchPad, as the XDS110 on-board is tied to certain pins. You need an external serial-to-USB converter or a CC3xxxEMUBOOST in order to access pin 62.

    Why are you trying to collect NWP logs? They are not readable by users. They are used for advanced debug by TI engineers.

    Best regards,

    Sarah

  • HI Sarah,

    Okay, I will try to use pin 62 to get NWP log.

    I need the NWP log because when I trigger WPS to connect AP, CC3220SF can learn IP from AP, but PC can not ping it sometimes.

    Even if I unplug/plug the power, I still can not ping CC3220SF after it learn the IP from AP.

    I dont know how to debug it. If you can help me, I can post my code over here to discuss it. Thanks.

  • Hi Eric,

    I don't think the NWP logs would give you information as to why the CC3220 is not receiving the ping. What is the error on the PC side? Can you collect sniffer captures and make sure the ping is being forwarded?

    We addressed this issue in your previous post: https://e2e.ti.com/support/wireless-connectivity/wifi/f/968/t/897907

    Are you still seeing the error with the latest servicepack? What power policy are you using?

    Best regards,

    Sarah

  • Hi Sarah,

    Please check the wireshark file at attachment.

    When I power on CC3220SF, we can learn platform can connect to AP and get IP with 192.168.143.103.

    [536880560:SimpleLinkWlanEventHandler@0405]: [WLAN EVENT] Device Connected to the AP: Psychesnet_Home_4F
    [536880560:SimpleLinkNetAppEventHandler@0486]: [NETAPP EVENT] IP Acquired: IP=192.168.143.103, Gateway=192.168.143.254
    

    At fail_to_ping file, we know CS3220SF learn IP and send MDNS to LAN from NO.1~8.

    After few seconds, I try to ping CC3220SF, always fail to ping. You can learn it from fail_to_ping file, too.

    eric@eric-HP-ZBook-14u-G6:~$ ping 192.168.143.103
    PING 192.168.143.103 (192.168.143.103) 56(84) bytes of data.
    From 192.168.143.101 icmp_seq=1 Destination Host Unreachable
    From 192.168.143.101 icmp_seq=2 Destination Host Unreachable
    From 192.168.143.101 icmp_seq=3 Destination Host Unreachable
    From 192.168.143.101 icmp_seq=4 Destination Host Unreachable
    From 192.168.143.101 icmp_seq=5 Destination Host Unreachable
    From 192.168.143.101 icmp_seq=6 Destination Host Unreachable
    From 192.168.143.101 icmp_seq=7 Destination Host Unreachable
    From 192.168.143.101 icmp_seq=8 Destination Host Unreachable
    From 192.168.143.101 icmp_seq=11 Destination Host Unreachable
    From 192.168.143.101 icmp_seq=12 Destination Host Unreachable
    From 192.168.143.101 icmp_seq=13 Destination Host Unreachable
    From 192.168.143.101 icmp_seq=14 Destination Host Unreachable
    From 192.168.143.101 icmp_seq=15 Destination Host Unreachable
    From 192.168.143.101 icmp_seq=16 Destination Host Unreachable
    From 192.168.143.101 icmp_seq=17 Destination Host Unreachable
    From 192.168.143.101 icmp_seq=18 Destination Host Unreachable
    ^C
    

    At power policy part, please check following code.

                /*
                 * Disable scan policy with a hidden SSID scan
                 */
                if (sl_WlanPolicySet(SL_WLAN_POLICY_SCAN, SL_WLAN_SCAN_POLICY(0, 0), NULL, 0) != 0) {
                    warning("disable scan policy failed\n");
                }
                /*
                 * Removing a filter is initiated by removing the filter from the active filters list.
                 */
                SlWlanRxFilterOperationCommandBuff_t filter_mask = {{0}};
                memset(filter_mask.FilterBitmap, 0xFF, 8);
                sl_WlanSet(SL_WLAN_RX_FILTERS_ID, SL_WLAN_RX_FILTER_REMOVE,
                        sizeof(SlWlanRxFilterOperationCommandBuff_t), (uint8_t *) &filter_mask);
                /*
                 * Power manager policy
                 */
                if (sl_WlanPolicySet(SL_WLAN_POLICY_PM, SL_WLAN_NORMAL_POLICY, NULL, 0) != 0) {
                    warning("fail to set power normal policy\n");
                }
                /*
                 * Auto – The device tries to connect to an AP from the stored profiles based on priority.
                 * Up to seven profiles are supported. On the connection attempt,
                 * the device selects the highest priority profile.
                 * If several profiles are within the same priority,
                 * the decision is made based on the security type (WPA \ WPA2 > WEP > OPEN).
                 * If the security type is also the same, the selection is based on the received signal strength.
                 */
                if (sl_WlanPolicySet(SL_WLAN_POLICY_CONNECTION,
                            SL_WLAN_CONNECTION_POLICY(1, 0, 0, 0), NULL, 0) != 0) {
                    warning("fail to set connection policy\n");
                }
                /*
                 * Disable soft-rooming
                 */
                SlWlanRegisterLinkQualityEvents_t link_quality;
                link_quality.Enable = 0;
                link_quality.TriggerId = 1;
                link_quality.Metric = SL_WLAN_METRIC_EVENT_RSSI_BEACON;
                link_quality.Direction = SL_WLAN_RSSI_EVENT_DIR_LOW;
                link_quality.Threshold = 0;
                link_quality.Hysteresis = 0;
                link_quality.Type = SL_WLAN_RX_QUALITY_EVENT_LEVEL;
                link_quality.Pacing = 0;
                if (sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID,
                            SL_WLAN_GENERAL_PARAM_REGISTER_LINK_QUALITY_EVENT,
                            sizeof(SlWlanRegisterLinkQualityEvents_t), (_u8 *)&link_quality) != 0) {
                    warning("fail to disable soft-rooming\n");
                }
                // Set country code
                const unsigned char country[] = "US";
                if (sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID, SL_WLAN_GENERAL_PARAM_OPT_COUNTRY_CODE, 2, country) != 0) {
                    error("fail to set country code");
                    break;
                }
                /*
                 * TI recommand every 500ms need to send a packet to router to keep connection
                 */
                SlWlanPmPolicyParams_t power_policy;
                memset(&power_policy, 0x00, sizeof(power_policy));
                power_policy.MaxSleepTimeMs = 500;
                if (sl_WlanPolicySet(SL_WLAN_POLICY_PM, SL_WLAN_LONG_SLEEP_INTERVAL_POLICY,
                            (uint8_t *)&power_policy, sizeof(power_policy)) != 0) {
                    warning("fail to set max sleep power timer\n");
                }
                if (sl_WlanSetMode(ROLE_STA) < 0) {
                    error("fail to enter sta mode\n");
                    break;
                }
                // Stops the SimpleLink device
                sl_Stop(SIMPLE_LINK_STOP_TIMEOUT);
                if (sl_Start(NULL, NULL, NULL) != ROLE_STA) {
                    error("fail to start sta mode\n");
                    break;
                }
                prompt("start sta mode okay\n");
    

    Please help. We want our board it is stable with wifi feature. Thanks.fail.tar.gz

  • Hi Sarah,

    Any update? Thanks.

  • Hi Eric,

    Did you save a filtered capture? I only see ~50 lines and there is no real traffic occurring on that channel.

    Best regards,

    Sarah

  • Hi Sarah,

    Looks like is my problem of AP. Thank you very much.