Community discussions

MikroTik App
 
Moebius
just joined
Topic Author
Posts: 10
Joined: Mon Jun 29, 2020 10:32 pm

AT Commands to modem in MBIM mode?

Mon Jun 29, 2020 10:38 pm

I'm running v7b8 with a Sierra 7455 LTE card in MBIM mode without too much trouble, things are working as expected. However I would like to be able to monitor cellular information using commands like "at!gstatus?"

However, the command "/interface lte at-chat lte1 input="at!gstatus\?" returns "failure: unsupported"

Is there another method to perform this action?

At this time the only way I've found to issue such commands is to move the modem out of MBIM mode.
 
Acryli
newbie
Posts: 49
Joined: Sat Sep 01, 2018 11:29 pm

Re: AT Commands to modem in MBIM mode?

Thu Jul 16, 2020 8:33 pm

+1

Same problem with an EM7565.
 
summitbri
just joined
Posts: 1
Joined: Fri Jul 24, 2020 9:57 pm

Re: AT Commands to modem in MBIM mode?

Fri Jul 24, 2020 10:03 pm

same problem with EP06-A
 
JardinEspanol
newbie
Posts: 38
Joined: Sun Dec 22, 2019 6:16 pm
Location: California

Re: AT Commands to modem in MBIM mode?

Tue Jul 28, 2020 1:35 am

Same problem with MC7355 in SXT R with ROS 7.1beta1.
 
leopardus2
Member Candidate
Member Candidate
Posts: 116
Joined: Thu Oct 13, 2016 5:12 pm

Re: AT Commands to modem in MBIM mode?

Tue Nov 17, 2020 2:23 pm

why is such a trivial thing unsupported?
 
User avatar
SiB
Forum Guru
Forum Guru
Posts: 1888
Joined: Sun Jan 06, 2013 11:19 pm
Location: Poland

Re: AT Commands to modem in MBIM mode?

Tue Nov 17, 2020 2:38 pm

same problem with EP06-A
EP06-A not have that command !.
Replace " as \" , ? as \?
but the ! , = , # what sometimes exist in AT commands works without any \ before them.
 
User avatar
SiB
Forum Guru
Forum Guru
Posts: 1888
Joined: Sun Jan 06, 2013 11:19 pm
Location: Poland

Re: AT Commands to modem in MBIM mode?

Tue Nov 17, 2020 2:42 pm

"failure: unsupported"
probably you must
  • change URC mode,
  • enable USB3.0
  • send at command to usbX and not lteX inteface
  • use latest RouterOS v7 like 7.1beta2
Some lte modules are not supported.
Example Telit LM940 start works with lte at-chat from ros7.0beta9
 
leopardus2
Member Candidate
Member Candidate
Posts: 116
Joined: Thu Oct 13, 2016 5:12 pm

Re: AT Commands to modem in MBIM mode?

Tue Nov 17, 2020 3:15 pm

In my opinion OS7 has great potential as far as USB modems go.
I have tried both a Quectel RM500Q and a Sierra Wireless EM9190 (both are 5G modems) and both have been immediately recognized and work well.
This lack of at-chat capability is serious because when using such modems there is a lot of tuning needed before committing to a configuration, and having
to move the modem out of the mikrotik device and into a cheap chinese router (which can talk to the modem just fine) is a real nuisance.

Please, PLEASE Mikrotik, fix the at-chat for modems in MBIM mode and you'll be rewarded with a lot of new customers.
 
User avatar
SiB
Forum Guru
Forum Guru
Posts: 1888
Joined: Sun Jan 06, 2013 11:19 pm
Location: Poland

Re: AT Commands to modem in MBIM mode?

Tue Nov 17, 2020 3:20 pm

leopardus2
Please, PLEASE Mikrotik, fix the at-chat for modems in MBIM mode and you'll be rewarded with a lot of new customers.
Send this to support@mikrotik.com or https://mikrotik.com/support
 
leopardus2
Member Candidate
Member Candidate
Posts: 116
Joined: Thu Oct 13, 2016 5:12 pm

Re: AT Commands to modem in MBIM mode?

Tue Nov 17, 2020 4:04 pm

Done already
 
leopardus2
Member Candidate
Member Candidate
Posts: 116
Joined: Thu Oct 13, 2016 5:12 pm

Re: AT Commands to modem in MBIM mode?

Wed Dec 30, 2020 1:58 pm

I am still looking forward for a solution to this issue, which prevents me from using a non quectel modem on my RB3011.
Support replied to change the lte mode to serial and check the serial ports that should show up under /port, to find which one will work with AT command,
however the usb port that appears when I do is in inactive state:
[admin@MikroTik] > /port/print 
Flags: I - INACTIVE
Columns: NAME, CHANNELS, USED-BY, BAUD-RATE
 #     NAME     C  USED-BY         BAUD
 0     serial0  1  Serial Console  auto
 1  I  usb2     4                  9600
[admin@MikroTik] > /system serial-terminal port=usb2 channel=0
failure: port is inactive
[admin@MikroTik] > /system serial-terminal port=usb2 channel=1
failure: port is inactive
[admin@MikroTik] > /system serial-terminal port=usb2 channel=2
failure: port is inactive
[admin@MikroTik] > /system serial-terminal port=usb2 channel=3
failure: port is inactive
I did not test on the RB3011 (because that is running my entire home) but on a spare HEX S that I have.
Without a working at-chat command there is no way to use a MBIM modem with RouterOS.
 
User avatar
SiB
Forum Guru
Forum Guru
Posts: 1888
Joined: Sun Jan 06, 2013 11:19 pm
Location: Poland

Re: AT Commands to modem in MBIM mode?

Thu Dec 31, 2020 11:44 am

no response from MikroTik ? You can share that case with me ? At support portal you have a share button, use info@sibex.it .

Some person must isolate usb3.0 pings, enable usb3.0 via at and then communication start work.
I not have experience with sierra and not use that cards.
 
urielka
just joined
Posts: 8
Joined: Sat Oct 26, 2019 12:50 am

Re: AT Commands to modem in MBIM mode?

Tue Aug 31, 2021 9:49 pm

AT commands work with 7.1rc1 and MC7455 in MBIM mode!

In 7.1rc2 it doesn't work anymore :(
 
User avatar
SiB
Forum Guru
Forum Guru
Posts: 1888
Joined: Sun Jan 06, 2013 11:19 pm
Location: Poland

Re: AT Commands to modem in MBIM mode?

Wed Sep 01, 2021 12:13 pm

urielka write:
AT commands work with 7.1rc1 and MC7455 in MBIM mode!
In 7.1rc2 it doesn't work anymore :(
Give more details, what error, responce you get at 7.1rc2... and they work only at 7.1rc1 ?
You can enter that info to v7.1rc2 [development] is released! and to support@mikrotik.com too of course.
 
urielka
just joined
Posts: 8
Joined: Sat Oct 26, 2019 12:50 am

Re: AT Commands to modem in MBIM mode?

Thu Sep 02, 2021 1:18 am

in 7.1rc1 everything works fine, in 7.1rc2 at-chat just gets stuck.

Using MC7455 on RB912UAG-5HPnD
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 3169
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: AT Commands to modem in MBIM mode?

Thu Sep 02, 2021 3:23 am

in 7.1rc1 everything works fine, in 7.1rc2 at-chat just gets stuck.

Using MC7455 on RB912UAG-5HPnD
Are you using lte/MBIM mode or PPP mode with at-chat? I just tried in this on a hAPac2 with external MC7455 and seem to work with LTE mode:

[skyfi@hap94] > /interface/lte/monitor lte1 
            status: connected
             model: MC7455
          revision: SWI9X30C_02.32.11.00
  current-operator: AT&T
        data-class: LTE
    session-uptime: 3h42m9s
              imei: xxx
              imsi: xxx
              uicc: xxx
              rssi: -91dBm

[skyfi@hap94] > /interface/lte/at-chat lte1 input="AT!ENTERCND=\"A710\""
  output: OK

[skyfi@hap94] > /interface/lte/at-chat lte1 input="AT!USBCOMP=?"
  output: !USBCOMP: AT!USBCOMP=<Config Index>,<Config Type>,<Interface bitmask> 
          <Config Index> - configuration index to which the composition applies, 
          should be 1 <Config Type> - 1:Generic, 2:USBIF-MBIM, 3:RNDIS config 
          type 2/3 should only be used for specific Sierra PIDs: 68B1, 9068 
          customized VID/PID should use config type 1 <Interface bitmask> - DIAG 
          - 0x00000001, NMEA - 0x00000004, MODEM - 0x00000008, RMNET0 - 
          0x00000100, RMNET1 - 0x00000400, MBIM - 0x00001000, e.g. 10D - diag, 
          nmea, modem, rmnet interfaces enabled 1009 - diag, modem, mbim 
          interfaces enabled The default configuration is: at!usbcomp=1,1,10F OK

[skyfi@hap94] > /interface/lte/at-chat lte1 input="AT!LTEINFO?"
  output: !LTEINFO: Serving: EARFCN MCC MNC TAC CID Bd D U SNR PCI RSRQ RSRP 
          RSSI RXLV 2000 310 410 35614 0A1FC518 4 3 3 6 269 -12.1 -94.6 -65.8 -- 
          IntraFreq: PCI RSRQ RSRP RSSI RXLV 269 -12.1 -94.6 -65.8 -- 223 -18.0 
          -103.3 -72.5 -- 222 -20.0 -106.0 -72.5 -- InterFreq: EARFCN 
          ThresholdLow ThresholdHi Priority PCI RSRQ RSRP RSSI RXLV 5110 0 0 0 
          290 -15.0 -93.3 -65.2 0 5110 0 0 0 8 -9.0 -83.2 -65.9 0 5110 0 0 0 125 
          -14.7 -90.9 -66.0 0 WCDMA: UARFCN ThreshL ThreshH Prio PSC RSCP ECN0 
          RXLV OK

[skyfi@hap94] > /interface/lte/at-chat lte1 input="AT!GSTATUS?"
  output: !GSTATUS: Current Time: 12834 Temperature: 47 Reset Counter: 1 Mode: 
          ONLINE System mode: LTE PS state: Attached LTE band: B4 LTE bw: 10 MHz 
          LTE Rx chan: 2000 LTE Tx chan: 20000 LTE CA state: INACTIVE LTE Scell 
          band:B12 LTE Scell bw:10 MHz LTE Scell chan:5110 EMM state: Registered 
          Normal Service RRC state: RRC Connected IMS reg state: No Srv PCC RxM 
          RSSI: -65 RSRP (dBm): -98 PCC RxD RSSI: -64 RSRP (dBm): -94 SCC RxM 
          RSSI: -65 RSRP (dBm): -90 SCC RxD RSSI: -71 RSRP (dBm): -96 Tx Power: 
          -- TAC: 8B1E (35614) RSRQ (dB): -10.5 Cell ID: 0A1FC518 (169854232) 
          SINR (dB): 7.6 OK

[skyfi@hap94] > /interface/lte/at-chat lte1 input="AT!USBCOMP?"
  output: Config Index: 1 Config Type: 1 (Generic) Interface bitmask: 00001009 
          (diag,modem,mbim) OK

[skyfi@hap94] > /system/routerboard/print 
       routerboard: yes
        board-name: hAP ac^2
             model: RBD52G-5HacD2HnD
     serial-number: xxx
     firmware-type: ipq4000L
  factory-firmware: 6.43.10
  current-firmware: 7.1rc2
  upgrade-firmware: 7.1rc2

One note, you used to need to escape "?" like \?. But in rc1 and rc2, at-chat has worked with Siera MC7455 in LTE at-chat no problem. I did have an issue MC7354 in PPP mode not liking at-chat (tried to use that switch it to MBIM using USBCOMP) in beta6 or rc1.
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 3169
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: AT Commands to modem in MBIM mode?

Thu Sep 02, 2021 4:43 am

In fact, it now pretty easy use scripting "functions" to issue the AT commands with at-chat and the Sierra etc modems. If you put it into a scheduler script, with an interval, it can poll the modem and store the detailed LTE info. See below:

[skyfi@hap94] > /system/scheduler/export

# sep/01/2021 18:33:32 by RouterOS 7.1rc2
# software id = QDR7-4Y0A
#
# model = RBD52G-5HacD2HnD
# serial number = xxx
/system scheduler
add interval=15s name=doPollingScripts on-event=":global AT;\r\
    \n:global atLTEINFO;\r\
    \n:global lteinfo;\r\
    \n\r\
    \n:global AT do={/interface/lte/at-chat lte1 input=\$1;};\r\
    \n:global atLTEINFO [/interface/lte/at-chat lte1 input=\"AT!LTEINFO\?\" as-va\
    lue];\r\
    \n:global lteinfo do={ :put \$atLTEINFO };" policy=\
    ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-time=\
    startup
    
[skyfi@hap94] > $AT ATI
  output: Manufacturer: Sierra Wireless, Incorporated Model: MC7455 Revision: 
          SWI9X30C_02.32.11.00 r8042 CARMD-EV-FRMWR2 2019/05/15 21:52:20 MEID: 
          xxx IMEI: xxx IMEI SV: 19 FSN: xxx 
          +GCAP: +CGSM OK

[skyfi@hap94] > $lteinfo
output=!LTEINFO: 
Serving:   EARFCN MCC MNC   TAC      CID Bd D U SNR PCI  RSRQ   RSRP   RSSI RXLV
             2000 310 410 35614 0A1FC518  4 3 3  -3 269 -12.6 -100.7  -68.6 --
IntraFreq:                                          PCI  RSRQ   RSRP   RSSI RXLV
                                                    269 -12.6 -100.7  -68.6 --
                                                     40 -14.1 -101.4  -78.4 --
                                                    223 -17.6 -106.0  -78.4 --
InterFreq: EARFCN ThresholdLow ThresholdHi Priority PCI  RSRQ   RSRP   RSSI RXLV
             5110            0           0        0 290 -15.8  -99.2  -71.9   0
             5110            0           0        0  33 -19.0  -97.1  -68.9   0
             5110            0           0        0   8 -11.7  -91.3  -70.1   0
WCDMA:     UARFCN ThreshL ThreshH Prio PSC   RSCP  ECN0 RXLV

OK
In theory, one could use :toarray and the new MQTT function (in IOT v7.1 extra package) to store persist these values in something like AWS. That gets more complex, but seemingly possible.

So there may be bug in the at-chat hanging... I've only seen that with the PPP at-chat. But have to say this is night and day with the Sierra modems from v6 where PPP mode only has 1 AT channel, so you can't even get RSSI with the MC7354/MC7455 modems while there running.
 
AV1234
just joined
Posts: 1
Joined: Fri Dec 15, 2023 4:11 pm

Re: AT Commands to modem in MBIM mode?

Mon Dec 18, 2023 1:05 pm

Have the same issue. ROS 7.13 Modem EP06-E:
[admin@Mikrotik] > interface/lte/monitor lte1                             
            status: connected
             model: EP06-E
          revision: EP06ELAR04A05M4G
  current-operator: 
One time AT-Command works well:
[admin@Mikrotik] > /interface/lte/at-chat lte1 input="AT+QCAINFO"
  output: +QCAINFO: "pcc",3300,50,"LTE BAND 7",1,371,-105,-7,-81,16
          +QCAINFO: "scc",1301,100,"LTE BAND 3",1,449,-101,-8,-83,6
          OK
But most of times it stucks:
[admin@Mikrotik] > /interface/lte/at-chat lte1 input="AT+QCAINFO"
action timed out - try again, if error continues contact MikroTik support and send a supout file (13)
And I have to wait or Ctrl+C and try again and again till it works fine once.
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 3169
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: AT Commands to modem in MBIM mode?

Mon Dec 18, 2023 10:04 pm

You can try to add a "wait=no" to the commands. The default (wait=yes) waits for an "OK" to be received, but it can timeout.

If you add adding logging for topics=lte,!packet, the log may show the results too.

Alternatively, you may be able to use something like "/system/serial-terminal usb1 channel=1" to get to directly to the AT serial line of the modem (& adjust port and channel as needed in the command)
 
AV1234
just joined
Posts: 1
Joined: Fri Dec 15, 2023 4:11 pm

Re: AT Commands to modem in MBIM mode?

Tue Dec 19, 2023 8:15 am

I have try "wait=no", but it didn't fix the problem, stucks as well.
And something like "/system/serial-terminal usb1 channel=1" I found correct usb port and tried different channels, but it didn't answer for AT command, no OK response.
Logging lte didn't show my stucked request, like I didn't send it at all.
Last edited by AV1234 on Tue Dec 19, 2023 8:15 am, edited 1 time in total.

Who is online

Users browsing this forum: GoogleOther [Bot] and 21 guests