DIGI recovery - how to in linux

Hello,
I spent long time with finding out how to setup some enviroment for recovering digi ME modules with some bugs in firmwares which blocks standard FTP upload. Here is my configuration for linux server with digi fail-safe recovery.

At first see http://www.digi.com/support/kbase/kbaseresultdetl.jsp?id=843
At second Im using Gentoo OS so some paths and names may varying on different linux distros.

  1. install standard DHCP (from http://www.isc.org/products/DHCP, on GENTOO install net-misc/dhcp)
  2. Go to its configuration folder /etc/dhcp and create dhcpd.conf
touch dhcpd.conf
  1. Copy into the file followed lines
nano dhcpd.conf
# dhcp.conf

# option definitions common to all supported networks...

option domain-name "internal";
option domain-name-servers 192.168.1.1, 192.168.1.130;
option routers 192.168.1.1;
ddns-update-style interim;
ddns-rev-domainname "in-addr.arpa";

authoritative;

default-lease-time 600;
max-lease-time 7200;

subnet 192.168.1.0 netmask 255.255.255.0 {
  range 192.168.1.100 192.168.1.128;
# If you want to provided WINS Server
  option netbios-name-servers 192.168.1.1;
  option netbios-node-type 8;


# followed lines is options 66 and 67
option tftp-server-name "192.168.1.1";
option bootfile-name "image.bin";

}
  1. go to /etc/conf.d/ and edit in dhcpd line where is DHCPD_IFACE=β€œβ€. Here write down interface where may the DHCP server runs. For example for eth1
    DHCPD_IFACE=β€œeth1”
 nano /etc/conf.d/dhcpd 
  1. now the DHCP setup is done, now configure tftp server
  2. install tftp server (http://www.kernel.org/pub/software/network/tftp/
    on gentoo install net-ftp/tftp-hpa)
  3. edit file /etc/conf.d/in.tftpd replace lines with following content
 nano /etc/conf.d/in.tftpd

# /etc/init.d/in.tftpd

# Path to server files from
# Depending on your application you may have to change this.
# This is commented out to force you to look at the file!
#INTFTPD_PATH="/var/tftp/"
INTFTPD_PATH="/tftpboot/"
#INTFTPD_PATH="/tftproot/"

# For more options, see in.tftpd(8)
# -R 4096:32767 solves problems with ARC firmware, and obsoletes
# the /proc/sys/net/ipv4/ip_local_port_range hack.
# -s causes $INTFTPD_PATH to be the root of the TFTP tree.
# -l is passed by the init script in addition to these options.
INTFTPD_OPTS="-R 4096:32767 -s ${INTFTPD_PATH}"

  1. now configuration for fttp is done
  2. create folder for image
mkdir /tftpboot

and change the owner

chown nobody:nobody /tftpboot

now upload the new image to this folder and change its rights

chmod 644 /tftpboot/image.bin
  1. now all is set up
  2. run followed commands
ifconfig eth1 192.168.1.1

(for eth0 replace eth1 with eth0)

/etc/init.d/dhcpd start
/etc/init.d/in.tftpd start
  1. now everything is running and you can connect the digi in recovery

Notes:
a) take care to not use the Ethernet interface where is running another DHCP server, always use independent network!
b) if you have problems with uploading images try to use ethernet switch between PC and digi

Nice work Jiri :slight_smile: