Activate 4G roaming

From /lib/netifd/proto/qmi.sh:

                pdh_4=$(uqmi -s -d "$device" --set-client-id wds,"$cid_4" \
                        --start-network \
                        ${apn:+--apn $apn} \
                        ${profile:+--profile $profile} \
                        ${auth:+--auth-type $auth} \
                        ${username:+--username $username} \
                        ${password:+--password $password} \
                        ${autoconnect:+--autoconnect})

So adding option profile 1 to the 4G network configuration in /etc/config/network should result in the addition of --profile 1 to the uqmi command that automatically starts the network.

ok I added this and checking if it works :slight_smile: great help so far!!!!

I looked things up and it turns out 'internet' happens to be the APN of Cosmote (and I think also Vodafone) in Greece. Initially I thought it was some sort of generic catch-all APN trick :frowning: ...
Such makes sense: to roam abroad inside Europe one connects to, say, the strongest nearby signal where one is and/or travels using the APN of the provider providing that signal. Typically I use a phone to find such 'best' connection.

this did not work ...
after reboot I always need to type this command:
uqmi -d /dev/cdc-wdm0 --start-network --profile 1

here partial cat /etc/config/network:

config interface '4G'
        option proto 'qmi'
        option device '/dev/cdc-wdm0'
        option profile '1'
        option apn 'internet'
        option pincode 'xxxx'
        option auth 'none'
        option pdptype 'ipv4'

I also did try "profile 1" without the ' ', same behaviour

Here the output of logread -e netifd:

I did try to do a script with this command and an interface restart, also doesn't do any good

APN is "internet" and aproved by my phone company, so this should not cause the problem.

I am not saying it is a problem :slight_smile: I was simply confused ...

Mon May 2 11:58:21 2022 daemon.notice netifd: Network device 'wireguard' link is up
It was online. The wireguard ping succeeded.

...until this happened 6 minutes later:
Mon May 2 15:04:23 2022 daemon.notice netifd: 4G (2522): Network registration failed, registration timeout reached
The phone company then disconnected you.

If you start manually, does it stay online for more than 6 minutes?

Right, serial USB access is separate.
In case of the GL-X750, as far as I see, no kmod-usb-serial-qualcomm is required...
I have the following ones:
kmod-usb-serial kmod-usb-serial-option kmod-usb-serial-wwan

The phone company then disconnected you.

@Surfer2010

Maybe you can try another provider (like WIND).

Also, do you need wireguard ? I mean, maybe box config can be simpilified for testing and later on made more sophisticated again?

I would keep wireguard since this makes it 100% easier to try things on.
Different provider? I didn't choose any really, it's the card i use in germany as well how would i change provider

I will check after some sleep.

How can I log/track the online time of the 4g since the router right now is
Connected to the internet thru a mobile-phone-hotspot by wifi

So I would need like a log/tracking of modem-connected time.

Would this help any to install those?

well, it may allow you to use AT commands to read or write roaming and profile using AT+QCFG and AT+CGDCONT (and more). Basically, uqmi and qmicli will most probably be able to do same but, for one thing, today I installed qmi-utils which filled up my entire /overlay due to various dependencies. Also, I never managed to make IPv6 work without using explicit AT commands. But you may not want or need IPv6. I am not saying AT commands are needed. But I do consider them handy as double check or troubleshooting tool.

So I would need like a log/tracking of modem-connected time.

maybe something like:

logread -e netifd | grep wan | egrep '(up|down)'

Different provider? I didn't choose any really

Somehow you did choose cosmote by configuring APN internet
You could try using wind's APN (which you will need to find)
But, as said, ideally you choose provider with 'best' signal for the area where you are.

Did try to install after opkg update:

root@OpenWrt:~# opkg install kmod-usb-serial kmod-usb-serial-option kmod-usb-serial-wwan
Multiple packages (libgcc1 and libgcc1) providing same name marked HOLD or PREFER. Using latest.
Installing kmod-usb-serial (5.10.104-1) to root...
Downloading https://downloads.openwrt.org/snapshots/targets/ath79/generic/kmods/5.10.104-1-f3e6f8e2ee2d959f4421676ec1129942/kmod-usb-serial_5.10.104-1_mips_24kc.ipk
Installing kmod-usb-serial-option (5.10.104-1) to root...
Downloading https://downloads.openwrt.org/snapshots/targets/ath79/generic/kmods/5.10.104-1-f3e6f8e2ee2d959f4421676ec1129942/kmod-usb-serial-option_5.10.104-1_mips_24kc.ipk
Installing kmod-usb-serial-wwan (5.10.113-1) to root...
Downloading https://downloads.openwrt.org/snapshots/targets/ath79/generic/packages/kmod-usb-serial-wwan_5.10.113-1_mips_24kc.ipk
Configuring kmod-usb-serial.
Configuring kmod-usb-serial-wwan.
Collected errors:
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.113-1-93256989246b752c62838b730c4a6275) for kmod-usb-core
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.113-1-93256989246b752c62838b730c4a6275) for kmod-usb-serial
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.113-1-93256989246b752c62838b730c4a6275) for kmod-usb-serial-wwan
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.113-1-93256989246b752c62838b730c4a6275) for kmod-usb-serial-option
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-usb-serial-option:
 *      kernel (= 5.10.113-1-93256989246b752c62838b730c4a6275)
 * opkg_install_cmd: Cannot install package kmod-usb-serial-option.

You're running a different kernel-build. Are you running OpenWrt snapshot or something? Snapshots get rebuilt every night or so, so the modules end up with different build-numbers.

The System Information is at post #37:

I did the following:
(1) removed APN 'internet' --> might take the sim card internal one
(2) did some testing with the interface

a) just restarting (by the luci webinterface) results in a connection showing rx/tx packages being sent
b) every time after reboot the interface has an error:

once i restart (OR do uqmi -d /dev/cdc-wdm0 --start-network --profile 1 PLUS restart interface) there is a connection.
as you can see at the new pastebin (logread -e netifd
):

Line 1 = Boot
Line 81 = did uqmi command --> nothing changed
Line 86 = restarted interface (at webinterface)
line 105 = ssh connection lost (smartphone hotspot was disrupted)
line 144 = LTErouter REBOOT

Hope we will get closer to solving it.

You could set defaultroute 0 and peerdns 0 on the 4G interface. Then when it connects it doesn't try to route through it. It will continue to use the smartphone tether as the WAN so your remote access is not interrupted.