Changes between Initial Version and Version 1 of tftpserver


Ignore:
Timestamp:
10/22/2017 05:28:45 AM (2 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • tftpserver

    v1 v1  
     1[[PageOutline]]
     2
     3= TFTP Server =
     4A TFTP server is required for many steps involving gateworks boards.  It sometimes is not trivial.  '''Please use google to search around on instructions!.'''  Here are some examples.
     5
     6== Windows TFTP ==
     71. Setup a TFTP server. If you are using a Windows machine you will need to install a TFTP server program such as TFTP32.EXE by Philippe Jounin. This program is an open source TFTP server which can be downloaded from:[[BR]][[BR]]
     8
     9[http://tftpd32.jounin.net/][[BR]][[BR]]
     10[http://www.pcwdld.com/top-10-free-tftp-servers Other Free TFTP Servers for Windows][[BR]][[BR]]
     11
     122. On the TFTP server computer/laptop configure the IP address to: 192.168.3.1/ 255.255.255.0. Additionally, copy the needed files to your local TFTP32 directory (or whatever directory the TFTP server uses).
     13
     14Troubleshooting:
     15 * '''Please note, you will also need to turn off your Windows firewall or security program to allow access to the TFTP server.'''
     16 * May be necessary to go into tftpd64 and set the “Use anticipation window” to 65535 Bytes
     17
     18== Linux TFTP ==
     19
     20Here are a few tutorials that may help with setting up a Linux TFTP Server.[[BR]]
     21
     22
     23Notes:
     24 * The user may have to be set as a parameter user = root
     25
     26Links:
     27 * [http://www.cyberciti.biz/faq/install-configure-tftp-server-ubuntu-debian-howto/]
     28 * [https://linuxlink.timesys.com/docs/linux_tftp]
     29
     30
     31=== tftpd-hpa ===
     32Very popular TFTP server (recommended)
     33
     34Install the software on a Linux Desktop machine:
     35{{{
     36sudo apt-get install tftpd-hpa
     37}}}
     38
     39Modify the config file for the TFTP server software (/etc/default/tftpd-hpa) and set the directory to anything where you would like to host the files (example /var/www/html/tftpboot)
     40{{{
     41# /etc/default/tftpd-hpa
     42
     43TFTP_USERNAME="tftp"
     44TFTP_DIRECTORY="/var/www/html/tftpboot"
     45TFTP_ADDRESS="0.0.0.0:69"
     46TFTP_OPTIONS="--secure"
     47}}}
     48
     49Be sure the tftpboot directory has modified permissions and ownership:
     50{{{
     51sudo mkdir /var/www/html/tftpboot
     52sudo chmod -R 777 /var/www/html/tftpboot
     53sudo chown -R nobody /var/www/html/tftpboot
     54}}}
     55
     56To start:
     57{{{
     58test@test:~$ sudo service tftpd-hpa restart
     59tftpd-hpa stop/waiting
     60tftpd-hpa start/running, process 20566
     61
     62}}}
     63
     64Running
     65{{{
     66test@test:~$ ps -aef | grep tftp
     67root     20566     1  0  2014 ?        00:00:00 /usr/sbin/in.tftpd --listen --user tftp --address 0.0.0.0:69 --secure /tftpboot
     68
     69}}}
     70
     71
     72=== atftpd ===
     73A common TFTP server Gateworks has used is '''atftpd''' (example shown on Ubuntu 12.10)
     74
     75{{{
     76sudo apt-get install atftpd
     77}}}
     78
     79Modify the config file (/etc/default/atftpd) to below (where /tftpboot is the directory where files are placed, this can be changed to anything...):
     80{{{
     81USE_INETD=false
     82OPTIONS="--tftpd-timeout 300 --retry-timeout 5 --port=69 --maxthread 100 --verbose=7 /tftpboot"
     83}}}
     84
     85Be sure the tftpboot directory has modified permissions and ownership:
     86{{{
     87sudo mkdir /tftpboot
     88sudo chmod -R 777 /tftpboot
     89sudo chown -R nobody /tftpboot
     90}}}
     91
     92To start and restart the service:
     93{{{
     94sudo /etc/init.d/atftpd restart
     95}}}
     96
     97To confirm the service is running:
     98{{{
     99ryan@Ryan:/tftpboot$ ps -aef | grep atftpd
     100nobody    4538     1  0 10:51 ?        00:00:00 /usr/sbin/atftpd --daemon --tftpd-timeout 300 --retry-timeout 5 --port=69 --maxthread 100 --verbose=7 /tftpboot
     101}}}
     102
     103These are a set of guidelines.  If your server is not starting, Gateworks encourages you to leverage the internet and google search regarding atftpd to get it up and running properly.
     104A discussion: [http://askubuntu.com/questions/130231/tftp-server-atftpd-fails-to-start]
     105
     106
     107
     108== Troubleshooting ==
     109 * Linux
     110  * It is possible to see the message below:
     111{{{
     112ERROR: Need valid 'usbnet_devaddr' to be set
     113}}}
     114   * This indeed is not a error. The bootloader tries the ethernet first. If there is anything wrong with the ethernet, it then tries to move to USB Ethernet. USB Ethernet most likely is not configured, and thus the message simply says 'it needs to be set'.
     115  * Verify the TFTP server is running on the Linux Desktop / Server
     116  * Verify with a ping the connection between the Gateworks SBC and TFTP server
     117  * Verify file permissions in the TFTP directory.
     118