Sierra MC8700 modem unable to dial

Hi guys,

I am using the Sierra MC8700 modem on Wallys's router board DR4029 and it has 2 SIM card slots.
The modem is recognized as a USB device and I can connect to it via ttyUSB3

root@OpenWrt:/# lsusb
Bus 003 Device 002: ID 1199:68a3 Sierra Wireless, Inc. MC8700 Modem

However, the modem failed to dial for the data connection:

Sat Oct 17 20:57:23 2020 local2.info chat[2688]: AT+CGDCONT=1,"IP","celcom3g"^M^M
Sat Oct 17 20:57:23 2020 local2.info chat[2688]: OK
Sat Oct 17 20:57:23 2020 local2.info chat[2688]:  -- got it
Sat Oct 17 20:57:23 2020 local2.info chat[2688]: send (ATD*99#^M)
Sat Oct 17 20:57:24 2020 local2.info chat[2688]: expect (CONNECT)
Sat Oct 17 20:57:24 2020 local2.info chat[2688]: ^M
Sat Oct 17 20:57:24 2020 local2.info chat[2688]: ATD*99#^M^M
Sat Oct 17 20:57:24 2020 local2.info chat[2688]: ERROR
Sat Oct 17 20:57:24 2020 local2.info chat[2688]:  -- failed
Sat Oct 17 20:57:24 2020 local2.info chat[2688]: Failed (ERROR)
Sat Oct 17 20:57:24 2020 daemon.err pppd[2687]: Connect script failed

I tried to run AT!ACCR? / AT+CGREG/ AT+COPN and it returns ERROR. I suspect that there may be a problem with the SIM card slots. How can we verify if the SIM cards are detected and move further

Can you advise on this? Thanks a lot!

Update - I tried
AT+CPIN?
and it returns
+CME ERROR: 10
I am sure that the SIM does not detected. How could I move further?

Make sure you're using the proper mPCIe slot for the modem (closer to the board edge ?) and the right slot for the SIM (top or bottom). Use ohmmeter to verify connection between SIM slot and PCIE slot, test with pins 8,10,12,14 on mPCIe connector.
Don't use PPP.

As I can see, the connection was established and after some minutes it was terminated. It looks like no IP address had been assigned:

Sun Oct 18 16:40:25 2020 local2.info chat[2354]: AT+CGDCONT=1,"IP","celcom4g"^M^M
Sun Oct 18 16:40:25 2020 local2.info chat[2354]: OK
Sun Oct 18 16:40:25 2020 local2.info chat[2354]:  -- got it
Sun Oct 18 16:40:25 2020 local2.info chat[2354]: send (ATD*99***1#^M)
Sun Oct 18 16:40:25 2020 local2.info chat[2354]: expect (CONNECT)
Sun Oct 18 16:40:25 2020 local2.info chat[2354]: ^M
Sun Oct 18 16:40:25 2020 local2.info chat[2354]: ATD*99***1#^M^M
Sun Oct 18 16:40:25 2020 local2.info chat[2354]: CONNECT
Sun Oct 18 16:40:25 2020 local2.info chat[2354]:  -- got it
Sun Oct 18 16:40:25 2020 local2.info chat[2354]: send ( ^M)
Sun Oct 18 16:40:25 2020 daemon.info pppd[2353]: Serial connection established.
Sun Oct 18 16:40:25 2020 kern.info kernel: [   53.098655] 3g-ppp0: renamed from ppp0
Sun Oct 18 16:40:25 2020 daemon.info pppd[2353]: Renamed interface ppp0 to 3g-ppp0
Sun Oct 18 16:40:25 2020 daemon.info pppd[2353]: Using interface 3g-ppp0
Sun Oct 18 16:40:25 2020 daemon.notice pppd[2353]: Connect: 3g-ppp0 <--> /dev/ttyUSB3
Sun Oct 18 16:40:25 2020 user.notice ModemManager: hotplug: add network interface ppp0: event processed
Sun Oct 18 16:40:25 2020 user.notice ModemManager: hotplug: event reported: action=add, name=ppp0, subsystem=net
Sun Oct 18 16:40:25 2020 user.notice ModemManager: hotplug: error: parent device sysfspath not found
Sun Oct 18 16:40:25 2020 daemon.warn [1354]: <warn>  [ppp0] invalid sysfs path read for net/ppp0
Sun Oct 18 16:40:25 2020 user.notice ModemManager: hotplug: move network interface 3g-ppp0: event processed
Sun Oct 18 16:40:25 2020 user.notice ModemManager: hotplug: event reported: action=move, name=3g-ppp0, subsystem=net

and it was disconnected

Sun Oct 18 16:42:14 2020 kern.info kernel: [  161.694408] usb 3-1: USB disconnect, device number 2
Sun Oct 18 16:42:14 2020 kern.info kernel: [  161.695327] sierra ttyUSB0: Sierra USB modem converter now disconnected from ttyUSB0
Sun Oct 18 16:42:14 2020 kern.info kernel: [  161.698993] sierra 3-1:1.0: device disconnected
Sun Oct 18 16:42:14 2020 kern.info kernel: [  161.708097] sierra ttyUSB1: Sierra USB modem converter now disconnected from ttyUSB1
Sun Oct 18 16:42:14 2020 kern.info kernel: [  161.710768] sierra 3-1:1.1: device disconnected
Sun Oct 18 16:42:14 2020 kern.info kernel: [  161.719143] sierra ttyUSB2: Sierra USB modem converter now disconnected from ttyUSB2
Sun Oct 18 16:42:14 2020 kern.info kernel: [  161.723171] sierra 3-1:1.2: device disconnected
Sun Oct 18 16:42:14 2020 user.notice ModemManager: hotplug: remove serial interface ttyUSB0: event processed
Sun Oct 18 16:42:14 2020 user.notice ModemManager: hotplug: event reported: action=remove, name=ttyUSB0, subsystem=tty

This is my interface configuration:

config interface 'ppp0'
        option proto '3g'
        option device '/dev/ttyUSB3'
        option ipv6 'auto'
        option apn 'celcom4g'
        option service 'umts'

Is there something wrong? Thank you!

Don't use PPP.

I've tried with modem-manager and it was failed

config interface '3G'
        option proto 'modemmanager'
        option device '/sys/devices/platform/soc/60f8800.usb2/6000000.dwc3/xhci-hcd.1.auto/usb3/3-1'
        option apn 'celcom4g'
        option auth 'both'
        option iptype 'ipv4v6'
        option metric '10'
Sun Oct 18 16:47:44 2020 daemon.notice netifd: 3G (6238): modem available at /org/freedesktop/ModemManager1/Modem/1
Sun Oct 18 16:47:44 2020 daemon.notice netifd: 3G (6238): starting connection with apn 'celcom4g'...
Sun Oct 18 16:47:44 2020 daemon.notice netifd: 3G (6238): error: modem has no Simple capabilities
Sun Oct 18 16:47:45 2020 daemon.notice netifd: 3G (6275): stopping network
Sun Oct 18 16:47:45 2020 daemon.notice netifd: 3G (6275): couldn't load bearer path
Sun Oct 18 16:47:45 2020 daemon.notice netifd: Interface '3G' is now down

The same happen when I try NCM

Sun Oct 18 16:53:15 2020 daemon.notice netifd: Interface '3G' is setting up now
Sun Oct 18 16:53:17 2020 daemon.notice netifd: 3G (7882): sending -> AT+CFUN=1
Sun Oct 18 16:53:18 2020 daemon.notice netifd: 3G (7882): sending -> AT+CGDCONT=1,"IPV4V6","celcom4g"
Sun Oct 18 16:53:18 2020 daemon.notice netifd: 3G (7882): Error running AT-command
Sun Oct 18 16:53:18 2020 daemon.notice netifd: 3G (7882): Failed to initialize modem
Sun Oct 18 16:53:18 2020 daemon.notice netifd: 3G (7943): Stopping network 3G
config interface '3G'
        option proto 'ncm'
        option device '/dev/ttyUSB3'
        option service 'preferumts'
        option pdptype 'IPV4V6'
        option apn 'celcom4g'
        option ipv6 'auto'

and I give it a try with QMI but there is an error message that "Network device is not present".

Can you suggest me a protol/ package for this?

First make sure your modem is exposing either QMI or MBIM interface (this have nothing to do with OpenWrt). Then you can try to manually configure the corresponding connection according to the OpenWrt docs or (my preference) use this OpenWrt based firmware.

Thanks for the help.
According to this page looks like the modem I am using does not support such protocol.
I have ordered a Mini-PCIe to USB (with SIM card slot) and I see if it work. The board I am using is on on openwrt master tree so it hard to get / build the rooter firmware.

please see https://forum.sierrawireless.com/t/how-to-switch-mc8700-to-mbim-mode/9392