Setting up LTE modem

Hello,
I have some trouble setting up a lte connection with turris mox.

I can see the wwan interface in the cli or in the foris interface but I’m not sure howtoset up the pincode for the card or set up the apn informations.

here I put some informations that I got from the command line.

uqmi -d /dev/cdc-wdm0 --get-signal-info
{
“type”: “lte”,
“rssi”: -71
}

uqmi -d /dev/cdc-wdm0 --start-network orange --autoconnect
"No Effects"

thank you in advance

What modem are you using? is it miniPCIe or USB?
Can you confirm it is QMI? Some modems are MBIM.

Try to install Modem Manager, and then you can try to configure it using Luci.

I’m using the Quectel EP06-E LA minipcie card.
How can I verify if it is qmi compatible ?

I can’t access internet from the router as I 'm using the modem part.

I manage to install modem manager and I configure the LTE connection on LUCI but it kept saying that my pin code is false but I’m sure tat it is the good one.

Any idea why it would say it’s false ?

Can you post any log?
Is the PIN disabled in the SIM card? Can you disable the PIN using a phone?

If it works, it may be caused by a timeout error.

What type of log do you need ?
When I put the sim in my phone I need to type the pin code.
If I remove it in the luci interface it shows the error no more but I don’t see any packets.

/var/lag/messages
Look for anything related to the modem.

You mean probably/var/log/messages:wink:

Thank for looking on it.
Here is the message, there is some error, this is without the pincode:

Feb 16 10:34:44 turris netifd: Interface ‘lte’ is now down
Feb 16 10:34:44 turris netifd: Interface ‘lte’ is setting up now
Feb 16 10:34:45 turris ModemManager: hotplug: add network interface ip6tnl0: event processed
Feb 16 10:34:45 turris ModemManager: hotplug: event reported: action=add, name=ip6tnl0, subsystem=net
Feb 16 10:34:45 turris ModemManager: hotplug: error: parent device sysfspath not found
Feb 16 10:34:46 turris ModemManager: hotplug: add network interface sit0: event processed
Feb 16 10:34:46 turris ModemManager: hotplug: event reported: action=add, name=sit0, subsystem=net
Feb 16 10:34:46 turris ModemManager: hotplug: error: parent device sysfspath not found
Feb 16 10:34:46 turris netifd: lte (4510): ppp: warning: Sleeping for ‘10’ seconds
Feb 16 10:34:47 turris ModemManager: hotplug: add network interface ifb0: event processed
Feb 16 10:34:47 turris ModemManager: hotplug: event reported: action=add, name=ifb0, subsystem=net
Feb 16 10:34:47 turris ModemManager: hotplug: error: parent device sysfspath not found
Feb 16 10:34:48 turris ModemManager: hotplug: add network interface ifb1: event processed

Feb 16 10:34:48 turris ModemManager: hotplug: event reported: action=add, name=ifb1, subsystem=net
Feb 16 10:34:48 turris ModemManager: hotplug: error: parent device sysfspath not found
Feb 16 10:34:49 turris kresd[5154]: [system] warning: hard limit for number of file-descriptors is only 4096 but recommended value is 524288
Feb 16 10:34:49 turris kresd[5154]: [ta_update] refreshing TA for .
Feb 16 10:34:49 turris kresd[5154]: [ta_update] next refresh for . in 23.8425 hours
Feb 16 10:34:49 turris ModemManager: hotplug: add network interface gre0: event processed
Feb 16 10:34:49 turris ModemManager: hotplug: event reported: action=add, name=gre0, subsystem=net
Feb 16 10:34:49 turris ModemManager: hotplug: error: parent device sysfspath not found
Feb 16 10:34:51 turris ModemManager: hotplug: add network interface gretap0: event processed
Feb 16 10:34:51 turris ModemManager: hotplug: event reported: action=add, name=gretap0, subsystem=net
Feb 16 10:34:51 turris ModemManager: hotplug: error: parent device sysfspath not found
Feb 16 10:34:52 turris ModemManager: hotplug: add network interface erspan0: event processed
Feb 16 10:34:52 turris ModemManager: hotplug: event reported: action=add, name=erspan0, subsystem=net
Feb 16 10:34:52 turris ModemManager: hotplug: error: parent device sysfspath not found
Feb 16 10:32:50 turris ModemManager: hotplug: add network interface wwan0: event processed
Feb 16 10:32:50 turris ModemManager: hotplug: event reported: action=add, name=wwan0, subsystem=net
Feb 16 10:32:50 turris ModemManager: hotplug: no need to wait for modem at sysfs path /sys/devices/platform/soc/soc:internal-regs@d0000000/d005e000.usb/usb1/1-1
Feb 16 10:32:50 turris ModemManager: hotplug: add cdc interface cdc-wdm0: custom event processed
Feb 16 10:32:50 turris ModemManager: hotplug: event reported: action=add, name=cdc-wdm0, subsystem=usbmisc
Feb 16 10:32:51 turris ModemManager: hotplug: add serial interface ttyUSB0: event processed
Feb 16 10:32:51 turris ModemManager: hotplug: event reported: action=add, name=ttyUSB0, subsystem=tty
Feb 16 10:32:52 turris pppd[5908]: pppd 2.4.7 started by root, uid 0
Feb 16 10:32:52 turris pppd[5908]: tcgetattr: Not a tty (line 967)
Feb 16 10:32:52 turris ModemManager: hotplug: add serial interface ttyUSB1: event processed
Feb 16 10:32:52 turris ModemManager: hotplug: event reported: action=add, name=ttyUSB1, subsystem=tty
Feb 16 10:32:53 turris pppd[5908]: Exit.
Feb 16 10:32:53 turris netifd: Interface ‘lte’ is now down
Feb 16 10:32:53 turris netifd: Interface ‘lte’ is setting up now
Feb 16 10:32:54 turris ModemManager: hotplug: add serial interface ttyUSB2: event processed
Feb 16 10:32:54 turris ModemManager: hotplug: event reported: action=add, name=ttyUSB2, subsystem=tty
Feb 16 10:32:55 turris ModemManager: hotplug: add serial interface ttyUSB3: event processed
Feb 16 10:32:55 turris ModemManager: hotplug: event reported: action=add, name=ttyUSB3, subsystem=tty
Feb 16 10:32:55 turris netifd: lte (5976): ppp: warning: Sleeping for ‘10’ seconds
Feb 16 10:32:56 turris ModemManager: hotplug: add network interface TMP_IFB_4_SQM: event processed
Feb 16 10:32:56 turris ModemManager: hotplug: event reported: action=add, name=TMP_IFB_4_SQM, subsystem=net
Feb 16 10:32:56 turris ModemManager: hotplug: error: parent device sysfspath not found
Feb 16 10:32:56 turris firewall: Reloading firewall due to ifup of lan (br-lan)
Feb 16 10:32:56 turris firewall: Reloading firewall due to ifup of lan (br-lan)
Feb 16 10:32:56 turris ModemManager: hotplug: remove network interface TMP_IFB_4_SQM: event processed
Feb 16 10:32:56 turris ModemManager: hotplug: event reported: action=remove, name=TMP_IFB_4_SQM, subsystem=net
Feb 16 10:32:57 turris ModemManager: hotplug: add network interface TMP_IFB_4_SQM: event processed
Feb 16 10:32:57 turris ModemManager: hotplug: event reported: action=add, name=TMP_IFB_4_SQM, subsystem=net
Feb 16 10:32:57 turris ModemManager: hotplug: error: parent device sysfspath not found
Feb 16 10:32:57 turris ModemManager: hotplug: remove network interface TMP_IFB_4_SQM: event processed
Feb 16 10:32:57 turris ModemManager: hotplug: event reported: action=remove, name=TMP_IFB_4_SQM, subsystem=net
Feb 16 10:32:57 turris ModemManager: hotplug: add network interface TMP_IFB_4_SQM: event processed
Feb 16 10:32:57 turris ModemManager: hotplug: event reported: action=add, name=TMP_IFB_4_SQM, subsystem=net
Feb 16 10:32:57 turris ModemManager: hotplug: error: parent device sysfspath not found
Feb 16 10:32:57 turris ModemManager: hotplug: remove network interface TMP_IFB_4_SQM: event processed
Feb 16 10:32:58 turris ModemManager: hotplug: event reported: action=remove, name=TMP_IFB_4_SQM, subsystem=net
Feb 16 10:32:58 turris sshd[4514]: Accepted password for root from 192.168.1.17 port 54596 ssh2
Feb 16 10:32:58 turris ModemManager: hotplug: add network interface TMP_IFB_4_SQM: event processed
Feb 16 10:32:58 turris ModemManager: hotplug: event reported: action=add, name=TMP_IFB_4_SQM, subsystem=net
Feb 16 10:32:58 turris ModemManager: hotplug: error: parent device sysfspath not found
Feb 16 10:32:58 turris ModemManager: hotplug: remove network interface TMP_IFB_4_SQM: event processed
Feb 16 10:32:58 turris ModemManager: hotplug: event reported: action=remove, name=TMP_IFB_4_SQM, subsystem=net
Feb 16 10:32:58 turris ModemManager: hotplug: add network interface TMP_IFB_4_SQM: event processed
Feb 16 10:32:58 turris ModemManager: hotplug: event reported: action=add, name=TMP_IFB_4_SQM, subsystem=net
Feb 16 10:32:58 turris ModemManager: hotplug: error: parent device sysfspath not found
Feb 16 10:32:58 turris ModemManager: hotplug: remove network interface TMP_IFB_4_SQM: event processed
Feb 16 10:32:58 turris ModemManager: hotplug: event reported: action=remove, name=TMP_IFB_4_SQM, subsystem=net
Feb 16 10:32:59 turris ModemManager: hotplug: add network interface br-guest_turris: event processed
Feb 16 10:32:59 turris ModemManager: hotplug: event reported: action=add, name=br-guest_turris, subsystem=net
Feb 16 10:32:59 turris ModemManager: hotplug: error: parent device sysfspath not found
Feb 16 10:32:59 turris ModemManager: hotplug: add network interface br-lan: event processed
Feb 16 10:32:59 turris ModemManager: hotplug: event reported: action=add, name=br-lan, subsystem=net
Feb 16 10:32:59 turris ModemManager: hotplug: error: parent device sysfspath not found
Feb 16 10:32:59 turris ModemManager: hotplug: remove network interface br-lan: event processed
Feb 16 10:32:59 turris ModemManager: hotplug: event reported: action=remove, name=br-lan, subsystem=net
Feb 16 10:33:00 turris ModemManager: hotplug: add network interface br-lan: event processed
Feb 16 10:33:00 turris ModemManager: hotplug: event reported: action=add, name=br-lan, subsystem=net
Feb 16 10:33:00 turris ModemManager: hotplug: error: parent device sysfspath not found
Feb 16 10:33:05 turris pppd[7459]: pppd 2.4.7 started by root, uid 0
Feb 16 10:33:05 turris pppd[7459]: tcgetattr: Not a tty (line 967)
Feb 16 10:33:06 turris pppd[7459]: Exit.
Feb 16 10:33:06 turris netifd: Interface ‘lte’ is now down
Feb 16 10:33:06 turris netifd: Interface ‘lte’ is setting up now
Feb 16 10:33:08 turris netifd: lte (7467): ppp: warning: Sleeping for ‘10’ seconds

I tried with modemmanager on omnia with EC20 modem but I had the same issue above. Even though I had correctly specified the sysfs path.
From my experience with omnia, for the moment, I would suggest to use qmi cellular protocol to set up the modem and test it. In Luci then you can insert the pin code. If this works then you could test with MBIM. I expect that working Luci for modemmanager will be available after the next openwrt release
ps: consult this also if you will use qmi

I’m not sure to understand all of this command.
The packet modemmanager is related to mbim ?

When you say use the qmi protocol: you mean like:

uqmi -d /dev/cdc-wdm0 --start-network orange --autoconnect

But I don’t see how to add the pincode info ?
What is qmicli in regard to uqmi ?

Thank for you help.

Insert the SIM card to the phone and remove the PIN code ( set PIN request to disabled ) … I use it this way …

My experience with Modem Manager is with a MBIM modem.

This may be related to your problems:

I don’t think Turris has anything different about the modem, any OpenWRT guides should apply to your problem.

Go to reforis and install the “Extensions of network protocols for 3G/LTE” in the packages section.
Then go to Luci -> software and install luci-proto-qmi
Then go in Luci to the interfaces and add new interface (for example name Lte). In the protocol section select QMI cellular, check the “Bring up on boot”, insert APN and pin code, authentication (usually none) and select if you will use ipv4, ipv6 or both. Then in the firewall settings tab, assign the interface to WAN zone. Save the settings and you are probably good to go.
If for some reason you cannot connect, paste here the results of:

qmicli -d /dev/cdc-wdm0 --dms-uim-get-pin-status
qmicli -d /dev/cdc-wdm0 --dms-uim-get-state
qmicli -d /dev/cdc-wdm0 --wda-get-data-format
qmicli -d /dev/cdc-wdm0 --nas-get-signal-strength
qmicli -d /dev/cdc-wdm0 --nas-get-system-selection-preference
qmicli -d /dev/cdc-wdm0 --wds-get-current-settings

@lampra
I have installed these packets but I don’t set it to qmi :stuck_out_tongue: .
In this interface I don’t have to put the apn name and password ?
Ok it seems to work but the packet is really low.

There is the result of all commands:

qmicli -d /dev/cdc-wdm0 --dms-uim-get-pin-status
error: couldn't get PIN status: QMI protocol error (94): 'NotSupported'
qmicli -d /dev/cdc-wdm0 --dms-uim-get-state
error: couldn't get UIM state: QMI protocol error (94): 'NotSupported'
qmicli -d /dev/cdc-wdm0 --wda-get-data-format
[/dev/cdc-wdm0] Successfully got data format
                   QoS flow header: no
               Link layer protocol: 'raw-ip'
  Uplink data aggregation protocol: 'disabled'
Downlink data aggregation protocol: 'disabled'
                     NDP signature: '0'
Downlink data aggregation max datagrams: '0'
Downlink data aggregation max size: '0'

qmicli -d /dev/cdc-wdm0 --nas-get-signal-strength
[/dev/cdc-wdm0] Successfully got signal strength
Current:
	Network 'lte': '-84 dBm'
RSSI:
	Network 'lte': '-84 dBm'
ECIO:
	Network 'lte': '-2.5 dBm'
IO: '-106 dBm'
SINR (8): '9.0 dB'
RSRQ:
	Network 'lte': '-15 dB'
SNR:
	Network 'lte': '-2.2 dB'
RSRP:
	Network 'lte': '-116 dBm'

Is the number really bad ?

qmicli -d /dev/cdc-wdm0 --nas-get-system-selection-preference
[/dev/cdc-wdm0] Successfully got system selection preference
	Emergency mode: 'no'
	Mode preference: 'cdma-1x, cdma-1xevdo, gsm, umts, lte, td-scdma'
	Disabled modes: '(NULL)'
	Band preference: 'wcdma-2100, wcdma-dcs-1800, wcdma-850-us, wcdma-900'
	LTE band preference: '1, 3, 5, 7, 8, 20, 28, 32, 38, 40, 41'
	LTE band preference (extended): '1, 3, 5, 7, 8, 20, 28, 32, 38, 40, 41'
	TD-SCDMA band preference: '(NULL)'
	Roaming preference: 'any'
	Network selection preference: 'automatic'
	Service domain preference: 'cs-ps'
	GSM/WCDMA acquisition order preference: 'automatic'
	Usage preference: 'data-centric'
	Voice domain preference: 'ps-preferred'
	Registration restriction: 'unrestricted'
	Acquisition order preference: lte, umts, gsm, cdma-1x, cdma-1xevdo

qmicli -d /dev/cdc-wdm0 --wds-get-current-settings

[/dev/cdc-wdm0] Current settings retrieved:
           IP Family: IPv4
        IPv4 address: 10.40.202.223
    IPv4 subnet mask: 255.255.255.192
IPv4 gateway address: 10.40.202.224
    IPv4 primary DNS: 192.168.10.110
                 MTU: 1500
             Domains: none

thank you

@azrou

you need to set it to QMI cellular

yes you do need to put apn and password

Normally you would not connect using raw-ip. Try to change it to 802.3 and test using (assuming the interface is named Lte)

ifdown Lte    
qmicli -d /dev/cdc-wdm0 --wda-set-data-format=802-3
ifup Lte

Post the results off
ip addr

I set it to QMI Cellular.

I mean I don’t see it asking for apn username and apn password as the other interface.

qmicli -d /dev/cdc-wdm0 --wda-set-data-format=802-3
[/dev/cdc-wdm0] Successfully set data format
QoS flow header: no
Link layer protocol: ‘raw-ip’
Uplink data aggregation protocol: ‘disabled’
Downlink data aggregation protocol: ‘disabled’
NDP signature: ‘0’
Downlink data aggregation max datagrams: ‘0’
Downlink data aggregation max size: ‘0’

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br-lan state UP group default qlen 532
link/ether d8:58:d7:00:cd:98 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 532
link/ether d8:58:d7:00:cd:99 brd ff:ff:ff:ff:ff:ff
4: ip6tnl0@NONE: mtu 1452 qdisc noop state DOWN group default qlen 1000
link/tunnel6 :: brd ::
5: sit0@NONE: mtu 1480 qdisc noop state DOWN group default qlen 1000
link/sit 0.0.0.0 brd 0.0.0.0
6: ifb0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 32
link/ether 1a:d8:fd:57:85:0a brd ff:ff:ff:ff:ff:ff
7: ifb1: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 32
link/ether 6e:37:00:f8:ea:c7 brd ff:ff:ff:ff:ff:ff
8: gre0@NONE: mtu 1476 qdisc noop state DOWN group default qlen 1000
link/gre 0.0.0.0 brd 0.0.0.0
9: gretap0@NONE: <BROADCAST,MULTICAST> mtu 1462 qdisc noop state DOWN group default qlen 1000
link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
10: erspan0@NONE: <BROADCAST,MULTICAST> mtu 1450 qdisc noop state DOWN group default qlen 1000
link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
11: wwan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
link/ether d6:ea:6b:a7:e1:12 brd ff:ff:ff:ff:ff:ff
inet6 2a01:cb1e:4a:7a74:2528:646a:65b2:a5c4/128 scope global tentative
valid_lft forever preferred_lft forever
inet6 fe80::d4ea:6bff:fea7:e112/64 scope link
valid_lft forever preferred_lft forever
17: br-guest_turris: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 3e:21:20:6b:58:e0 brd ff:ff:ff:ff:ff:ff
inet 10.111.222.1/24 brd 10.111.222.255 scope global br-guest_turris
valid_lft forever preferred_lft forever
20: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether d8:58:d7:00:cd:99 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
valid_lft forever preferred_lft forever
inet6 fe80::da58:d7ff:fe00:cd99/64 scope link
valid_lft forever preferred_lft forever

Not apn username nor apn pasword. You only need :

  1. apn i.e. a word like eg “internet” provided by the network provider and
  2. the pin of the sim card if there is a pin

It seems that you are connected with ipv6 and from your previous post the signal is good (not the best but good enough)

I still see this error in dmsg:

turris ModemManager: hotplug: error: parent device sysfspath not found

Is it important ?

I cannot get internet so I wondering if it’s a problem of signal or if the device is not working.
In the Foris interface the Lte module has a red cross near status.

thank you again for the help.

@azrou
I would suggest to try first the ipv4. In Luci interface settings for QMI cellular select ipv4 only. Then also check if indeed you have changed to 802-3.

It seems that your modem has an ip from the provider which probably means that the device is working and it obtaines ip.
It is more likely that it is a settings issue. Maybe you need different settings as you do not have a real ipv4 from the provider but a lan subnet . Can you ask the provider for real ipv4? If not could you provide the output of ip route command? Maybe you just need to set the route with 10.40.202.223 as gateway.

yes please uninstall modemmanager for the moment while testing with qmi

Here is how your interface settings should look like: