Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用PIC32 starter kit的TCP/IP通信上可能的最大字节数传输_Tcp_Embedded_Microcontroller_Pic_Pic32 - Fatal编程技术网

使用PIC32 starter kit的TCP/IP通信上可能的最大字节数传输

使用PIC32 starter kit的TCP/IP通信上可能的最大字节数传输,tcp,embedded,microcontroller,pic,pic32,Tcp,Embedded,Microcontroller,Pic,Pic32,我正在使用PIC32starter工具包与主机s/w进行以太网通信 主机软件-服务器,PIC32-客户端 我想知道,每次发送API调用最多可以发送多少字节 到目前为止,我试图发送130字节,但主机只能接收125字节。若我试图在主机发送任何数据之前发送超过125字节的数据,那个么发送API返回的错误是FIFO full 但,若主机发送任何数据,我可以再次发送125字节 我的应用程序只需要从PIC32传输到以KBs为单位的数据 这是代码- while(ubyIterationCounter <

我正在使用
PIC32
starter工具包与主机s/w进行以太网通信

主机软件-服务器,PIC32-客户端

我想知道,每次发送API调用最多可以发送多少字节

到目前为止,我试图发送130字节,但主机只能接收125字节。若我试图在主机发送任何数据之前发送超过125字节的数据,那个么发送API返回的错误是FIFO full

但,若主机发送任何数据,我可以再次发送125字节

我的应用程序只需要从PIC32传输到以KBs为单位的数据

这是代码-

while(ubyIterationCounter < 20)
    {
        while(uwDataIndex <= 500)
        {

            wTransmittedBytes = send(vstLEUCommTCPIPVar.LEUCommClientSock, (char *)(rgubyDummyData + uwDataIndex), uwTxLen, 0);

            if (wTransmittedBytes == ZERO)
            {
                //No data sent
            }   
            else if (wTransmittedBytes < ZERO)
            {
                DelayMs(50);
                vstLEUCommTCPIPVar.ubyCurrentTCPIPState = CLOSE_SOCKET;

                ubyErrorFlag = SET;
                break;

            }   
            else
            {
                uwDataIndex += (wTransmittedBytes - 1);
                uwTxLen -= wTransmittedBytes;
                //DelayMs(1000);
            }
        }
        if (ubyErrorFlag != SET)
        {
            ubyIterationCounter++;
            uwTxLen = 500;
            uwDataIndex =0;
            wTransmittedBytes = 0;
            DelayMs(10);
        }
        else
        {
            test++;
            break;
        }
    }
while(ubyIterationCounter<20)
{

虽然(uwDataIndex)发生这种情况的原因有很多,如果您想得到答案,请提供您使用的代码。我们在这里不了解您的想法。@Kbart我已经添加了代码。请看一看。。