Wrong led modem signal value set (bug?)

I just found a couple of issues while configuring a RB912UAG-5HPnD device leds to show signal about a Sierra MC8875 mPCI.

  1. Running /system leds add leds=led1 modem-signal-treshold=-98 type=modem-signal sets the value to -70 regardless of the value I put.
    So I tried to workaround this changing the value after issuing the add command but…
  2. /system leds set 1 modem-signal-treshold=-98 retun an error: no such item (4)

Finally I solved running /system leds print in between the two commands.

Not sure if I’m doing something wrong or if it’s a bug. Any suggestion?
Thanks.

Terminal session follows…

[admin@gate3g-00] /system leds> export
# aug/05/2014 09:24:30 by RouterOS 6.15
# software id = 2EVD-S96H
#
/system leds
set 0 disabled=yes interface=wlan1 leds=led5
[admin@gate3g-00] /system leds> add leds=led1 modem-signal-treshold=-98 type=modem-signal
echo: critical This trigger type uses information from /interface ppp-out first item and it must not have a busy info-channel otherwise it will silently fail!
[admin@gate3g-00] /system leds> export
# aug/05/2014 09:24:57 by RouterOS 6.15
# software id = 2EVD-S96H
#
/system leds
set 0 disabled=yes interface=wlan1 leds=led5
add leds=led1 modem-signal-treshold=-70 type=modem-signal

[admin@gate3g-00] /system leds> set 1 modem-signal-treshold=-98
no such item (4)
[admin@gate3g-00] /system leds> print
Flags: X - disabled, * - default
 #    TYPE                     INTERFACE                                            LEDS
 0 X* wireless-signal-strength wlan1                                                led5
 1    modem-signal                                                                  led1
[admin@gate3g-00] /system leds> set 1 modem-signal-treshold=-98
[admin@gate3g-00] /system leds> export
# aug/05/2014 09:25:29 by RouterOS 6.15
# software id = 2EVD-S96H
#
/system leds
set 0 disabled=yes interface=wlan1 leds=led5
add leds=led1 modem-signal-treshold=-98 type=modem-signal
[admin@gate3g-00] /system leds>

Here the final code I’m using now as part of a configuration script:

/system leds
set 0 disabled=yes interface=wlan1 leds=led5
# bug??
# leds will be added but will be set unconditionally to -70!
add leds=led1 modem-signal-treshold=-98 type=modem-signal
add leds=led2 modem-signal-treshold=-92 type=modem-signal
add leds=led3 modem-signal-treshold=-86 type=modem-signal
add leds=led4 modem-signal-treshold=-80 type=modem-signal
add leds=led5 modem-signal-treshold=-74 type=modem-signal
# workaround begin...
# ...I do not know why this works, seem not a timing issue,
# calling "print" updates environment??
print
# ... now change led settings
set 1 modem-signal-treshold=-98
set 2 modem-signal-treshold=-92
set 3 modem-signal-treshold=-86
set 4 modem-signal-treshold=-80
set 5 modem-signal-treshold=-74
# workaround end.

Regards, Giovanni.

Paste this:

/system leds
remove [find];
add leds=led1,led2,led3,led4,led5 modem-signal-treshold=-70 type=modem-signal;

Or if you can, you can adapt my script and scheduling it every 1 second.
The part you must change are on red, because actually i not have any device for test modem-signal.

/led led1=no led2=no led3=no led4=no led5=no;

:if (> [:len [/interface wireless registration-table find]] > 0> ) do={

:global signalStrength value=> [/interface wireless registration-table get [find where interface=wlan1] value-name=signal-strength]> ;
:global absoluteSignal value=[:tonum [:pick $signalStrength ([:find $signalStrength “-” -1] + 1) [:find $signalStrength “dBm” -1]]];

/log info message=("Modem signal strenght is ".$signalStrength);

:if ($absoluteSignal < 75) do={ /led led1=yes led2=yes led3=yes led4=yes led5=yes; } else={
:if ($absoluteSignal < 80) do={ /led led1=yes led2=yes led3=yes led4=yes; } else={
:if ($absoluteSignal < 85) do={ /led led1=yes led2=yes led3=yes; } else={
:if ($absoluteSignal < 90) do={ /led led1=yes led2=yes; } else={
:if ($absoluteSignal < 95) do={ /led led1=yes; } }; }; }; };

} else={
/log error message=(“Modem is unregistered”);
};

Thanks,
this something I looked before whithout success, but the settings in my original post works (both via terminal or via winbox) so seems that now a script may be not needed anymore to show 3g signal strenght.

The first command trow an error, that is the reason I disabled the default leds on wlan1 instead of removing it.

[admin@gate3g-00] /system leds> remove [find];
failure: can not remove preset leds

So I tried removing leds manually.
About the second command, ok You set up modem-signal-treshold=-70 for leds 1-5 but which values will result? Assuming the following info no leds are on.

[admin@gate3g-00] /system leds> /interface ppp-client info ppp-out1
       modem-status: call in progress
         pin-status: no password required
      functionality: full
       manufacturer: Sierra Wireless, Inc.
              model: MC8775
           revision: H2_0_8_19MCAP G:/WS/FW/H2_0_8_19MCAP/MSM6280/SRC
                     2008/08/29 18:28:52
      serial-number: 352905014606192
   current-operator: vodafone IT (cellid unknown)
  access-technology: 3G
     signal-strengh: -95 dBm
   frame-error-rate: n/a

Settings the leds trigger values manually works, I got 1 to 2 leds on moving around the antenna.