How to Determine Cause of tftpXfer Problem - searched kb, docs, faqand this group - VxWorks

This is a discussion on How to Determine Cause of tftpXfer Problem - searched kb, docs, faqand this group - VxWorks ; Is there a good troubleshooting technique for determining why tftpXfer is failing? I have read the docs, searched the faq, and looked through some posts here but still can not seem to find the problem. I am attempting what should ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: How to Determine Cause of tftpXfer Problem - searched kb, docs, faqand this group

  1. How to Determine Cause of tftpXfer Problem - searched kb, docs, faqand this group

    Is there a good troubleshooting technique for determining why tftpXfer
    is failing? I have read the docs, searched the faq, and looked through
    some posts here but still can not seem to find the problem.

    I am attempting what should be the simplest tftpXfer example ever - to
    print the contents of a text file that is on the tftp server. I pretty
    much used the Wind River example code and added some error reporting.
    However, all I am getting is a return value of -1 and some unhelpful
    debug messages:

    ERR [TFTP] connectOverLoopback:1310: socket error
    ERR [TFTP] tftpXfer:401: connectOverLoopback() failed for data socket

    Searches showed that some people had port zero so I started explicitly
    specifying port 69. This did not change the behavior.

    The Wind River knowledge base mentioned a tftpTask at one point but I
    could not find any documentation about that task. Just to be through I
    tried calling tftpInit before the tftpXfer call but that does not seem
    to have changed anything.

    Is there any way to get more information from tftpXfer to find out why
    it failed? Are there common tftpXfer newbie mistakes that I might be
    making?

    Thanks for your time and help!

  2. Re: How to Determine Cause of tftpXfer Problem - searched kb, docs,faq and this group

    Well, I didn't find any help here but I did find out what I was doing
    wrong... hopefully my posting up will help the next person.

    In vxWorks 6.2 the tNetTask runs at priority 50. That task is used to
    service the tftpXfer. If you attempt to run tftpXfer at a higher
    priority it will return ERROR and set ERRNO to EWOULDBLOCK. (Which is
    what I was seeing). The problem was occurring in my case because I
    was calling my code directly from the host shell - which was running
    it at priority 4. Once I started running spawning it from the shell
    using sp() the code started working as it was then running at priority
    100.

    Cudo's to Wind River's support for immediately recognizing the cause
    of the problem. (Black mark for Wind River for not documenting
    EWOULDBLOCK as possible response and its cause)

+ Reply to Thread