[erlang-questions] In what way am I misusing inet's tftpd?

Brian L. Troutwine <>
Fri Jul 27 23:37:56 CEST 2012

I'm attempting to use inet's tftp, but I'm doing something incorrectly. I have a simple example application here: https://github.com/blt/tftp-problems While tftp-problemst does bind to the correct port, it never returns data to a client.

To reproduce, open a terminal in the project root and:

    make && ./bin/console

This should boot the tftp_hellp application, and drop you into an erlang shell. Confirm that inets is running:

    1> application:which_applications().
    [{inets,"INETS  CXC 138 49","5.9"},
     {sasl,"SASL  CXC 138 11","2.2.1"},
     {stdlib,"ERTS  CXC 138 10","1.18.1"},
     {kernel,"ERTS  CXC 138 10","2.15.1"}]

and that the tftp daemon is running:

    2> inets:services().

Great. Now, if you look in `etc/inets.config` you'll notice we're binding tftpd to 6969. Open another terminal and:

    > tftp localhost 6969
    tftp> get hello.txt
    Transfer timed out.

Bother. If my understanding of tftpd were correct--which clearly it's not--we'd get `<<"hello world">>` back.

What am I doing wrong?

- blt

More information about the erlang-questions mailing list