Note that there are some explanatory texts on larger screens.

plurals
  1. POi get a tftp timeout from vxworks
    text
    copied!<p>I wrote some code on VxWorks to download a file from a TFTP server using <code>tftpLib</code> but the get gives me a timeout:</p> <pre><code>ERR [TFTP] tftpSend:479: Transfer Timed Out. ERR [TFTP] tftpGet:1077: File transfer error. Error has occurred: 4915207 </code></pre> <p>which isn't right as the host is reachable: </p> <pre><code>ping("3.94.213.53",3) Pinging 3.94.213.53 (3.94.213.53) with 64 bytes of data: Reply from 3.94.213.53 bytes=64 ttl=63 seq=0 time&lt;1ms Reply from 3.94.213.53 bytes=64 ttl=63 seq=1 time&lt;1ms Reply from 3.94.213.53 bytes=64 ttl=63 seq=2 time&lt;1ms </code></pre> <p>and when I do this from the Linux shell, it works just as expected:</p> <pre><code>tftp -r "artifacts/ngfm.bin" -g 3.94.213.53 </code></pre> <p>What might be the problem here? The get section of my code looks like:</p> <pre><code>pFile = fopen("flash:/ngfm.bin","wb"); if (pFile != NULL) { /* Get file from TFTP server and write it to the file descriptor */ if (OK == (status = tftpGet (pTftpDesc, pFilename, pFile, TFTP_CLIENT))) { printf("tftpGet() successful\n"); } else { printf("Error has occurred: %d\n", errno); // errno is where the error is stored } } else { printf("Bad file pointer pFile"); } </code></pre> <p><strong>edit:</strong></p> <p>The code I have above the get portion is:</p> <pre><code>/*Initiate TFTP session*/ if ((pTftpDesc = tftpInit ()) == NULL) printf("Error on tftpInit()\n"); /*connect to TFTP host and set transfer mode*/ if ((tftpPeerSet (pTftpDesc, pHost, port) == ERROR) || (tftpModeSet (pTftpDesc, pMode) == ERROR)) { (void) tftpQuit (pTftpDesc); printf("Error on tftpPeerSet()\n"); return ERROR; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload