Mikrotik lte1 mbim error sms store is full

Lte1 mbim error sms store is full Tue Sep 20, 2022 11:43 am For introduction I would like to warn any reader that I am total noob and would like to ask for explanations of any technical details to be adjusted as for a child or a golden retriever. I bought MikroTik Chateau LTE […]

Содержание

  1. Lte1 mbim error sms store is full
  2. Re: Chateau LTE12 drops connection to LTE network?
  3. Lte1 mbim error sms store is full
  4. Re: Quectel EC25-AF MBIM has internal error
  5. Re: Quectel EC25-AF MBIM has internal error
  6. Re: Quectel EC25-AF MBIM has internal error
  7. Re: Quectel EC25-AF MBIM has internal error
  8. Re: Quectel EC25-AF MBIM has internal error
  9. Re: Quectel EC25-AF MBIM has internal error
  10. Re: Quectel EC25-AF MBIM has internal error

Lte1 mbim error sms store is full

Tue Sep 20, 2022 11:43 am

For introduction I would like to warn any reader that I am total noob and would like to ask for explanations of any technical details to be adjusted as for a child or a golden retriever.

I bought MikroTik Chateau LTE 12 router in June 2021 and everything was excellent until 2 months ago. The problem is that internet connection is lost for a minute or two at random times usually within 10-20 minute time frame. Having a zoom call will lead to being disconnected for 3-4 times within one hour. VPN connection gets lost also within the same 10-20 minute time frame (I need it for Solidworks licence)
I wanted to blame the mobile network operator at first, but there are few things I would like to make sure before I get into fight with them:
1) there is only power LED turned on in front panel (see attached picture «front panel»). At the moment of writing I have connected my laptop with LAN cable and my phone is connected to wifi (mobile data turned off to make sure that phone uses wifi) so I would expect more than just power LED to be shining. Am I missing something?
2) I would appreciate any comments on actual network signal quality? Attached is picture of «some details».
3) Another thing I noticed is that when internet is not working, lte disappears from «interfaces» list — attached are 2 pictures of «OK» and «not OK» for moments when everything was fine or bad respectively.
Is there some logfile that could contain some more details about those disconnections? My main goal is to find out if that is mobile network or the router misbehaving. And then in case of router being the culprit it would be nice to understand how to fix that.
Do I need to extract and post here some config of the router? How do I do that? I see that in the top right corner I can switch over to terminal and I did take a look at the list of available commands with ‘?’, but that is about it (I do have some experience with Linux so I have seen terminal and executed some commands there and that is how far my noob status reaches. )
Thanks in advance for any tips of where should I poke next.

Re: Chateau LTE12 drops connection to LTE network?

Tue Sep 20, 2022 11:18 pm

BTW I did find the log and the only lines about LTE are like this:

22:32:54 interface,info lte1 link down
22:32:54 lte,info lte1 mbim: error: wdm send failed: 19
22:33:21 lte,info lte1: IPV4: 10.104.200.142, DNS: 2
22:33:21 interface,info lte1 link up

22:42:01 interface,info lte1 link down
22:42:01 lte,info lte1 mbim: error: wdm send failed: 19
22:42:26 lte,info lte1: IPV4: 10.104.167.58, DNS: 2
22:42:26 interface,info lte1 link up

22:50:51 lte,error lte1: reply timeout for: AT+QENG=»servingcell»

22:51:10 interface,info lte1 link down
22:51:10 lte,info lte1 mbim: error: wdm send failed: 19
22:51:35 lte,info lte1: IPV4: 10.81.180.204, DNS: 2
22:51:35 interface,info lte1 link up

23:00:39 interface,info lte1 link down
23:00:39 lte,info lte1 mbim: error: wdm send failed: 19
23:01:05 lte,info lte1: IPV4: 10.80.206.60, DNS: 2
23:01:05 interface,info lte1 link up

Источник

Lte1 mbim error sms store is full

Mon May 04, 2020 11:54 pm

Re: Quectel EC25-AF MBIM has internal error

Tue May 05, 2020 10:54 am

Re: Quectel EC25-AF MBIM has internal error

Fri May 22, 2020 8:19 am

Re: Quectel EC25-AF MBIM has internal error

Fri May 22, 2020 8:46 am

Thank you for the explanation. I have been working with Artis M in your support group and Neal with Quectel North America support. I have connected them together and I have provided Quectel all the info Artis provided to me about the issue with EC25-AF firmware.

Now the waiting begins for updated firmware from Quectel. Meanwhile, looking forward to testing out next version of ROS 7.

Re: Quectel EC25-AF MBIM has internal error

Tue Sep 15, 2020 2:14 am

150 RouterBoards in EMEA
Knowledge Base about LTE by SiB | Buy me a caffe | Telegram : http://t.me/SiB_PL

Re: Quectel EC25-AF MBIM has internal error

Tue Sep 22, 2020 8:32 pm

Re: Quectel EC25-AF MBIM has internal error

Wed Sep 23, 2020 1:32 pm

Our r7b2 works excellent with EC25-AFX after we use newest firmware: EC25AFXGAR07A03M1G_01.002.01.002 but it’s differ fw for -AF and I don’t know what is a latest one. Prev. fw at EC25-AFX not detect properly lte1 interface and r7.03 is a minimum for us and latest one.

Your problem we face but with EP06-A who not connect to LTE in frirst 15m, after

15m he connect to LTE, this was strange. He provide us logs:
lte1: +QLWURC: «pdp active»,»failed»,»nxtgenphone»
lte1: +QLWURC: «deregister»,0

We disable the Use Network APN and this not help us, but providing the APN by:
/interface lte at-chat lte1 input=»AT+CGDCONT=?»
/interface lte at-chat lte1 input=»AT+CGDCONT=1,»IPV4V6»,»broadband»»
fix all staff and then every reboot works with LTE connection now every time at EP06A, but at EC25-AF* probably that command will be differ, check at manual.

ECM mode and his internal NAT for us is not possibly to use in project and we not test it and not use it. Only MBIM mode.

150 RouterBoards in EMEA
Knowledge Base about LTE by SiB | Buy me a caffe | Telegram : http://t.me/SiB_PL

Re: Quectel EC25-AF MBIM has internal error

Sun Oct 11, 2020 12:32 am

I recently started testing an EC25-AF in the USA on AT&T service.. its in an LTAP mini runninf ROS7.1beta2..
im runninfg the modem in MBIM mode, I didnt tape it, I ran the usbmode AT commands so i didnt need to tape it..

it shows up quickly as an LTE interface . within a minute or so of ROS bootup.. however the thing I notice is that it really likes to sync to an HSUPA tower instead of LTE at first..

rarely will it sync as LTE initially .. even though there are nice nearby towers with supported LTE bands.. ive tried a couple different antennas and it will wants to live in HSUPA mode after initial power up or ROS reboot.. after 10-15 minutes it will finally sync to a different tower and be LTE. and my signal strengths will be much higher. on the LTE tower than they were o nthe HSUPA tower..

trying to figure out how to searches for cells and if there are any AT commands that alter the way in which it searches..

different antennas affect signal strength. and if im in an area where multiple LTE towers are super close it **MAY** sync LTE and staythat way however it often still likes to go HSUPA first and then switches over..

anyone else experience anything similar? quectel tells me my firmwares are latest at: EC25AFFAR07A08M4G_01.001.01.001. for the USA.

I dont seem to have this sync issue with the R11 card or an MC7354 card. once the EC25 switches over to LTE my speeds are MUCH faster than the R11 or MC7354 card so I am hoping to use the EC25-AF. I havent yet tried my MC7455 card and am still awaiting arrival of my LM960..
-Christopher

Источник

mikrotik:rb3011uias:routeros:tools:sms

Содержание

На самом деле процедура банальнейшая до ужаса. 8-O Но есть один нюанс.

Все настройки производятся в Tools → SMS.

  1. Выбираете Type – у меня Serial и все скрипты под этот тип.

  2. Ставите галочку Auto Erase, чтобы не переполнялась память на SIM-карте, т.к. SMS хранятся именно там.

  3. Указываете Allowed Numbers и Secret.

    • Я, кстати, не знаю, будут ли мои скрипты работать, если указать несколько номеров…

    • А секрет нужен для передачи удаленных команд скриптам (к примеру).

  4. Вот тут начинается магия – нужно подобрать Channel так, чтобы и модем сам по себе работал и SMS-ки ходили.

    • У меня заработало так – в настройках PPP параметр Data/Info Channel значения 0, а в SMS значение 2.

    • Другие варианты не захотели заводиться.

  5. Выбираете порт, у меня, для красоты, переименован в System → Ports. 8-)

  6. И только теперь нажимаете Receive Enabled.

FIXME Каждый раз при перезагрузке устройства, необходимо заново выполнять 6 пункт. Для автоматизации я использую такой скрипт. Предположу, что это баг…

Код для импорта

sms.rsc
/tool sms
set allowed-number=+79999999999 auto-erase=yes channel=2 port=e171 
    receive-enabled=yes secret=12345

Дисклеймер

  • Использование материалов данной базы знаний разрешено на условиях лицензии, указанной внизу каждой страницы! При использовании материалов активная гиперссылка на соответствующую страницу данной базы знаний обязательна!

  • Автор не несет и не может нести какую либо ответственность за последствия использования материалов, размещенных в данной базе знаний. Все материалы предоставляются по принципу «как есть». Используйте их исключительно на свой страх и риск.

  • Все высказывания, мысли или идеи автора, размещенные в материалах данной базе знаний, являются исключительно его личным субъективным мнением и могут не совпадать с мнением читателей!

  • При размещении ссылок в данной базе знаний на интернет-страницы третьих лиц автор не несет ответственности за их техническую функциональность (особенно отсутствие вирусов) и содержание! При обнаружении таких ссылок, можно и желательно сообщить о них в комментариях к соответствующей статье.

Последнее изменение: 2022/02/12 11:40 (внешнее изменение)

Ссылки:

https://wiki.mikrotik.com/wiki/Manual:Tools/Sms

https://weblance.com.ua/265-upravlenie-mikrotik-udalenno-pri-pomoschi-sms.html

Настройка приема смс

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

Tool > SMS

Port как несложно догадаться, это порт USBLTE1, на котором находится наш модем

Channel зависит от установленного модема; для Huawei E173 используется 2 канал, для LTE нет настройки канала...

Secret специальный пароль, без которого Mikrotik не будет выполнять команды во входящих SMS

Allowed Number «разрешенный номер», опция необязательна, при её установке, Mikrotik будет выполнять команды только от указанного номера

Keep Max SMS количество хранимых сообщений; все сообщения хранятся на SIM-карте, поэтому если вы укажите слишком большое количество, а количество сохраненных SMS достигнет предела, Mikrotik не сможет получать новые SMS

!!! ВНИМАНИЕ RouterOS после перезагрузки автоматически отключает приём SMS и после каждой перезагрузки эту опцию необходимо включать вручную

:delay 120s;

/tool sms set receiveenabled=yes

Отправка SMS-команд на Mikrotik Синтаксис команды следующий:

:cmd 1234567 script script_name

1234567 Secret специальный пароль, без которого Mikrotik не будет выполнять команды во входящих SMS

script_name имя скрипта в System > Scripts

:cmd 1234567 script reboot

Скрипты Включение приема SMS Перезагрузка маршрутизатора

+7НОМЕР_ТЕЛЕФОНА номер на который отправляется смс

/system script

add dontrequirepermissions=no name=eneable_sms owner=admin policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=«:delay 120s;r

    n/tool sms set receive-enabled=yes»

add dontrequirepermissions=no name=reboot owner=admin policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=«/tool sms send lte1 «+7НОМЕР_ТЕЛЕФОНА» message=»Rebooting Mikrotik…»; :delay 5s; /system reboot»

Перезагрузка 3G-интерфейса

Создаем скрипт под названием «reboot3g», пишем в него код:

:log warning («Rebooting 3G via SMS command»);

/tool sms send usb1 channel=2 «+7НОМЕР_ТЕЛЕФОНА» message=«Rebooting 3G modem…»;

/interface pppclient set pppout1 disable=yes;

:delay 1s;

/interface pppclient set pppout1 disable=no;

Планировщик

/system scheduler

add name=eneable_sms onevent=eneable_sms policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon starttime=startup

Аватара пользователя

Barvinok

Сообщения: 103
Зарегистрирован: 28 фев 2012, 23:21

Наконец собрал всё до кучи:
RB912UAG-2HPnD
Sierra MC7710
StationBox S
Bester Parabolic LTE MIMO 2×2

Втыкаю симку МТС-Коннект 4G.
Исполняю:

Код: Выделить всё

/system routerboard usb> set type=mini-PCIe
/interface ppp-client> set 0 apn=internet.mts.ru user=mts password=mts phone=*99#

Вижу интерфейсы lte1 и ppp-out.
ppp сразу поднимается (R).
Иногда даже получает ip-адрес и маршрут по умолчанию, но буквально на несколько секунд.
DNS не получал ни разу.

Код: Выделить всё

/ip address pr
Flags: X - disabled, I - invalid, D - dynamic
 #   ADDRESS            NETWORK         INTERFACE                                                                                                                                                                       
 0 D 192.168.2.10/24    192.168.2.0     Bridge_ATP                                                                                                                                                                     
 1 D 10.64.64.63/32     10.112.112.111  ppp-out1 

 /ip route> print
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, B - blackhole, U - unreachable, P - prohibit
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 0 ADS  0.0.0.0/0                          10.112.112.111            1
 1 ADC  10.112.112.111/32  10.64.64.63     ppp-out1                  0
 2 ADC  192.168.2.0/24     192.168.2.10    Bridge_ATP                0

/ping 10.112.112.111
HOST                                     SIZE TTL TIME  STATUS                                                                                                                                                         
10.112.112.111                                          timeout                                                                                                                                                         
                                                        no route to host                                                                                                                                               
                                                        no route to host                                                                                                                                               
                                                        no route to host                                                                                                                                               
    sent=4 received=0 packet-loss=100%

Интернет не работает, пинги никуда не идут. Что я не доделал?

Последний раз редактировалось Barvinok 26 сен 2014, 20:10, всего редактировалось 2 раза.

vqd

Модератор
Сообщения: 3605
Зарегистрирован: 26 сен 2013, 14:20
Откуда: НСК
Контактная информация:

26 сен 2014, 20:06

Выключаете PPP
Идете в DHCP-Cliet и создаете на LTE1
Получает адрес

Далее в NAT создаёте соответствующее правило на LTE1 и радуетесь жизни

Аватара пользователя

Barvinok

Сообщения: 103
Зарегистрирован: 28 фев 2012, 23:21

26 сен 2014, 20:16

Это первое, что пришло в голову. Но тоже не работает, не получает он адрес. И вообще, пишет состояние «Invalid»

Код: Выделить всё

/ip dhcp-client> print 
Flags: X - disabled, I - invalid
 #   INTERFACE   USE-PEER-DNS ADD-DEFAULT-ROUTE STATUS        ADDRESS           
 0   Bridge_ATP                no           no                bound         192.168.2.10/24   
 1 I lte1                           yes          yes             

На сайте Микротика сказано:

If modem uses firmware 3.5 it should be upgraded to 3.5.23.2 firmware release in order to work in RouterOS correctly again.

Ума не приложу, как это проверить и сделать.
Можно ли использовать консоль самого маршрутизатора (/system serial-terminal, как описывается здесь)?

Последний раз редактировалось Barvinok 26 сен 2014, 20:29, всего редактировалось 1 раз.

vqd

Модератор
Сообщения: 3605
Зарегистрирован: 26 сен 2013, 14:20
Откуда: НСК
Контактная информация:

26 сен 2014, 20:25

В свойствах LTE нажмите INFO Ели ничего не появится то юстируйте антенны.

Второй момент. УБ может подвисать. Попробуйте перезагрузить модем по питанию

Аватара пользователя

Barvinok

Сообщения: 103
Зарегистрирован: 28 фев 2012, 23:21

26 сен 2014, 20:44

Код: Выделить всё

 /interface lte> print 
Flags: X - disabled, R - running
 0    name="lte1" mtu=1500 mac-address=AA:09:3A:94:01:07 network-mode=lte authentication=chap
/interface lte> info 0
failure: Configuration running, please wait!

Два вопроса:
1. «Перезагрузить модем по питанию» это «/system routerboard usb power-reset» ?
2. Что такое УБ?

Последний раз редактировалось Barvinok 27 сен 2014, 00:45, всего редактировалось 1 раз.

Аватара пользователя

Barvinok

Сообщения: 103
Зарегистрирован: 28 фев 2012, 23:21

26 сен 2014, 22:56

Что бы работать с модемом через serial-terminal нужно выключить DirectiIP mode:

Код: Выделить всё

/port firmware set ignore-directip-modem=yes
/system reboot

После чего модем начинает отзываться на команды:

Код: Выделить всё

system serial-terminal port=usb1 channel=3
[Ctrl-A is the prefix key]
AT
OK

Вот какие данные я извлекаю:

Прошивка у меня, видимо, последняя. Она свежее рекомендуемой 3.5.23.2. Может имеет смысл откатиться?
Вот они где лежат.
Согласно этому посту у мне прошивка DIP.

Базовые идентификаторы модема:
USBVID_1199&PID_68A3 — модем в режиме DirectIP
USBVID_1199&PID_68A2 — модем в режиме QMI

Код: Выделить всё

/system resource usb> print detail 
 0 device="1:1" vendor="Linux 3.3.5 ehci_hcd" name="RB400 EHCI"
   serial-number="rb400_usb" vendor-id="0x1d6b" device-id="0x0002"
   speed="480 Mbps" ports=1 usb-version="2.00"

 1 device="1:2" vendor="Sierra Wireless, Incorporated" name="MC7710"
   serial-number="358178042541104" vendor-id="0x1199" device-id="0x68a3"
   speed="480 Mbps" ports=0 usb-version="2.00"

Чего, собственно, нехватает для работы интернета?!

vqd

Модератор
Сообщения: 3605
Зарегистрирован: 26 сен 2013, 14:20
Откуда: НСК
Контактная информация:

27 сен 2014, 06:02

Если микрот увидел модем значит он у вас в нужном режиме работает. Не хватать может только уровня сигнала.
В логах после перезагрузки модема чего пишет?

ПыСы: У меня один из нескольких имеет вот такую прошивку SWI9200X_03.05.24.00ap r5792 carmd-en-10527 2013/05/02 13:35:47

Туту вдруг вспомнил. Была партия сиерр которые отказывались работать. Долго мучались с ними а потом воткнули в ПК для проверки и вышли в инет с ПК. И вот после этой манипуляции все 20 штук завелось

Аватара пользователя

Barvinok

Сообщения: 103
Зарегистрирован: 28 фев 2012, 23:21

27 сен 2014, 23:38

В логах пишет error:

Код: Выделить всё

sep/28 00:37:18 async,ppp,info ppp-out1: terminating... - modem hunged up 
sep/28 00:37:19 async,ppp,info ppp-out1: disconnected
sep/28 00:37:19 async,ppp,info ppp-out1: initializing...
sep/28 00:37:19 async,ppp,info ppp-out1: waiting for packets...
sep/28 00:37:36 lte,error internal init failed: ERROR
sep/28 00:37:37 lte,error internal init failed: ERROR
sep/28 00:37:37 lte,error internal init failed: ERROR
sep/28 00:37:38 lte,error internal init failed: ERROR
sep/28 00:37:39 lte,error internal init failed: ERROR
sep/28 00:37:39 lte,error internal init failed: ERROR
sep/28 00:37:40 lte,error internal init failed: ERROR
sep/28 00:37:40 lte,error internal init failed: ERROR
sep/28 00:37:41 lte,error internal init failed: ERROR
sep/28 00:37:42 lte,error internal init failed: ERROR
sep/28 00:37:42 lte,error internal init failed: ERROR
sep/28 00:37:43 lte,error internal init failed: ERROR
sep/28 00:37:43 lte,error internal init failed: ERROR
sep/28 00:37:44 lte,error internal init failed: ERROR
sep/28 00:37:45 lte,error internal init failed: ERROR
sep/28 00:37:45 lte,error internal init failed: ERROR
sep/28 00:37:46 lte,error internal init failed: ERROR
sep/28 00:37:46 lte,error internal init failed: ERROR
sep/28 00:37:47 lte,error internal init failed: ERROR
sep/28 00:37:48 lte,error internal init failed: ERROR
sep/28 00:37:48 lte,error internal init failed: ERROR

Аватара пользователя

Barvinok

Сообщения: 103
Зарегистрирован: 28 фев 2012, 23:21

28 сен 2014, 00:29

Завелось! :ya_hoo_oo:
В общем, делюсь полученным опытом.
Первое и самое главное:

Uldis писал(а):Hello,

the modem is recognized as a LTE interface — configure the lte1 interface and add a
dhcp client on it.
the ppp-interface for this modem is for the gps channel.

Regards,
Uldis

Значит ppp-out отключаем и все нехитрые настройки производим на lte1:

Код: Выделить всё

/interface lte> set 0 user=mts password=mts apn=internet.mts.ru

DHCP-client мгновенно получил IP, DNS, gateway и всё закрутилось.

И вот ещё что может пригодиться. На модеме есть три разъёма для подключения антенн: MAIN, GPS, AUX.
Предполагается, что модем втыкается в ноутбук, к MAIN подключается внутренняя антенна, которая работает как на приём, так и на передачу. К GPS понятно, что GPS антенна. А вот AUX предназначен для дополнительной внешней антенны и в случае подключения работает исключительно на приём. Как я понял, использовать её для передачи никакими командами нельзя. Поэтому если антенна у вас одна — втыкать её надо исключительно в MAIN.

Rafael

Сообщения: 10
Зарегистрирован: 21 мар 2013, 08:52

28 сен 2014, 05:03

Barvinok писал(а):Наконец собрал всё до кучи:
RB912UAG-2HPnD
Sierra MC7710
StationBox S
Bester Parabolic LTE MIMO 2×2

Втыкаю симку МТС-Коннект 4G.

Поздравляю с тем, что все завелось :)
Собираю тоже самое, только насчет антенны еще мучаюсь выбором.
Могли бы Вы ответить на пару вопросов?
1. Насколько идеально RB912UAG-2HPnD+Sierra MC7710 разместились внутри StationBox S? Все намертво садится на заводские отверстия для креплений или надо что-то колхозить?
2. Насколько StationBox герметичен? Будет висеть на мачте — дождь/снег+ветер — не попадет влага внутрь? Не надо дополнительно замазывать что-нибудь герметиком в нем?
Может быть сможете пару фото сделать открытого бокса с размещенной внутри платой, если конечно уже не в работе далеко на мачте?
3. Могли бы поделиться замерами upload/download, которых удалось добиться?
4. Отработает хотя бы неделю — поделитесь плз, насколько стабильно живет, не виснет ли и не требует ли перезагруки.

Submitted to support@mikrotik.com and the forum, but hoping (unfortunately) maybe somebody else has encountered similar issues.

I’m having problems getting the R11e-LTE-US in my RBM33G to stay registered on the cell network for more than a sec, it gets kicked off as soon as it registers. None of my sims work, but they do in the other wAP LTE I have (currently on 6.44.3 but hesitant to upgrade) and also in a USB Sierra MC7700 on my hex S (running 6.46.4).

I upgraded the RBM33G to latest 6.46.4 when started out, reset config, but trying to run at-commands return ERROR or modem not ready. I can’t upgrade the firmware on the LTE card because it doesn’t stay registered for more than a sec. Is there another way to update it? Is there a compatibility problem?

some more details/logs below…

/interface lte info lte1
pin-status: ok
functionality: full
manufacturer: MikroTik
model: R11e-LTE-US
revision: MPSS: R11eL_v12.09.174661 APSS: R11eL_v02.14.174662 CUSTAPP:
imei: xxx
imsi: xxx
uicc: xxx

/interface lte at-chat lte1 input=»AT*MRD_IMEI=R»
output: ERROR

/interface lte at-chat lte1 input=»AT*MRD_IMEI=R»
failure: modem not ready

/log print
02:20:29 system,info router rebooted
02:20:33 bridge,info «bridge1» mac address changed to xxx
02:20:39 wireless,info xxx@wlan1: connected, signal strength -47
02:20:46 lte,async lte1: sent AT E0 V1
02:20:46 lte,async lte1: rcvd OK
02:20:46 lte,async lte1: sent AT+CFUN=1,1
02:20:46 lte,async lte1: rcvd OK
02:20:46 system,info,account user admin logged in from 192.168.27.254 via winbox
02:20:47 system,info,account user admin logged in from 192.168.27.254 via telnet
02:20:52 lte,async lte1: modem hung up
02:21:07 lte,async lte1: sent AT E0 V1
02:21:17 lte,error lte1: reply timeout for: AT E0 V1
02:21:18 lte,async lte1: sent AT E0 V1
02:21:18 lte,async lte1: rcvd OK
02:21:18 lte,async lte1: sent AT+GMI
02:21:18 lte,async lte1: rcvd MikroTik
02:21:18 lte,async lte1: sent AT+GMM
02:21:18 lte,async lte1: rcvd R11e-LTE-US
02:21:18 lte,async lte1: sent AT+GMR
02:21:18 lte,async lte1: rcvd MPSS: R11eL_v12.09.174661 APSS: R11eL_v02.14.174662
CUSTAPP:
02:21:18 lte,async lte1: sent AT+CGSN
02:21:18 lte,async lte1: rcvd xxx
02:21:18 lte,async lte1: sent AT+CFUN?
02:21:18 lte,async lte1: rcvd +CFUN: 1
02:21:18 lte,async lte1: sent AT+CFUN=4
02:21:18 lte,async lte1: rcvd OK
02:21:21 lte,async lte1: sent AT+CFUN?
02:21:21 lte,async lte1: rcvd +CFUN: 4
02:21:21 lte,async lte1: sent AT+CMEE=2
02:21:21 lte,async lte1: rcvd OK
02:21:21 lte,async lte1: sent AT+CREG=2
02:21:21 lte,async lte1: rcvd OK
02:21:21 lte,async lte1: sent AT+CGREG=2
02:21:21 lte,async lte1: rcvd OK
02:21:21 lte,async lte1: sent AT+CEREG=2
02:21:21 lte,async lte1: rcvd OK
02:21:21 lte,async lte1: sent AT+CGEREP=2,0
02:21:21 lte,async lte1: rcvd OK
02:21:21 lte,async lte1: sent AT+CMGF=0
02:21:21 lte,async lte1: rcvd OK
02:21:21 lte,async lte1: sent AT+CNMI=1,1,0,1,0
02:21:21 lte,async lte1: rcvd OK
02:21:21 lte,async lte1: sent AT+CFUN=1
02:21:21 lte,async lte1: rcvd OK
02:21:21 lte,async lte1: sent AT+CPIN?
02:21:21 lte,async lte1: rcvd +CPIN: READY
02:21:25 lte,async lte1: sent AT+CPMS=»SM»,»SM»,»SM»
02:21:25 lte,async lte1: rcvd +CPMS: 0,30,0,30,0,30
02:21:25 lte,async lte1: sent AT+CFUN?
02:21:25 lte,async lte1: rcvd +CFUN: 1
02:21:25 lte,async lte1: sent AT+ICCID
02:21:25 lte,async lte1: rcvd ICCID: xxx
02:21:25 lte,async lte1: sent AT+CNUM
02:21:25 lte,async lte1: rcvd
02:21:25 lte,async lte1: sent AT+CIMI
02:21:25 lte,async lte1: rcvd 310410227425065
02:21:25 lte,async lte1: sent AT+CPIN?
02:21:25 lte,async lte1: rcvd +CPIN: READY
02:21:25 lte,async lte1: sent AT+COPS=2
02:21:25 lte,async lte1: rcvd OK
02:21:25 lte,async,event lte1: +CGEV: NW DETACH
02:21:27 lte,async lte1: sent AT+COPS=0,0,,7
02:21:27 lte,async lte1: rcvd OK
02:21:27 lte,async lte1: sent AT+CGDCONT=1,»IP»,»Broadband»
02:21:27 lte,async lte1: rcvd OK
02:21:27 lte,async lte1: sent AT$QCPDPP=1,0
02:21:27 lte,async lte1: rcvd OK
02:21:28 lte,async lte1: sent AT+CEREG=2
02:21:28 lte,async lte1: rcvd OK
02:21:28 lte,debug lte1: config ok
02:21:28 lte,debug lte1: network access technology: Evolved 3G (LTE)
02:21:28 lte,info lte1: registered home
02:21:33 lte,async lte1: sent at$ecmcall=1
02:21:33 lte,async lte1: rcvd ERROR
02:21:33 lte,async lte1: sent at$ecmcall?
02:21:33 lte,async lte1: rcvd ERROR
02:21:33 lte,async lte1: sent AT+CFUN=1,1
02:21:33 lte,async lte1: rcvd OK
02:21:37 lte,async,event lte1: +CGEV: ME DETACH
02:21:38 lte,async lte1: modem hung up

/system resource pci print
# DEVICE VENDOR NAME IRQ
0 01:00.0 Atheros Communications Inc. 11a/b/g/n Wireless LAN M… 4
1 00:00.0 unknown unknown (rev: 1) 0

/system resource usb print
# DEVICE VENDOR NAME SPEED
0 1-0 Linux 3.3.5 xhci-hcd xHCI Host Controller 480
1 2-0 Linux 3.3.5 xhci-hcd xHCI Host Controller 5000
2 1-1 MikroTik R11e-LTE-US 480

Лучший ответ Сообщение было отмечено qwertehok как решение

Решение

1) Создаём Телеграмм-бота (В тырнете много инфы как это сделать, копипастить не буду, например — тыц), узнаем свой chatid и bot-токен
2) Создаём на микротике скрипт вот с таким содержимым:

Кликните здесь для просмотра всего текста

Код

:local autodelete 1;

:local smsArray ({});
:local inboxCursor 0;
:local inboxCount 0;

/interface lte at-chat lte1 input="AT+CMGF=0";

:local res [/interface lte at-chat lte1 input="AT+CPMS="SM"" as-value wait=yes];
:set res ($res->"output");

:if ([:typeof [:find $res "+CPMS: "]] = "num") do={
  :set inboxCount [:tonum [:pick $res ([:find $res "+CPMS: "]+7) ([:find $res ","])]];
  :put "SMS Inbox count: $inboxCount";
};

:if ($inboxCount>0) do={

  :local symbols {"-";" ";" ";"!";""";"#";"$";"%";"&";"'";"(";")";"*";"+";",";"-";".";"/";"0";"1";"2";"3";"4";"5";"6";"7";"8";"9";":";";";"<";"=";">";"?";"@";"A";"B";"C";"D";"E";"F";"G";"H";"I";"J";"K";"L";"M";"N";"O";"P";"Q";"R";"S";"T";"U";"V";"W";"X";"Y";"Z";"[";"\";"]";"^";"_";"`";"a";"b";"c";"d";"e";"f";"g";"h";"i";"j";"k";"l";"m";"n";"o";"p";"q";"r";"s";"t";"u";"v";"w";"x";"y";"z";"{";"|";"}";"~",""","""};

  :local symbolsUTF [:toarray "2013,000A,0020,0021,0022,0023,0024,0025,0026,0027,0028,0029,002A,002B,002C,002D,002E,002F,0030,0031,0032,0033,0034,0035,0036,0037,0038,0039,003A,003B,003C,003D,003E,003F,0040,0041,0042,0043,0044,0045,0046,0047,0048,0049,004A,004B,004C,004D,004E,004F,0050,0051,0052,0053,0054,0055,0056,0057,0058,0059,005A,005B,005C,005D,005E,005F,0060,0061,0062,0063,0064,0065,0066,0067,0068,0069,006A,006B,006C,006D,006E,006F,0070,0071,0072,0073,0074,0075,0076,0077,0078,0079,007A,007B,007C,007D,007E,00AB,00BB"];

  :local symbolsRus [:toarray "A,B,V,G,D,E,Yo,Zh,Z,I,Y,K,L,M,N,O,P,R,S,T,U,F,Kh,C,Ch,Sh,Sch,',I,',E,Yu,Ya,a,b,v,g,d,e,yo,zh,z,i,y,k,l,m,n,o,p,r,s,t,u,f,kh,c,ch,sh,sch,',i,',e,yu,ya,_,!,_,_,_,%,&,',(,),*,+,_,-,.,/,0,1,2,3,4,5,6,7,8,9"];

  :local symbolsRusUTF [:toarray "0410,0411,0412,0413,0414,0415,0401,0416,0417,0418,0419,041A,041B,041C,041D,041E,041F,0420,0421,0422,0423,0424,0425,0426,0427,0428,0429,042A,042B,042C,042D,042E,042F,0430,0431,0432,0433,0434,0435,0451,0436,0437,0438,0439,043A,043B,043C,043D,043E,043F,0440,0441,0442,0443,0444,0445,0446,0447,0448,0449,044A,044B,044C,044D,044E,044F"];


  :local hexstr "0123456789ABCDEF";
  :local ascii " !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~";

  :while ($inboxCursor < $inboxCount) do={
    :set inboxCursor ($inboxCursor+1);
    
    :local sms [/interface lte at-chat lte1 input="AT+CMGR=$inboxCursor" as-value wait=yes];
    :set sms ($sms->"output");
    #:put ("inbox $inboxCursor:'".$sms."'n");
    
    :if (( [:typeof [:find $sms "+CMGR"]] != "nil" ) and ([:typeof [:find $sms "n"]] != "nil")) do={
       :set sms [:pick $sms ([:find $sms "+CMGR"]+1) ([:len $sms]+1)];
       :local lineStart ([:find $sms "n"]+1);
       :local lineEnd [:find $sms "nOK" $lineStart] ;
       :if ([:typeof $lineEnd] = "nil") do={
         :set lineEnd ([:len $sms]+1);
        }
       :set sms [:pick $sms $lineStart $lineEnd];

       #Removes unesessary rn at the end of lines
       :if ([:pick $sms ([:len $sms]-1)] = "n") do={
         :set sms [:pick $sms 0 ([:len $sms]-1)];
        }
       :if ([:pick $sms ([:len $sms]-1)] = "r") do={
         :set sms [:pick $sms 0 ([:len $sms]-1)];
        }
       :if ([:pick $sms ([:len $sms]-1)] = "n") do={
         :set sms [:pick $sms 0 ([:len $sms]-1)];
        }
       :if ([:pick $sms ([:len $sms]-1)] = "r") do={
         :set sms [:pick $sms 0 ([:len $sms]-1)];
        }
       #:put ("sms-raw $inboxCursor:'".$sms."'n");

       :local i;
       :if ([:len $sms]>8) do={
         :local pduEnd 0;
         :local smsLen [:len $sms];
         :local pduPartNum 1;
         :local curPos 0;
         :local smsTS;
         :local smsFrom;
         :local smsNum "0000";
         :local dcs "00";
         :while (($pduPartNum < 8) and ($curPos < $smsLen)) do={
           :local pduPartLen;
           :if ($pduPartNum = 1) do={ #SCA - Service Center Address
             :set pduPartLen 14;
             :if (([:pick $sms $curPos ($curPos+2)])!="91") do={
                :put "first two bytes is not 91, skipping...";
                :set pduPartLen ($pduPartLen+2);
              }
           }
           :if ($pduPartNum = 2) do={
             :set pduPartLen 2;
           }
           :if ($pduPartNum = 3) do={
             :local tmpHex1 [:pick $sms $curPos ($curPos+1)]
             :local tmpHex2 [:pick $sms ($curPos+1) ($curPos+2)]
             :local fromLen;
             :set pduPartLen 0;
             :if ([:typeof [:find $hexstr $tmpHex1]] = "num") do={
               :set fromLen ([:find $hexstr $tmpHex1] * 16);
             }
             :if ([:typeof [:find $hexstr $tmpHex2]] = "num") do={
               :set fromLen ([:find $hexstr $tmpHex2]+$fromLen);
             }
              if ( [:pick [:tostr (($fromLen*10)/2)] ([:len [:tostr (($fromLen*10)/2)]]-1) [:len [:tostr (($fromLen*10)/2)]]] = "5") do={
                :set pduPartLen ($fromLen+1);
              } else={
                :set pduPartLen $fromLen;
              }

             :set pduPartLen ($pduPartLen+4);
             if (([:pick $sms ($curPos+2) ($curPos+4)]="91") or ([:pick $sms ($curPos+2) ($curPos+4)]="81")) do={
               :set smsFrom "+";
               :for i from=0 to=($fromLen-1) do={
                  if ( [:pick [:tostr (($i*10)/2)] ([:len [:tostr (($i*10)/2)]]-1) [:len [:tostr (($i*10)/2)]]] = "5") do={
                   :set smsFrom ($smsFrom.[:pick $sms ($curPos+4+$i-1)]);
                  } else {
                   :set smsFrom ($smsFrom.[:pick $sms ($curPos+4+$i+1)]);
                  }
               }
             } else={
              :set smsFrom [:pick $sms ($curPos+2) ($curPos+$pduPartLen)];
              :if ([:pick $smsFrom 0 2] = "D0") do={
                :set smsFrom [:pick $smsFrom 2 [:len $smsFrom]];
                :local curbit 0;
                :local nextpart 0;
                :local smsDecoded "";
                :for i from=0 to=([:len $smsFrom]-1) step=2 do={
                  :local tmp [:pick $smsFrom $i];
                  :local charcode ([:find "0123456789ABCDEF" $tmp]*16);
                  :set tmp [:pick $smsFrom ($i+1)];
                  :set charcode ($charcode+[:find "0123456789ABCDEF" $tmp]);
                  :if ($curbit<7) do={
                    :set tmp ($charcode & (127>>$curbit));
                    :set tmp ($tmp<<$curbit);
                    :set tmp ($tmp + $nextpart); 
                    :set nextpart ($charcode>>(7-$curbit));
                    :set curbit ($curbit+1);
                   }
                  :set smsDecoded ($smsDecoded.[:pick $ascii ($tmp-32)]);
                  :if ($curbit=7) do={
                    :set tmp $nextpart;
                    :set curbit 0;
                    :set nextpart 0;
                    :set smsDecoded ($smsDecoded.[:pick $ascii ($tmp-32)]);
                  }
                 }
               :set smsFrom $smsDecoded;
               }
             }
             #:put ("FROM: ".$smsFrom);
           }
           :if ($pduPartNum = 4) do={ #PID - Protocol Identifier

              :set pduPartLen 2;
           }
           :if ($pduPartNum = 5) do={ #DCS -  Data Coding Scheme
             :set pduPartLen 2;
             :set dcs [:pick $sms $curPos ($curPos+2)];
           }
           :if ($pduPartNum = 6) do={ #SCTS - Service Centre Time Stamp
             :set pduPartLen 14;
             :set smsTS "20";
             :for i from=0 to=11 do={
                if ( [:pick [:tostr (($i*10)/2)] ([:len [:tostr (($i*10)/2)]]-1) [:len [:tostr (($i*10)/2)]]] = "5") do={
                 :set smsTS ($smsTS.[:pick $sms ($curPos+$i-1)]);
                } else {
                 :set smsTS ($smsTS.[:pick $sms ($curPos+$i+1)]);
                }
             }
           }
           :if ($pduPartNum = 7) do={ #UDL - User Data Length
              :set pduPartLen 2;
           }
           :if ($pduPartLen = 0) do={
             #:put ("could not detect Pdu len for part:".$pduPartNum);
             :set pduPartLen 2;
           }
           #:put ("PDU PART ".$pduPartNum.": ".[:pick $sms $curPos ($curPos+$pduPartLen)]);
           :set curPos ($curPos+$pduPartLen);
           :set pduPartNum ($pduPartNum+1);
           :set pduEnd $curPos;
         }
         #:log info ("PDU END: ".$pduEnd);
         :if ($pduEnd = 0) do={
           :log error ("Unable to find end of PDU in the next message: ".[:pick $sms 0 72]);
           :set pduEnd 58;
         }

         #:put ("PDU:".[:pick $sms 0 $pduEnd]);
         :set sms [:pick $sms $pduEnd [:len $sms]];

         :local udh [:pick $sms 0 2];
         :if ($udh = "05") do={
           #:put ("UDH: ".[:pick $sms 0 12]);
           :set smsNum ([:pick $sms 6 8].[:pick $sms 10 12]); 
           :set sms [:pick $sms 12 [:len $sms]];
         }
         :if ($dcs = "08") do={
           :local decodedSMS "";
           :for i from=0 to=([:len $sms]-1) step=4 do={
             :local char [:pick $sms $i ($i+4)];
             :local ind [:find $symbolsRusUTF $char];
             :if ([:typeof $ind]="num") do={
               :set decodedSMS ($decodedSMS.[:pick $symbolsRus $ind]);
             } else={
               :set ind [:find $symbolsUTF $char];
               :if ([:typeof $ind]="num") do={
                 :set decodedSMS ($decodedSMS.[:pick $symbols $ind]);
               } else={
                 :if ($char!="r") do={
                   :set decodedSMS ($decodedSMS."[".$char."]");
                 }
               }
             }
           }
           :set sms $decodedSMS;
         }
         :if ($dcs = "00") do={
            #:put ("UCS2: ".$sms);
            :local curbit 0;
            :local nextpart 0;
            :local smsDecoded "";
            :for i from=0 to=([:len $sms]-1) step=2 do={
              :local tmp [:pick $sms $i];
              :local charcode ([:find "0123456789ABCDEF" $tmp]*16);
              :set tmp [:pick $sms ($i+1)];
              :set charcode ($charcode+[:find "0123456789ABCDEF" $tmp]);
              :if ($curbit<7) do={
                :set tmp ($charcode & (127>>$curbit)); 
                :set tmp ($tmp<<$curbit);
                :set tmp ($tmp + $nextpart); 
                :set nextpart ($charcode>>(7-$curbit));
                :set curbit ($curbit+1);
              }
              :set smsDecoded ($smsDecoded.[:pick $ascii ($tmp-32)]);
              :if ($curbit=7) do={
                :set tmp $nextpart;
                :set curbit 0;
                :set nextpart 0;
                :set smsDecoded ($smsDecoded.[:pick $ascii ($tmp-32)]);
              }
            }
            :set sms $smsDecoded;
         }
         #:log info ("SET ".($smsTS.$smsNum)." ".$sms);
         :set ($smsArray->($smsTS.$smsFrom.$smsNum)) $sms;
        }
      }
   }

  :if ($autodelete=1) do={
    :set inboxCursor 0;
    :do {
      :set inboxCursor ($inboxCursor+1);
      /interface lte at-chat lte1 input="AT+CMGD=$inboxCursor";
     } while ($inboxCursor < $inboxCount);
   };

 }; #if inboxCount>0


:local buffer ({});
:foreach k,v in=$smsArray do={
  :local smsId [:pick $k 0 ([:len $k]-4)];
  :local smsFrom [:pick $k 0 ([:len $k]-4)];
  :set ($buffer->$smsId) ($buffer->$smsId . $v);
  :set ($smsArray->$k);
}
:foreach k,v in=$buffer do={
  :local smsFrom [:pick $k 14 [:len $k]];
  :local sysName [/system identity get name];
  :local datePrefix ("[".[:pick $k 6 8].".".[:pick $k 4 6].".".[:pick $k 0 4]." ".[:pick $k 8 10].":".[:pick $k 10 12].":".[:pick $k 12 14]."]");
  :log warning ($datePrefix." SMS from ".$smsFrom.": ".$v);
  :put ($sysName." ". $datePrefix . " SMS from " . $smsFrom . ": ". $v . "n");
  :local smsContent  "SMS $sysName $datePrefix $smsFrom >> $v";
  /tool fetch url="https://api.telegram.org/botXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/sendmessage?chat_id=XXXXXXXXX&text=$smsContent";
  :set ($buffer->$k);
}

3) В самом крипте, в самом низу подставляем свои chat_id и bot_token (вместо ХХХХХ)
——————————————————————————-

Скрипт переводит весь текст с Кирилицы в Латиницу (Привет->Privet)

В моём случае, по не понятным причинам, команда AT+CMGD=1,4 не удаляла одну СМС (рекламное сообщение) и данный скрипт постоянно слал одну и туже СМС

Подал вот такие команды (разово):

Кликните здесь для просмотра всего текста

Команда: at-chat lte1 input=»AT+CPMS=»SM»,»SM»,»SM»»
Результат: output: +CPMS: 1,5,1,5,0,0

Команда: at-chat lte1 input=»AT+CMGD=1,4″
Результат: output: +MMSG: 0, 0
+MMSG: 0, 0

Команда: at-chat lte1 input=»AT+CPMS=»SM»,»SM»,»SM»»
Результат: output: +CPMS: 0,5,0,5,0,0
OK

Вот теперь СМС очищены.

Отправленное СМС на телефон, обработалось скриптом (по расписанию, например, раз в сутки) и пришло в телегу.



1



Понравилась статья? Поделить с друзьями:
  • Mikrotik ipsec error phase1 negotiation failed due to time up mikrotik
  • Mikrotik ipsec error failed to pre process ph2 packet mikrotik
  • Mikrotik error sending e mail
  • Mikrotik error router refused connection
  • Mikrotik error router does not support secure connection please enable legacy mode