Configuration restoration confusion

I pulled a brand new Digi One IAP from the box and loaded the following config file (file_1.cfg).

No messages were added to the status log. I then rebooted the unit and tried to establish a Modbus/TCP connection–no dice.

I then saved the configuration (file_2.cfg) to diff against the file I loaded. Check the “set ia master=1 active=on protocol=modbustcp transport=tcp ipport=502
table=1” line!

OK, maybe I did something wrong. I restored the unit to factory defaults and loaded the original config (file_1.cfg) once more, followed by a save (file_3.cfg). The modbus routing table is still incorrect. I don’t know why file_1.cfg refers to table 2 with no table 1 present, but I suspect that’s part of the problem.

Did I do something wrong? Or is this maybe a latent bug in the configuration file handling?

file_1.cfg:
[i]

Digi One IAP Version 82000770_E1 02/18/2005

set profile range=1 profile=ia
set line range=1 parity=E csize=8 error=ignore
set line range=1 baud=9600 stopb=1 break=ignore inpck=off istrip=off onlcr=off otab=off
set flow range=1 ixon=off aixon=off ixoff=off ixany=off itoss=off altpin=off forcedcd=off
set flow range=1 dtr=off cts=off dcd=off dsr=off ri=off
set flow range=1 rts=off pre-delay=0 post-delay=0

set keys range=1 xon=^Q xoff=^S xona=^Q xoffa=^S lnext=^V

set device name=“gendialer” baud=no dialer=genmdm chat=no
set port range=1 dev=ia sess=4 termtype=“vt100” edelay=1 auto=off bin=off
set port range=1 uid=none group=none dport=none
set port range=1 dest=none
set port range=1 scriptname=none
set port range=1 keepalive=off flushstchar=default autoservice=default

set ia serial=1 protocol=modbusrtu type=slave
set ia serial=1 chartimeout=20ms slavetimeout=200ms lineturndelay=0ms
set ia serial=1 errorresponse=off broadcast=on fixedaddress=auto exttimeout=disabled

set ia master=1 active=on protocol=modbustcp transport=tcp ipport=502 table=2
set ia master=1 chartimeout=50ms messagetimeout=2500ms idletimeout=2sec permit=all priority=medium
set ia master=1 errorresponse=on broadcast=on fixedaddress=auto exttimeout=disabled

set ia table=2 name=table2
set ia table=2 addroute=1 active=on protocol=modbusrtu
set ia table=2 route=1 protaddr=0-255 type=serial port=1
[/i]

file_2.cfg:
[i]

Digi One IAP Version 82000770_E1 02/18/2005

set profile range=1 profile=ia
set line range=1 parity=E csize=8 error=ignore
set line range=1 baud=9600 stopb=1 break=ignore inpck=off istrip=off onlcr=off otab=off
set flow range=1 ixon=off aixon=off ixoff=off ixany=off itoss=off altpin=off forcedcd=off
set flow range=1 dtr=off cts=off dcd=off dsr=off ri=off
set flow range=1 rts=off pre-delay=0 post-delay=0

set keys range=1 xon=^Q xoff=^S xona=^Q xoffa=^S lnext=^V

set keys range=1 eof=^D erase=^H intr=^C kill=^U
set device name=“gendialer” baud=no dialer=genmdm chat=no
set port range=1 dev=ia sess=4 termtype=“vt100” edelay=1 auto=off bin=off
set port range=1 uid=none group=none dport=none
set port range=1 dest=none
set port range=1 scriptname=none
set port range=1 keepalive=off flushstchar=default autoservice=default

set ia serial=1 protocol=modbusrtu type=slave
set ia serial=1 chartimeout=20ms slavetimeout=200ms lineturndelay=0ms
set ia serial=1 errorresponse=off broadcast=on fixedaddress=auto exttimeout=disabled

set ia master=1 active=on protocol=modbustcp transport=tcp ipport=502 table=1
set ia master=1 chartimeout=50ms messagetimeout=2500ms idletimeout=2sec permit=all priority=medium
set ia master=1 errorresponse=on broadcast=on fixedaddress=auto exttimeout=disabled

set ia table=2 name=table2
set ia table=2 addroute=1 active=on protocol=modbusrtu
set ia table=2 route=1 protaddr=0-255 type=serial port=1
[/i]

file_3.cfg:
[i]

Digi One IAP Version 82000770_E1 02/18/2005

set config dhcp=on

set config myname=“” domain=“”

set config realport=771 securerealport=1027 sockets=2000 redirect=ignore tbreak=std
set config optimize=latency
set keys prevcmd=^P nextcmd=^N forwchar=^F backchar=^B
set config boothost=0.0.0.0 bootfile=“” tftpboot=no
set config rarp=on
set config ping-arp=on
set profile range=1 profile=ia
set line range=1 parity=E csize=8 error=ignore
set line range=1 baud=9600 stopb=1 break=ignore inpck=off istrip=off onlcr=off otab=off
set flow range=1 ixon=off aixon=off ixoff=off ixany=off itoss=off altpin=off forcedcd=off
set flow range=1 dtr=off cts=off dcd=off dsr=off ri=off
set flow range=1 rts=off pre-delay=0 post-delay=0

set keys range=1 xon=^Q xoff=^S xona=^Q xoffa=^S lnext=^V

set keys range=1 eof=^D erase=^H intr=^C kill=^U
set snmp run=on auth_trap=off login_trap=off
set snmp cold_start_trap=off link_up_trap=off

set snmp location=“” name=“” contact=“”

set device name=“gendialer” baud=no dialer=genmdm chat=no
set buffers range=1 size=32 state=off
set port range=1 dev=ia sess=4 termtype=“vt100” edelay=1 auto=off bin=off
set port range=1 uid=none group=none dport=none
set port range=1 dest=none
set port range=1 scriptname=none
set port range=1 keepalive=off flushstchar=default autoservice=default

set socketid range=1 state=off string=“SOCKETID”

set ia serial=1 protocol=modbusrtu type=slave
set ia serial=1 chartimeout=20ms slavetimeout=200ms lineturndelay=0ms
set ia serial=1 errorresponse=off broadcast=on fixedaddress=auto exttimeout=disabled

set ia master=1 active=on protocol=modbustcp transport=tcp ipport=502 table=1
set ia master=1 chartimeout=50ms messagetimeout=2500ms idletimeout=2sec permit=all priority=medium
set ia master=1 errorresponse=on broadcast=on fixedaddress=auto exttimeout=disabled

set ia table=2 name=table2
set ia table=2 addroute=1 active=on protocol=modbusrtu
set ia table=2 route=1 protaddr=0-255 type=serial port=1

set udpserial range=1 rmax=1024 rtime=100 closetime=0 overflow=forward strip=off
set udpserial range=1 delimiters=“”
set secureaccess ssh=on
set secureaccess telnet=on
set secureaccess http=on
set secureaccess rlogin=on
set secureaccess rsh=on
set secureaccess realport=on
set secureaccess reversetcp=on
set secureaccess reversetelnet=on
set secureaccess snmp=on
set secureaccess securerealport=on
set secureaccess securesockets=on
set secureaccess https=on
set secureaccess lpd=on

set logport ra=1 state=off
set logport ra=1 mode=syslog
set logport ra=1 udpport=514
set logport ra=1 rmax=1024
set logport ra=1 rtime=0
set logport ra=1 pri=134
set logport ra=1 strip=off
set logport ra=1 delim=“”
[/i]

This could be a latent bug - the next firmware (“F” is in final testing) has moved the “set ia table” section up to before the serial & master. This change was done by an engineer trying to clean up some quirks in the Web UI related to tables, so he may or may not have seen the issue you noticed.

I’d guess the “table=2” was rejected during reload as that table didn’t exist (yet), but table=1 does at that point (ie: a dummy Modbus-compatible table was created for the serial slave, which defaulted to table=1).

Asside from the bug here, manually editing & moving the “set ia table” section above serial & master would solve the problem keeping the table being =2; as would renumbering your table to be 1 instead of 2.

> This could be a latent bug - the next firmware (“F”
> is in final testing) has moved the “set ia table”
> section up to before the serial & master. This change
> was done by an engineer trying to clean up some
> quirks in the Web UI related to tables, so he may or
> may not have seen the issue you noticed.

Do I need to do anything with this and the serial stat bug I’ve noticed, or is it too late?

> I’d guess the “table=2” was rejected during reload as
> that table didn’t exist (yet), but table=1 does at
> that point (ie: a dummy Modbus-compatible table was
> created for the serial slave, which defaulted to
> table=1).

Makes sense to me.

> Asside from the bug here, manually editing & moving
> the “set ia table” section above serial & master
> would solve the problem keeping the table being =2;
> as would renumbering your table to be 1 instead of 2.

Manual edit worked. It’s talking now.