How adding AT commands to interface starting script

Hello dears,
How to add extra AT commands for LTE. specifically on MOX with ec20. I am trying to change <PDP_type> Packet data protocol type, a string parameter which specifies the type of packet data
“IP” Internet Protocol (IPV4)

Luci - Initscrips … in interface? Local startup?

But better is change relevant config file

You could use rc.local to start a script eg:
(sleep 2 && /usr/bin/nohup /bin/sh /root/ </dev/null >/dev/null 2>&1) &
then in the script you could use echo to send the AT command eg:
echo -e "AT+.....=...." > /dev/ttyUSB2

Though you could better check if you could define a new profile in the modem so no need for commands.
check this --wds-create-profile=

PS: If you are using Protocol: QMI Cellular, as JardaB suggested the easiest would be to use luci

Thanks for help, this moment I use 3g because when using qmi in the log I have a permission denied but I don’t know where is issue. this moment I looking for a reason the problem. becouse qm is more flexlible and not ppp. And I would like to move on qmi.

Oct 12 22:20:41 turris netifd: LTE (15437): Stopping network LTE
Oct 12 22:20:41 turris netifd: LTE (15437): Command failed: Permission denied
Oct 12 22:20:41 turris netifd: Interface ‘LTE’ is now down
Oct 12 22:20:41 turris netifd: Interface ‘LTE’ is setting up now
Oct 12 22:20:41 turris netifd: LTE (15446): Waiting for SIM initialization

PS: I also tried mbim but it repeatedly writes the wrong pin. but there is no pin on the sim card.

To my knowledge mbim is not available on ec20

I do have the same in the log but it doesn’t seem to harm.
If you want to trace it you should probably take a look at /lib/netifd/proto/

Guys Thanks for some Ideas. mbim does not work, it requires a pin even if there is no pin on the sim card. qmi works well on ipv4. problem with Command failed: Permission denied is only for ipv6. reading did not help. Personally I think that the implementation of mobile ipv6 from o2 will not be standard and we will see in time.

PS: I tried without manually uqmi commands but set ip family ipv6 ignores.