OpenWrt Forum Archive

Topic: APN problem @ QMI / uqmi / mwan3 / LTE / E398 / usb-modeswitch ??

The content of this topic has been archived on 29 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I have a problem with handling my LTE USB modem (Huawei E398) with the usage of uqmi package and QMI protocol.

The connection is working fine (I can transmit and receive data), but I think uqmi is not forcing my modem to use the correct APN.
As a result of that, my LTE provider is assigning me a dynamic public IP (my provider's rules are: "if you want to have a static public IP, you have to use the APN:").

When I disconnect the modem from a router and connect it to any of my PCs - I receive a correct static public IP from the LTE network. As a result of that - I think that it is not a modem's issue or the LTE provider's issue. I suspect that it is something related to the uqmi package or my configuration...

A part of my /etc/config/network is:
config interface 'wan2'
    option ifname 'wwan0'
    option bridge 'false'
    option ipv6 '0'
    option metric '2'
    option proto 'qmi'
    option device '/dev/cdc-wdm0'
    option apn ''
    option username 'yyyyyy'
    option password 'zzzzzz'
    option mode 'lte'
    option delay '30'

My modem was not initializing automatically after reboot, so I added following lines to the /etc/rc.local (and then modem started to work):
/sbin/usbmode -l
/bin/sleep 2
/sbin/usbmode -s
/bin/sleep 2
uqmi -d /dev/cdc-wdm0 --set-network-modes lte
/bin/sleep 2
uqmi -d /dev/cdc-wdm0 --start-network --autoconnect
/bin/sleep 2
exit 0

Here are the informations about the key packages I use (I hope all of them are the latest ones):
OpenWrt Chaos Calmer 15.05
uqmi     2014-12-03-86bcdb8cca..0a4
usb-modeswitch     2014-08-26-993a9a5427..37a
kmod-usb-net-qmi-wwan     3.18.23-1
mwan3     1.6-2

Any ideas what can be wrong?

The discussion might have continued from here.