Community discussions

MikroTik App
 
optio
Long time Member
Long time Member
Topic Author
Posts: 655
Joined: Mon Dec 26, 2022 2:57 pm

SMS Tool - unable to delete inbox message

Tue Mar 07, 2023 6:37 pm

Hi all,

After upgrading from ROS 7.7 to 7.8 I'm unable to delete received SMS message in inbox.
tool/sms/inbox> print
Columns: PHONE, TIMESTAMP
#  PHONE    TIMESTAMP                  
0  XXX  Mar/07/2023 13:40:24 GMT +1

/tool/sms/inbox> remove 0
failure: Interface not running!

No additional records in log (with debug topic enabled) related to this issue. I guess this is related to SMS off status, there is no indication why is switched into that status:
/tool/sms> print
           status: off
  receive-enabled: yes
             port: lte1
          channel: 0
           secret: xxxxxx
   allowed-number: ###########,###########,###########,###########
       auto-erase: no
          sim-pin: 
        last-ussd: 
Receiving SMS messages is still working in off status, in documentation https://help.mikrotik.com/docs/display/ROS/SMS there is no description what status actually means.

Anyone experiencing similar issues?

Mikrotik device: Chateau LTE12 (D53G-5HacD2HnD)
 
User avatar
radiohead
just joined
Posts: 4
Joined: Sun Mar 19, 2023 12:41 am

Re: SMS Tool - unable to delete inbox message

Sun Mar 19, 2023 12:43 am

Hi all,

The issue is the same on my side as well. "After upgrading from ROS 7.7 to 7.8 I'm unable to delete received SMS message in inbox."
Device: MikroTik LHG LTE6 kit
failure: Interface not running!
/radiohead
(HU)
Last edited by radiohead on Sun Mar 19, 2023 12:45 am, edited 1 time in total.
 
optio
Long time Member
Long time Member
Topic Author
Posts: 655
Joined: Mon Dec 26, 2022 2:57 pm

Re: SMS Tool - unable to delete inbox message

Sun Mar 19, 2023 2:22 pm

Certnaly there is a bug in SMS tool on ROS 7.8. Probably SMS is not widely used on MT devices or at least not on ROS 7.8, so there are no reports from ohers regarding this.
In my case I need to manually remove message after is sent to email so I can't have auto-erase enabled. After upgrading to 7.8 I had to disable scheduler which event triggers script that process SMS inbox because it is not functioning as expected and feature can't be workarounded.
 
optio
Long time Member
Long time Member
Topic Author
Posts: 655
Joined: Mon Dec 26, 2022 2:57 pm

Re: SMS Tool - unable to delete inbox message

Sun Mar 19, 2023 2:37 pm

LOL. I found some time to play with this, it seems I that is possible to enable back deleting messages and now SMS tool status is in running :)
/tool/sms> print
           status: running
  receive-enabled: yes
             port: lte1
          channel: 0
           secret: xxxxxx
   allowed-number: ###########,###########,###########,###########
       auto-erase: no
          sim-pin: 
        last-ussd: 
Just toggle yes/no auto-erase:
/tool/sms/set auto-erase=yes
/tool/sms/set auto-erase=no
 
optio
Long time Member
Long time Member
Topic Author
Posts: 655
Joined: Mon Dec 26, 2022 2:57 pm

Re: SMS Tool - unable to delete inbox message  [SOLVED]

Sun Mar 19, 2023 3:02 pm

Addition:
After reboot SMS is again in off status and it is not possible to delete messages again :(
Well, at least it can be workarounded with startup scheduler which puts status in running:
add name=enable_sms_erase on-event="/tool/sms;set auto-erase=yes;set auto-erase=no" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-time=startup
Still this needs to be fixed on ROS, workarounds for features should not be practice.
 
User avatar
radiohead
just joined
Posts: 4
Joined: Sun Mar 19, 2023 12:41 am

Re: SMS Tool - unable to delete inbox message

Mon Mar 20, 2023 3:49 pm

Addition:
After reboot SMS is again in off status and it is not possible to delete messages again :(
Well, at least it can be workarounded with startup scheduler which puts status in running:
add name=enable_sms_erase on-event="/tool/sms;set auto-erase=yes;set auto-erase=no" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-time=startup
Still this needs to be fixed on ROS, workarounds for features should not be practice.
Hi Guys,
Where can we report that it is a bug?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: SMS Tool - unable to delete inbox message

Mon Mar 20, 2023 3:59 pm

Where can we report that it is a bug?
Click on "support" on the following page.
https://mikrotik.com/
 
optio
Long time Member
Long time Member
Topic Author
Posts: 655
Joined: Mon Dec 26, 2022 2:57 pm

Re: SMS Tool - unable to delete inbox message

Mon Mar 20, 2023 5:35 pm

Not first, and probably not last startup workaround... like this one also:
/interface/detect-internet;set detect-interface-list=none;set detect-interface-list=WAN
At least for autostart multiple containers is no longer needed...
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: SMS Tool - unable to delete inbox message

Mon Mar 20, 2023 6:49 pm

this one also:
/interface/detect-internet;set detect-interface-list=none;set detect-interface-list=WAN
Bad idea at all use detect-internet...
Some ISP lock-out your router if receive unsolicited DHCP-client requests...
 
optio
Long time Member
Long time Member
Topic Author
Posts: 655
Joined: Mon Dec 26, 2022 2:57 pm

Re: SMS Tool - unable to delete inbox message

Mon Mar 20, 2023 7:14 pm

Did not have problems with ISP yet. It's enabled just that MT smartphone app can have correct internet connectivity status.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: SMS Tool - unable to delete inbox message

Mon Mar 20, 2023 7:19 pm

Did not have problems with ISP yet. It's enabled just that MT smartphone app can have correct internet connectivity status.
There are not only "your connection", others also need to know about these problems before they get screwed...
 
optio
Long time Member
Long time Member
Topic Author
Posts: 655
Joined: Mon Dec 26, 2022 2:57 pm

Re: SMS Tool - unable to delete inbox message

Mon Mar 20, 2023 7:33 pm

Did not have problems with ISP yet. It's enabled just that MT smartphone app can have correct internet connectivity status.
There are not only "your connection", others also need to know about these problems before they get screwed...
OK, what's alternative to have in MT smartphone app correct internet connectivity status?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: SMS Tool - unable to delete inbox message

Mon Mar 20, 2023 8:19 pm

It doesn't matter if the app works or not, some users never use the app and have constant problems with "this feature",
they better know whether to choose the app to work or their connection to work...
 
optio
Long time Member
Long time Member
Topic Author
Posts: 655
Joined: Mon Dec 26, 2022 2:57 pm

Re: SMS Tool - unable to delete inbox message

Mon Mar 20, 2023 8:59 pm

But why internet detect actually uses DHCP to check internet status? It is used to detect WAN status? Can checking that status be disabled so that only LAN and Internet statuses can be obtained?

By documentation https://help.mikrotik.com/docs/display/ ... t+Internet - Internet status is when:
WAN interfaces that can reach cloud.mikrotik.com using UDP protocol port 30000 can obtain this state. Reachability is checked every minute. If a cloud is not reached for 3 minutes, the state falls back to WAN.

...so by this statement UDP connection to cloud.mikrotik.com:30000 is used to obtain Internet status.
Last edited by optio on Mon Mar 20, 2023 9:08 pm, edited 1 time in total.
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 3255
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: SMS Tool - unable to delete inbox message

Mon Mar 20, 2023 9:05 pm

It doesn't matter if the app works or not, some users never use the app and have constant problems with "this feature",
they better know whether to choose the app to work or their connection to work...
It ain't the user's fault - the idea of the app is it's a friendly way to access a router for someone not familar with RouterOS. But @rextended ain't wrong, it's a dangerous feature. And it only looks innocent.

/interface/detect-internet is too aggressive will modify your configuration to add DHCP client on any interface covered by detect-internet list, if it can't ping 8.8.8.8. But "detect" doesn't imply that – docs are right on what it does. This, in some cases, may be totally fine. But adding a dhcp client can have a lot of side-effects. Another one being adding a route with a distance=1, and so your routing can get messed up, depending on what DHCP is doing and/or if your using recursive routing.

Further you have to grant "write" access if you want an end-user to be able to update Wi-Fi password. And since internet-detect is NOT protected by a policy, an end-user can change this in the app.

OK, what's alternative to have in MT smartphone app correct internet connectivity status?
I actually filed a feature request (SUP-108814) a little bit ago, since it annoying catch-22. There should be some option to stop the "add a dhcp client" logic IMO. They did respond:
We will consider adding an option for detect internet, not to create or adjust DHCP client.
If a DHCP client getting added of an interface in the detect-internet list cannot ping 8.8.8.8 isn't a problem for your ISP or cause a break in routing table, it's fine. But yeah that's a bit to unpack to know if "safe".
 
optio
Long time Member
Long time Member
Topic Author
Posts: 655
Joined: Mon Dec 26, 2022 2:57 pm

Re: SMS Tool - unable to delete inbox message

Mon Mar 20, 2023 9:17 pm

I guess alternative is to use https://github.com/IgorKha/Grafana-Mikrotik :) - which I actually did setup while ago on MT container but my device doesn't have enough RAM to run this continuously along with other containers and ROS ram usage :(
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 3255
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: SMS Tool - unable to delete inbox message

Mon Mar 20, 2023 10:04 pm

But why internet detect actually uses DHCP to check internet status? It is used to detect WAN status? Can checking that status be disabled so that only LAN and Internet statuses can be obtained?
BTW It's the subtle clause in docs "an interface can obtain (or has obtained) an address from DHCP (does not apply if DHCP server is also running Detect Internet on the DHCP server interface)." – so the "can obtain" part is tested by adding a /ip/dhcp-client.
 
optio
Long time Member
Long time Member
Topic Author
Posts: 655
Joined: Mon Dec 26, 2022 2:57 pm

Re: SMS Tool - unable to delete inbox message

Mon Mar 20, 2023 10:32 pm

But why internet detect actually uses DHCP to check internet status? It is used to detect WAN status? Can checking that status be disabled so that only LAN and Internet statuses can be obtained?
BTW It's the subtle clause in docs "an interface can obtain (or has obtained) an address from DHCP (does not apply if DHCP server is also running Detect Internet on the DHCP server interface)." – so the "can obtain" part is tested by adding a /ip/dhcp-client.
Thx detailed for explanations, I assumed it is for WAN check, that's why I asked can WAN check be disabled, obviously not.
For router security I'm not concerned, this is on home router and I'm end-user, if there is no potential safety concern from wan, no problem.
Regarding routing, I did not setup any custom routes, all my IP routes are dynamic, per IP address list, subnets with distance 0 and with dynamic routes for Wan lte1 interface with subnets 0.0.0.0/0 with distance 2 and <public_ip>/32 with distance 0.
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 3255
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: SMS Tool - unable to delete inbox message

Mon Mar 20, 2023 10:43 pm

Yeah it adds a nice chart in the app – which is exactly what an end-user wants to see :). Similar with LTE, the app is pretty useful since it has graphs for that too.

So if the dhcp client logic doesn't break things, it's harmless. So it won't add anything if 8.8.8.8 is ping-able from all addresses in WAN list. And even then only if there wasn't already a dhcp-client (or it's LTE).

And "detect-interface-list=WAN" means it does all of the Internet, WAN, LAN, etc detection using the interfaces listed in WAN in /interface/list/members. It does NOT mean only do WAN detection in docs, rather it will do all detection ONLY using the WAN interface list. But that setting should actually pretty safe. It defaults to "all" which tests ALL interfaces, so that includes tunnels, VPN, dynamic interfaces, etc...
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 3255
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: SMS Tool - unable to delete inbox message

Mon Mar 20, 2023 10:58 pm

In the esoteric features, you might also want to look at /system/watchdog. I'd recommend setting the email stuff for supout notification. That way you'd know if it ever crashes.

You can enable ping check there, that will reboot router if x minutes of failure to ping (on top of the CPU hang detection). Similar to netwatch, just no code.
 
optio
Long time Member
Long time Member
Topic Author
Posts: 655
Joined: Mon Dec 26, 2022 2:57 pm

Re: SMS Tool - unable to delete inbox message

Mon Mar 20, 2023 11:04 pm

In the esoteric features, you might also want to look at /system/watchdog. I'd recommend setting the email stuff for supout notification. That way you'd know if it ever crashes.

You can enable ping check there, that will reboot router if x minutes of failure to ping (on top of the CPU hang detection). Similar to netwatch, just no code.
Thx, I already have netwatch scripts on down and up events, down that disables/enables lte (which forces lte reconnect) and up that refreshes dyndns ip, works fine.

Who is online

Users browsing this forum: Amazon [Bot], Bing [Bot], CGGXANNX, mantouboji and 56 guests