Hi folks,
I have a script that I use to provide as a “base config” using netinstall.
/system identity
set name=some-name-to-identify
/system clock
set time-zone-name=Europe/Berlin
/interface bridge
add name=bridge_default
/interface lte
set [ find ] allow-roaming=no name=lte1 pin=1234
/interface lte apn
set [ find default=yes ] apn=internet.telekom
/interface bridge port
add bridge=bridge_default interface=ether1
add bridge=bridge_default interface=ether2
/ip address
add address=172.31.255.1/30 interface=bridge_default network=172.31.255.0
/ip firewall filter
add action=accept chain=input comment="accept established, related, untracked" connection-state=established,related,untracked
add action=drop chain=input comment="drop invalid" connection-state=invalid
add action=accept chain=input comment="accept ICMP" protocol=icmp
add action=accept chain=input comment="accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=accept chain=input comment="dns tcp" dst-port=53 in-interface=bridge_default protocol=tcp
add action=accept chain=input comment="dns udp" dst-port=53 in-interface=bridge_default protocol=udp
add action=accept chain=input comment=ssh dst-port=22 in-interface=bridge_default protocol=tcp
add action=accept chain=input comment=winbox dst-port=8291 in-interface=bridge_default protocol=tcp
add action=drop chain=input
add action=accept chain=forward comment="accept established,related, untracked" connection-state=established,related,untracked
add action=drop chain=forward comment="drop invalid" connection-state=invalid
add action=drop chain=forward comment="drop all from WAN (lte1)" in-interface=lte1
/ip firewall nat
add action=masquerade chain=srcnat out-interface=lte1
/ip dns
set allow-remote-requests=yes
/user
set [find name=admin] password=SuperSecretPassphrase
/system routerboard settings
set auto-upgrade=yes
It seems like the most stuff is working fine, but the lte config part just does not work. When I remove
/interface lte
set [ find ] allow-roaming=no pin=1234
/interface lte apn
set [ find default=yes ] apn=internet.telekom
it seems to work fine, but as soon as I add these code lines it won’t work after factory reset.
I also tried to work around using these code lines:
/system script
add dont-require-permissions=no name=setupLteModemOnBoot owner=admin policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="\r\
\n/interface lte set [ find ] allow-roaming=no pin=1234\r\
\n/interface lte apn set [ find default=yes ] apn=internet.telekom\r\
\n"
/system scheduler
add name=setupLteModemOnBoot on-event="/system/script/run setupLteModemOnBoot" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-time=startup
But it seems that either the scheduler is not triggering or the script does not work on early startup … when I use these lines and execute the script manually after the WAP ist started, it works as expected.
I assume the LTE modem is somehow handled another way then “normal” interfaces?!? Hope anyone can clarify what’s going on with the LTE interface
Best regards
J
PS if I copy all the code lines to a completely unconfigured (/system reset-configuration no-defaults=yes) line by line, everything works as expected.