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.

CC3200 做WLAN模式时最大传输速率只有150kb,是我哪里设置有问题吗?

Other Parts Discussed in Thread: CC3200

你好,我使用CC3200,修改WLAN_AP例程,在里面添加了TCP/IP Client的功能。然后发送数据,发现在电脑端连接CC3200发出的WLAN后,接收速度只有150kb左右,请问下做WLAN模式最大速度能达到1.5Mbyte/s吗

  • 一般不会这么低,你用的SDK版本是多少
  • 你好我用的SDK版本是1.5.0
  • 然后我在没有修改例程的情况下,使用tcp_socket例程。选择里面的send TCP packets发送10M的数据,发现电脑端接收最高也只有150kb。点开网络共享中心查看无线网络连接状态发现速度是58Mbps,请问下这是什么情况
  • 看下手册16章,速率可以设置,:https://www.ti.com.cn/cn/lit/ug/swru368b/swru368b.pdf?ts=1604287434930&ref_url=https%253A%252F%252Fwww.ti.com.cn%252Fproduct%252Fcn%252FCC3200 

    user6458813 说:
    点开网络共享中心查看无线网络连接状态发现速度是58Mbps

    这应该包括了PC和路由器的带宽

  • 你好,请问下。16章讲的是引脚配置,个人觉得是制作PCB板布线才需要关注的一章把。可是我使用的是您公司的开发板,整章看下来没有看到关于速率方面的问题啊。
  • 16章和引脚配置没有关系

    将你的终端测试数据传上来看看

  • 好的,这是我的WLAN设置:
    static int ConfigureMode(int iMode)
    {
    long lRetVal = -1;

    UART_PRINT("Enter the AP SSID name: ");

    lRetVal = sl_WlanSetMode(ROLE_AP);
    ASSERT_ON_ERROR(lRetVal);

    sl_Stop(0);
    sl_Start(NULL,NULL,NULL);
    //设置WLAN名字
    lRetVal = sl_WlanSet(SL_WLAN_CFG_AP_ID, WLAN_AP_OPT_SSID, strlen(pcSsidName),
    (unsigned char*)pcSsidName);
    ASSERT_ON_ERROR(lRetVal);
    //设置WLAN密码
    _u8 val = SL_SEC_TYPE_WPA_WPA2;
    lRetVal = sl_WlanSet(SL_WLAN_CFG_AP_ID, WLAN_AP_OPT_SECURITY_TYPE, 1, (_u8 *)&val);
    ASSERT_ON_ERROR(lRetVal);

    lRetVal = sl_WlanSet(SL_WLAN_CFG_AP_ID, WLAN_AP_OPT_PASSWORD, strlen(wifikey), (_u8 *)wifikey);
    ASSERT_ON_ERROR(lRetVal);
    //设置通道,这里设置为1
    val = 1;
    sl_WlanSet(SL_WLAN_CFG_AP_ID, WLAN_AP_OPT_CHANNEL, 1, (_u8 *)&val);

    unsigned char power = 15;
    _u8 appower=(_u8)power;
    sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID, WLAN_GENERAL_PARAM_OPT_AP_TX_POWER,1,(_u8 *)&appower);

    // Set PM policy to normal 将电源策略设置为低延迟
    lRetVal = sl_WlanPolicySet(SL_POLICY_PM , SL_LOW_LATENCY_POLICY, NULL, 0);
    ASSERT_ON_ERROR(lRetVal);

    UART_PRINT("Device is configured in AP mode\n\r");

    /* Restart Network processor */
    lRetVal = sl_Stop(SL_STOP_TIMEOUT);

    // reset status bits
    CLR_STATUS_BIT_ALL(g_ulStatus);

    return sl_Start(NULL,NULL,NULL);
    }

    在发送部分:
    int InitBsdTcpClient(unsigned long ulIpAddr)
    {
    // 填充TCP服务的socker地址
    sAddr.sin_family = SL_AF_INET;
    sAddr.sin_port = sl_Htons((unsigned short)1234);
    sAddr.sin_addr.s_addr = sl_Htonl((unsigned int)ulIpAddr);
    // creating a TCP socket
    iSockID = sl_Socket(SL_AF_INET,SL_SOCK_STREAM, 0);
    if( iSockID < 0 )
    {
    ASSERT_ON_ERROR(SOCKET_CREATE_ERROR);
    }
    // connecting to TCP server
    iStatus = sl_Connect(iSockID, ( SlSockAddr_t *)&sAddr, iAddrSize);
    if( iStatus < 0 )
    {
    // error
    sl_Close(iSockID);
    ASSERT_ON_ERROR(CONNECT_ERROR);
    }
    }

    主函数的传输部分:
    unsigned char g_ucRxBuff_B[1024];//这里我全部初始化为0
    while(1)
    {
    lRetVal = sl_Send(iSockID, g_ucRxBuff_B, 1024, SL_RAW_RF_TX_PARAMS(1, RATE_54M,1, 0) );
    }
    然后测试端使用TCP助手接收,网速是查看360网络测速看的实时速率
  • 您好,要不请问下有没有CC3200测试wlan速率的Demo,还有sl_Send可以同时发送多个吗?
  • 没有直接测试的例程,你可以用手机安装Iperf测试下可以看到速率,sl_Send一次只能发送一个
    /*! \brief write data to TCP socket This function is used to transmit a message to another socket. Returns immediately after sending data to device. In case of TCP failure an async event SL_SOCKET_TX_FAILED_EVENT is going to be received. In case of a RAW socket (transceiver mode), extra 4 bytes should be reserved at the end of the frame data buffer for WLAN FCS \param[in] sd socket handle \param[in] buf Points to a buffer containing the message to be sent \param[in] Len message size in bytes. Range: 1-1460 bytes \param[in] flags Specifies the type of message transmission. On this version, this parameter is not supported for TCP. For transceiver mode, the SL_RAW_RF_TX_PARAMS macro can be used to determine transmission parameters (channel,rate,tx_power,preamble) \return Return the number of bytes transmitted, or -1 if an error occurred \sa sl_SendTo \note belongs to \ref send_api \warning \par Example: \code An example of sending data: SlSockAddrIn_t Addr; _i16 AddrSize = sizeof(SlSockAddrIn_t); _i16 SockID; _i16 Status; _i8 Buf[SEND_BUF_LEN]; Addr.sin_family = SL_AF_INET; Addr.sin_port = sl_Htons(5001); Addr.sin_addr.s_addr = sl_Htonl(SL_IPV4_VAL(10,1,1,200)); SockID = sl_Socket(SL_AF_INET,SL_SOCK_STREAM, 0); Status = sl_Connect(SockID, (SlSockAddr_t *)&Addr, AddrSize); Status = sl_Send(SockID, Buf, 1460, 0 ); \endcode */ #if _SL_INCLUDE_FUNC(sl_Send ) _i16 sl_Send(_i16 sd, const void *buf, _i16 Len, _i16 flags); #endif