keep getting NET_ERR_TX

keep getting NET_ERR_TX

Home Forums Networking Software keep getting NET_ERR_TX

Tagged: , ,

This topic contains 2 replies, has 1 voice, and was last updated by  James Ren 1 week, 1 day ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #25893

    James Ren

    Dear all,

    I am using µC/TCP-IP 3.02 and Redpine RS9113 WiFi module. NetSock_TxData API is being used to send multiple data packages to a remote socket server via WiFi. I have more than 200 data packages. Each data package has 1448 bytes of payload. See the following code:

    ret = NetSock_TxData(TCP_Socket_ID, (uint8 *) &p_data, 1506, NET_SOCK_FLAG_TX_NO_BLOCK, &Net_Error);
    if ((Net_Error== NET_ERR_TX) || (Net_Error== NET_ERR_FAULT_LOCK_ACQUIRE))
    Printf(“NetSock_TxData() failed, Result = %d, Error = %d \n\r”, ret, Net_Error);
    Sleep(250); // delay 250ms
    } while (count_data_package > 0);

    When this process is running, I keep getting NET_ERR_TX and eventually the server is getting 0 length of data and disconnect. For most of time, about 60 out of 200 packages can be sent out and received by the server successfully. I was wondering what would cause NET_ERR_TX. Please advise. Thank you in advance.

    Here is WiFi device configuration:

    const NET_DEV_CFG_WIFI NetDev_Cfg_WiFi_0 = {

    NET_IF_MEM_TYPE_MAIN, /* NET_IF_MEM_TYPE_MAIN buffers allocated from main memory */
    1518u, /* size of large receive buffers (in octets) */
    20u, /* number of large receive buffers */
    4u, /* alignment of receive buffers (in octets) */
    4u, /* offset from base receive index, if needed (in octets) */

    NET_IF_MEM_TYPE_MAIN, /* NET_IF_MEM_TYPE_MAIN buffers allocated from main memory */
    1518u, /* size of large transmit buffers (in octets) */
    10u, /* number of large transmit buffers */
    60u, /* size of small transmit buffers (in octets) */
    4u, /* number of small transmit buffers */
    4u, /* alignment of transmit buffers (in octets) */
    0u, /* offset from base transmit index, if needed (in octets) */

    0x00000000u, /* address of dedicated memory, if available. */
    0u, /* size of dedicated memory, if available (in octets). */

    NET_DEV_CFG_FLAG_NONE, /* option flags, if any. */

    NET_DEV_BAND_2_4_GHZ, /* NET_DEV_BAND_2_4_GHZ the wireless band to use is 2.4Ghz. */

    12500000L, /* SPI Clock frequency (in Hertz). */

    NET_DEV_SPI_CLK_POL_INACTIVE_HIGH, /* NET_DEV_SPI_CLK_POL_INACTIVE_HIGH the clock is high when inactive. */

    NET_DEV_SPI_CLK_PHASE_FALLING_EDGE, /* NET_DEV_SPI_CLK_PHASE_FALLING_EDGE Data availables on failling edge. */

    NET_DEV_SPI_XFER_UNIT_LEN_8_BITS, /* SPI transfert unit length */

    NET_DEV_SPI_XFER_SHIFT_DIR_FIRST_MSB, /* SPI transfer shift direction */

    “”, /* device hardware address set at run-time */


    James Ren

    The socket error code 10053 or 10054 was returned by recv() in Winsock2 on server side on Windows 7.

    typo: const NET_DEV_CFG_WIFI NetDev_Cfg_WiFi_1 not const NET_DEV_CFG_WIFI NetDev_Cfg_WiFi_0

    Thank you.


    James Ren

    Problem solved by increased the number of large transmit buffers to 60u.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

View the complete site map