How to connect to internet with RM500Q-GL modem with netplan

HI, I’m trying to configure the RM500Q-GL on linux with netplan.

The modem seems to be connected to network, , but pinging 8.8.8.8 doesn’t work and neither does any other website.

the modem is connected via usb adapter board with sim card.
netplan yaml configuration looks like this:

network:
  modems:
    cdc-wdm0:
      apn: internet
      dhcp4: true
      dhcp4-overrides:
        route-metric: 101

      pin: '1234'
  renderer: NetworkManager
  version: 2

nmcli device settings show this:

GENERAL.DEVICE:                         cdc-wdm0
GENERAL.TYPE:                           gsm
GENERAL.HWADDR:                         (unknown)
GENERAL.MTU:                            1500
GENERAL.STATE:                          100 (connected)
GENERAL.CONNECTION:                     netplan-cdc-wdm0
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/3
IP4.ADDRESS[1]:                         10.128.216.42/30
IP4.ADDRESS[2]:                         169.254.47.14/16
IP4.GATEWAY:                            10.128.216.41
IP4.ROUTE[1]:                           dst = 10.128.216.40/30, nh = 0.0.0.0, mt = 101
IP4.ROUTE[2]:                           dst = 169.254.0.0/16, nh = 0.0.0.0, mt = 204
IP4.ROUTE[3]:                           dst = 0.0.0.0/0, nh = 10.128.216.41, mt = 101
IP4.DNS[1]:                             217.77.165.81
IP4.DNS[2]:                             217.77.165.211
IP6.GATEWAY:                            --

and the route settings look like this:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         10.128.216.41   0.0.0.0         UG    101    0        0 wwan0
default         192.168.43.66   0.0.0.0         UG    303    0        0 wlan0
10.128.216.40   0.0.0.0         255.255.255.252 U     101    0        0 wwan0
link-local      0.0.0.0         255.255.0.0     U     202    0        0 eth0
link-local      0.0.0.0         255.255.0.0     U     204    0        0 wwan0
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
192.168.42.0    0.0.0.0         255.255.255.0   U     100    0        0 eth0
192.168.43.0    0.0.0.0         255.255.255.0   U     303    0        0 wlan0

This could be a trivial linux setting or something wrong with the provider, but at this point I really don’t know why it doesn’t work.

so, apparently just restarting the modem manager service with --debug flag made it work