MikroTik mPCIe 4G modem

Hi!

I got my hands on this R11e_LTE (it actually came inside the hAP router encosing, but I removed the modem with antennas)

Wanted to try it out as the mPCIe modem for BalenaFin. I connected it, created /system-connections/cellular configuration:

[connection]
id=cellular
type=gsm
autoconnect=true

[gsm]
apn=internet.emt.ee
number=*99#

[serial]
baud=115200

[ipv4]
method=auto

[ipv6]
addr-gen-mode=stable-privacy

I also have a resin-wifi configuration there for my hotspot if that’s relevant.

After the device boots, I wait for a while with hotspot disabled, to see if it connects to cloud, but it does not. Then I enable the hotspot and SSH into the device.

NetworkManager journal has this:

Oct 17 08:30:17 306549e NetworkManager[3947]: <info>  [1571301017.3598] device (ttyACM1): Activation: starting connection 'cellular' (a12beb5c-487c-32e7-8638-d117416a5772)
Oct 17 08:30:17 306549e NetworkManager[3947]: <info>  [1571301017.3619] device (ttyACM1): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Oct 17 08:30:17 306549e NetworkManager[3947]: <info>  [1571301017.3773] modem["ttyACM1"]: modem state changed, 'registered' --> 'connecting' (reason: user-requested)
Oct 17 08:30:17 306549e NetworkManager[3947]: <info>  [1571301017.4177] modem["ttyACM1"]: modem state changed, 'connecting' --> 'registered' (reason: user-requested)
Oct 17 08:30:17 306549e NetworkManager[3947]: <info>  [1571301017.4309] modem["ttyACM1"]: modem state changed, 'registered' --> 'connecting' (reason: user-requested)
Oct 17 08:30:17 306549e NetworkManager[3947]: <info>  [1571301017.5304] modem["ttyACM1"]: modem state changed, 'connecting' --> 'registered' (reason: user-requested)
Oct 17 08:30:17 306549e NetworkManager[3947]: <warn>  [1571301017.5306] modem-broadband[ttyACM1]: failed to connect modem: "0 Unknown"
Oct 17 08:30:17 306549e NetworkManager[3947]: <info>  [1571301017.5312] device (ttyACM1): state change: prepare -> failed (reason 'unknown', sys-iface-state: 'managed')

mmcli -m 0:

method=autoroot@306549e:~# mmcli -m 0
  --------------------------------
  General  |            dbus path: /org/freedesktop/ModemManager1/Modem/0
           |            device id: caee662fedf2c9f9c27e4db382ed5dab4d41c1a5
  --------------------------------
  Hardware |         manufacturer: MikroTik
           |                model: R11e-LTE
           |    firmware revision: MikroTik_CP_2.160.000_v012
           |            supported: gsm-umts
           |              current: gsm-umts
           |         equipment id: 355654091546593
  --------------------------------
  System   |               device: /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2
           |              drivers: cdc_acm, rndis_host
           |               plugin: Generic
           |         primary port: ttyACM1
           |                ports: eth1 (net), ttyACM1 (at)
  --------------------------------
  Status   |                state: registered
           |          power state: on
           |          access tech: lte
           |       signal quality: 0% (recent)
  --------------------------------
  Modes    |            supported: allowed: any; preferred: none
           |              current: allowed: any; preferred: none
  --------------------------------
  IP       |            supported: ipv4, ipv6
  --------------------------------
  3GPP     |                 imei: 355654091546593
           |         registration: home
  --------------------------------
  3GPP EPS | ue mode of operation: csps-2
  --------------------------------
  SIM      |            dbus path: /org/freedesktop/ModemManager1/SIM/0
  --------------------------------
  Bearer   |            dbus path: /org/freedesktop/ModemManager1/Bearer/17057

Also:

root@306549e:~# nmcli device show ttyACM1
GENERAL.DEVICE:                         ttyACM1
GENERAL.TYPE:                           gsm
GENERAL.HWADDR:                         (unknown)
GENERAL.MTU:                            0
GENERAL.STATE:                          40 (connecting (prepare))
GENERAL.CONNECTION:                     cellular
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/9152

NOTE: I am able to use mmcli to successfully send SMS and receive it on my phone, so at least that part of the thing works.

I’m total NOOB regarding cellular in linux, so I’m open to all kinds of ideas and I hope that this is something trivial that I’m missing, but of course, as the hw is not officially supported, then it could be that

Hi, I could not find any mentions for MikroTik modems on the ModemManager mailing list, so I guess nobody added support for it yet. Also I looked up for AT commands reference for this modem model and I could not find any available, which is odd. Usually those are provided in a downloads section.
Thanks,
Zahari

Hi!

I contacted MikroTik support and they started off stating that it is only intended to be used with their own Router OS, but were nice enough to provide some details.

Technically it is based on MARVELL PXA1802 chipset, USB CDC-ECM ethernet interface is used for data (RouterOS interface name lteX) and USB CDC-ACM serial port device for control channel. We don’t provide AT command list or reference, insight how it is initialized and controlled can be observed in RouterOS by enabling LTE logging to RouterOS eventlog.

I updated it here first, in case it already sheds some light. I will try to investigate it myself, but I’m afraid my knowledge in this field will fall short to make this work on my own. :frowning:

Laas

Hi Laas,

On a first glance it it looks like a ModemManager plugin may need to be developed for this model with reverse engineering using the RouterOS eventlog. ModemManager developers accept contributions, but it will be quite an effort.

However there could be an easier solution to this, so the best way forward is sending a message to the ModemManager development mailing list. Hopefully the developers there can provide an advise on how this could be resolved without any coding.

Please let us know if you make any further progress with this.

Thanks,
Zahari