Community discussions

MikroTik App

Search found 437 matches

  • 1
  • 2
by Sertik
Tue Mar 26, 2024 1:19 pm
Forum: Scripting
Topic: execute & parse
Replies: 15
Views: 961

Re: execute & parse

Regarding the introduction of something new in functions, the type proposed by Amm0:
/system/scripts/function
developers should be careful. By introducing a new one, you should not violate the old features, as this will lead to the need to rewrite thousands of working scripts...
by Sertik
Tue Mar 26, 2024 12:52 pm
Forum: Scripting
Topic: execute & parse
Replies: 15
Views: 961

Re: execute & parse

As for the difficulties, I agree with Larsa and Amm0... I don't know how from the point of view of implementation, but the scripting language of the OS Router does not allow you to directly write :global $Name or :local $Name, so that $Name itself is a variable, this generates many difficulties, of ...
by Sertik
Tue Mar 26, 2024 12:41 pm
Forum: Scripting
Topic: execute & parse
Replies: 15
Views: 961

Re: execute & parse

# example Magical :parse # declaring a variable with substituting a value from Layer7 for it [[:parse ":global $vname [:to$vtype $[/ip firewall layer7 get [find where name=$vname] regexp]]"]] # Hack with array sorting (by Rextended) :set hackSort ($hackSort, [[:parse "[:toarray {\&quo...
by Sertik
Mon Mar 25, 2024 4:10 pm
Forum: Scripting
Topic: execute & parse
Replies: 15
Views: 961

Re: execute & parse

In this way, you can call functions whose names are not known in advance, that is, they will be determined during the script ! Let me try to explain: imagine that you have a certain process (function) that, in order to solve its tasks, must and can, depending on the initial conditions, use several d...
by Sertik
Mon Mar 25, 2024 4:06 pm
Forum: Scripting
Topic: execute & parse
Replies: 15
Views: 961

Re: execute & parse

Thank you so much, Rex! This is not nonsense, but a very necessary thing for me! That's the line I was waiting for from you and you helped me a lot in this.: :return [[:parse ":global $1 ; :return [\$$1 $2]"]] I found the solution myself, but I was wrong about one thing - I had to screen i...
by Sertik
Mon Mar 25, 2024 12:48 pm
Forum: Scripting
Topic: execute & parse
Replies: 15
Views: 961

Re: execute & parse

Hello Rex. I don't know what can be explained well here. I am writing a global function that should receive data from other global functions, the names of which would be passed to the first one as parameter $1, a $2 to be the parameter passed to the second function. Having received data from other f...
by Sertik
Mon Mar 25, 2024 10:06 am
Forum: Scripting
Topic: execute & parse
Replies: 15
Views: 961

Re: execute & parse

I can't judge other scripting languages, I'm not a programmer...
by Sertik
Mon Mar 25, 2024 9:49 am
Forum: Scripting
Topic: execute & parse
Replies: 15
Views: 961

Re: execute & parse

:put [:return [[:parse ":global $1; return [$1 hello]"]]] expected command name In other words, Question: is how to call a function whose name is set by a parameter of another function? Or is this not possible because at the time of execution of :parse, the function declared in :global ha...
by Sertik
Sun Mar 24, 2024 7:56 pm
Forum: Scripting
Topic: execute & parse
Replies: 15
Views: 961

execute & parse

The topic has been discussed many times, but everything is forgotten when there is little practice... Is it possible to access a variable whose name is not known in advance to the script function by passing it in a parameter? Something like this... :return [[:parse ":global \$1; return [\$1 hel...
by Sertik
Wed Mar 20, 2024 4:32 pm
Forum: RouterBOARD hardware
Topic: RouterBoard USB port not active?
Replies: 48
Views: 32530

Re: RouterBoard USB port not active?

[admin@MikroTik] > /system resource usb print Columns: DEVICE, VENDOR, NAME, SPEED # DEVICE VENDOR NAME SPEED 0 1-0 Linux 5.6.3 ehci_hcd RB400 EHCI 480 1 1-1 American Power Conversion Smart-UPS 750 FW:651.12.I USB FW:4.2 1.5 [admin@MikroTik] > /port print Columns: NAME, CHANNELS, USED-BY, BAUD-RATE...
by Sertik
Tue Feb 27, 2024 1:30 pm
Forum: Scripting
Topic: export scripts from the repository saved under a specific owner
Replies: 8
Views: 704

Re: export scripts from the repository saved under a specific owner

Surely this can be done, but you need to write a whole large script that would select scripts from the repository according to the creator (owner), process each line of them with escaping the necessary symphols and inserting control symphols (and taking into account all the nuances of this process, ...
by Sertik
Tue Feb 27, 2024 8:44 am
Forum: Scripting
Topic: export scripts from the repository saved under a specific owner
Replies: 8
Views: 704

Re: export scripts from the repository saved under a specific owner

Thank you very much, Rex! /system script export where owner=admin This is what I needed! But the problem is that this only works in ROS 7, starting with the version you specified and does not work at all in ROS 6, since there is no "where" for /export yet... /system script export <tab> (i...
by Sertik
Mon Feb 26, 2024 8:55 pm
Forum: Scripting
Topic: export scripts from the repository saved under a specific owner
Replies: 8
Views: 704

Re: export scripts from the repository saved under a specific owner

It’s a pity that the Ikrotik developers didn’t think of making filters in /export... You don’t have a ready-made script or some kind of preparation that could assemble a file from individual scripts in the /export format, so that it would be correctly understood and restored by the /import command ?
by Sertik
Mon Feb 26, 2024 8:42 pm
Forum: Scripting
Topic: export scripts from the repository saved under a specific owner
Replies: 8
Views: 704

Re: export scripts from the repository saved under a specific owner

Dear, Amm ! I do not understand you. I repeat the question: as you know, /system script export file=myscript.rsc will save all the repository scripts in myscript.rsc Scripts stored in the router repository have different properties, including the “owner” property (creator). Is it possible to somehow...
by Sertik
Mon Feb 26, 2024 7:19 pm
Forum: Scripting
Topic: export scripts from the repository saved under a specific owner
Replies: 8
Views: 704

export scripts from the repository saved under a specific owner

I just can’t solve a seemingly simple problem: From all the scripts in the router repository, you need to select only those scripts that are saved under “owner”, for example “Sertik”, exporting them to one .rsc file It is clear that you can cycle through the contents of the scripts under the desired...
by Sertik
Tue Feb 20, 2024 7:48 pm
Forum: Scripting
Topic: $PIANO - interactive "player piano" & studio-quality recorder using :beep
Replies: 6
Views: 936

Re: $PIANO - interactive "player piano" & studio-quality recorder using :beep

In terms of design and implementation, this is very cool! Thank you very much to the author!
And also a very good tutorial for writing scripts!
by Sertik
Wed Feb 14, 2024 1:53 pm
Forum: Scripting
Topic: /port using the used-by property
Replies: 20
Views: 1088

Re: /port using the used-by property

I kind of understand that. You're saying that this construct filters out the same data. After all, router ports cannot have the same names (ROS does not make them the same itself and does not allow the user to set the same names to ports) .... But I think I got it... thanks ! Although the automatic ...
by Sertik
Wed Feb 14, 2024 12:53 pm
Forum: Scripting
Topic: /port using the used-by property
Replies: 20
Views: 1088

Re: /port using the used-by property

Yes, OK. I checked it works correctly, including a shortened design: { /port :foreach item in=[find where name~"usb" used-by="" !inactive] do={:put [get $item name]} } output: usb2 But it also works without where... { /port :foreach item in=[find name~"usb" used-by=&quo...
by Sertik
Wed Feb 14, 2024 11:09 am
Forum: Scripting
Topic: /port using the used-by property
Replies: 20
Views: 1088

Re: /port using the used-by property

{:foreach item in=[/port find where name~"usb" and used-by="" and !inactive ] do={:put [/port get $item name]}} output: <empty> {:foreach item in=[/port find name~"usb" and !inactive ] do={:put [/port get $item name]}} output: usb2 Port usb2 is free ... Is it really im...
by Sertik
Wed Feb 14, 2024 10:58 am
Forum: Scripting
Topic: /port using the used-by property
Replies: 20
Views: 1088

Re: /port using the used-by property

/port
:foreach item in=[find where name~"usb" and used-by="" and !inactive ] do={
    :put [get $item name]
}
This is correct ?
by Sertik
Wed Feb 14, 2024 10:50 am
Forum: Scripting
Topic: /port using the used-by property
Replies: 20
Views: 1088

Re: /port using the used-by property

I came to the realization that I don't understand the expression " where " at all... Not really knowing what it does, I've always tried not to use it in my scripts. The Mikrotik Wiki only says this: where - expressions followed by where parameter can be used to filter out matched entries B...
by Sertik
Tue Feb 13, 2024 5:40 pm
Forum: Scripting
Topic: /port using the used-by property
Replies: 20
Views: 1088

Re: /port using the used-by property

Thank you very much, dear friends of Rex & Amm0! If you'll excuse me, I (who in the scripts is up to both of you like the moon) That's what they call you.
by Sertik
Tue Feb 13, 2024 5:31 pm
Forum: Scripting
Topic: /port using the used-by property
Replies: 20
Views: 1088

Re: /port using the used-by property

As a result, I "turned over" the Amm0 design and it worked like that!
:put [/port find used-by="" !inactive] 
Or just like that:
:put [/port find inactive=no used-by=""] 
The ROS is still the casket with the egg of kashchei the immortal !
by Sertik
Tue Feb 13, 2024 4:59 pm
Forum: Scripting
Topic: /port using the used-by property
Replies: 20
Views: 1088

Re: /port using the used-by property

:put [/port find used-by=[]] <empty> :put [/port find used-by=""] *1 :put [/port find name~"^" used-by=""]] *1 :put [/port find name~"^"]] *1*2 !!! (That is, without selection by used-by, the construction finds two identifiers - that is, I have two ports!) :p...
by Sertik
Tue Feb 13, 2024 4:48 pm
Forum: Scripting
Topic: /port using the used-by property
Replies: 20
Views: 1088

Re: /port using the used-by property

Rex, I always read what you write! I try to read carefully, but I don't always understand because of my poor English and the quality of the auto-translation into Russian (I already talked about this earlier). Please make allowances for my profession too (you know it) and the way patients pull me at ...
by Sertik
Tue Feb 13, 2024 3:44 pm
Forum: Scripting
Topic: /port using the used-by property
Replies: 20
Views: 1088

Re: /port using the used-by property

Of course, I understand that the port can be occupied and freed, for example, by the console... My usb port is currently occupied by the modem, and serial0 is disconnected from the console, but ... :put [/port find name~"" !inactive !used-by] output: <empty> I don 't understand why... Mayb...
by Sertik
Tue Feb 13, 2024 3:34 pm
Forum: Scripting
Topic: /port using the used-by property
Replies: 20
Views: 1088

Re: /port using the used-by property

You need to go through all the ports available on the router and select all of them that have the usb or serial type and only those that are active (!inactive) and only those that are not used by any devices (!used-by)...

I do this: (moment, please ....)
by Sertik
Tue Feb 13, 2024 3:28 pm
Forum: Scripting
Topic: /port using the used-by property
Replies: 20
Views: 1088

Re: /port using the used-by property

Rex, I'm so glad to talk to you!

It just happened that way:
:put [/port find used-by~""]]   
Now I will write what the actual matter is ...
by Sertik
Tue Feb 13, 2024 3:05 pm
Forum: Scripting
Topic: /port using the used-by property
Replies: 20
Views: 1088

Re: /port using the used-by property

I will formulate the task once again (maybe I did not explain it clearly): How do I, when searching in :foreach, or just conditionally select only those ports from / port that are not used by anyone (free)? Or can't this be done for the used-by property? There must be a solution... After all, router...
by Sertik
Tue Feb 13, 2024 2:57 pm
Forum: Scripting
Topic: /port using the used-by property
Replies: 20
Views: 1088

Re: /port using the used-by property

Although you can get the contents of the "used-by" property to the Terminal, for example: /port print as-value output: .id=*1;baud-rate=auto;channels=1;device=;name=serial0;used-by=;.id=*2;baud-rate=9600;channels=7;device=1 -1;name=usb2;used-by=sms tool, PPP <ppp-out1> [/foreach count in=[...
by Sertik
Tue Feb 13, 2024 10:55 am
Forum: Scripting
Topic: ✂ Rextended Fragments of Snippets
Replies: 96
Views: 69492

Re: ✂ Rextended Fragments of Snippets

I haven’t visited the forum for a long time... I recently read this off-topic... This is what I would like to say: Dear Rex! We don’t know the true reasons for your decision to stop writing scripts... If it’s really some kind of resentment, the offended pride of a talented person or something like t...
by Sertik
Tue Feb 13, 2024 9:13 am
Forum: Scripting
Topic: /port using the used-by property
Replies: 20
Views: 1088

/port using the used-by property

Greetings to all ! It doesn’t seem like a difficult task at all, but I can’t cope: :put [/port find name=usb2] *1 :put [/port find name=usb2 !inactive] *1 :put [/port find name=usb2 !inactive !used-by] ... nothing :put [/port find name=usb2 !inactive used-by] ... nothing too ! :put [/port find !used...
by Sertik
Thu Jan 04, 2024 7:51 pm
Forum: RouterBOARD hardware
Topic: USB port not detected in RBM33G
Replies: 0
Views: 1813

USB port not detected in RBM33G

Greetings to all forum members and Happy New Year to everyone! Perhaps the question has been discussed, but it is not clear to me and I cannot find ready-made answers. I have several RBM33G boards. On some of them, the USB port is detected normally. On some, it simply isn't there. Neither the ROS up...
by Sertik
Mon Dec 25, 2023 11:59 am
Forum: Scripting
Topic: serial-MP3-player Catalex YX6300 for RBM33G or other RB with serial port
Replies: 1
Views: 620

serial-MP3-player Catalex YX6300 for RBM33G or other RB with serial port

It turns out that Mikrotik can be voiced even without a tweeter or just a programmable beeper (which, by the way, the RBM33G does not have). I used a Chinese clone of the mp3/wav player module Catalex YX5300/YX6300. It can be connected to the serial port of any Mikrotik board. I used serial1 RBM33G....
by Sertik
Mon Dec 25, 2023 5:15 am
Forum: Containers
Topic: "serial2http" — container to bridge serial to the RouterOS CLI
Replies: 15
Views: 5325

Re: "serial2http" — container to bridge serial to the RouterOS CLI

OK, thank you very much for everything. Solved the problem.
by Sertik
Sun Dec 24, 2023 3:59 pm
Forum: Containers
Topic: "serial2http" — container to bridge serial to the RouterOS CLI
Replies: 15
Views: 5325

Re: "serial2http" — container to bridge serial to the RouterOS CLI

In addition, it turned out that not all commands for my device can be shortened and there are important commands that require the transmission of sequences containing zero bytes, without which the commands are not perceived. So the main problem is passing zeros (zero bytes)
by Sertik
Sun Dec 24, 2023 3:37 pm
Forum: Containers
Topic: "serial2http" — container to bridge serial to the RouterOS CLI
Replies: 15
Views: 5325

Re: "serial2http" — container to bridge serial to the RouterOS CLI

I couldn't get the command to work: /interface ppp-client at-chat [find] input="\7E\FF\06\03\00\00\01\EF" If ppp-client is created and active, this command always produces an error: "failure: can't reuse channel while ppp-client running!" But, I finally managed to send commands t...
by Sertik
Fri Dec 22, 2023 12:16 pm
Forum: Containers
Topic: "serial2http" — container to bridge serial to the RouterOS CLI
Replies: 15
Views: 5325

Re: "serial2http" — container to bridge serial to the RouterOS CLI

If you pass hexadecimal data as a string:
/interface ppp-client add name="scripttemp" dial-on-demand=no port=serial0 modem-init="\7E\FF\06\03\00\00\01\EF" null-modem=yes disabled=no
Are you sure that the data will be transmitted correctly?
by Sertik
Fri Dec 22, 2023 8:33 am
Forum: Containers
Topic: "serial2http" — container to bridge serial to the RouterOS CLI
Replies: 15
Views: 5325

Re: "serial2http" — container to bridge serial to the RouterOS CLI

I checked it out. It doesn't work. My device works fine via the usb-serial adapter CH340, but does not work via ppp-out1. I think the fact is that the data is not being transmitted correctly. I will try to connect a Mikrotik cord with a serial-usb adapter to the serial port and look at the terminal ...
by Sertik
Thu Dec 21, 2023 9:12 am
Forum: Containers
Topic: "serial2http" — container to bridge serial to the RouterOS CLI
Replies: 15
Views: 5325

Re: "serial2http" — container to bridge serial to the RouterOS CLI

Thank you very much! I will definitely check it out.
by Sertik
Wed Dec 20, 2023 9:46 am
Forum: Containers
Topic: "serial2http" — container to bridge serial to the RouterOS CLI
Replies: 15
Views: 5325

Re: "serial2http" — container to bridge serial to the RouterOS CLI

Thank you very much, Amm0 for your answer. If I don't need to receive responses from the device, but only send it commands in the form of hexadecimal code (for example, I need to send 7EFF0603000001EF) via RS232, can I do this via a ppp-out interface like this: /interface ppp-client add name="s...
by Sertik
Tue Dec 19, 2023 9:31 am
Forum: Containers
Topic: "serial2http" — container to bridge serial to the RouterOS CLI
Replies: 15
Views: 5325

Re: "serial2http" — container to bridge serial to the RouterOS CLI

Thanks a lot to the author for the work done and the instructions for use. I translated the instructions into Russian for my comrades https://forummikrotik.ru/viewtopic.php?f=14&t=14835 . We haven't tried it yet, but we will definitely try it. I wanted to connect the so-called Serial MP3 Player ...
by Sertik
Wed Dec 13, 2023 2:05 pm
Forum: RouterOS beta
Topic: Fibocom L850-GL
Replies: 20
Views: 9416

Re: Fibocom L850-GL

There is no 5G in Russia. :D :D :D So far only fairy tales or tests.
by Sertik
Thu Dec 07, 2023 12:29 pm
Forum: RouterOS beta
Topic: Fibocom L850-GL
Replies: 20
Views: 9416

Re: Fibocom L850-GL

What's the news since then? How supported is fibocom l850 in Mikrotik today?

As far as I remember, /lte at-chat support is included in ROS for this modem, starting with ROS 7.11.2rc and the command above should work.

/interface lte at-chat lte1 input=ATG+USBMODE=7
by Sertik
Wed Dec 06, 2023 9:54 am
Forum: Scripting
Topic: Passing a parameter from a script to another script
Replies: 8
Views: 2384

Re: Passing a parameter from a script to another script

Thank you, friends. I guessed it myself. It's just that string parameters need additional escaping like "\" hello мамочка!\"" and then they are transmitted without problems !
by Sertik
Tue Dec 05, 2023 9:21 pm
Forum: Scripting
Topic: Passing a parameter from a script to another script
Replies: 8
Views: 2384

Re: Passing a parameter from a script to another script

So far I have come to this final working design: [[:parse "[:parse [/system script get $scrName source]] Par1=[:to$[:typeof $Var1] $Var1] [:to$[:typeof $Var2] $Var2] [:to$[:typeof $Var3] $Var3] [:to$[:typeof $Var4] $Var4] [:to$[:typeof $VarN] $VarN]"]] Now I can pass parameters without los...
by Sertik
Tue Dec 05, 2023 9:17 pm
Forum: Scripting
Topic: Passing a parameter from a script to another script
Replies: 8
Views: 2384

Re: Passing a parameter from a script to another script

I didn't expect this from you. It always seemed to me that you love mental exercises. Regarding my question, do you have any ideas or solutions?
by Sertik
Tue Dec 05, 2023 7:47 am
Forum: Scripting
Topic: Send a unicode symbol to Telegram from an array list
Replies: 4
Views: 2382

Re: Send a unicode symbol to Telegram from an array list

:return (($Symbols->$1) . "\EF\B8\8F"); If desired, you can return as many characters as you want from your array: :return (($Symbols->$1) . ($Symbols->$2). ($Symbols->$3). "\EF\B8\8F"); If $2 and $3 are not specified, they simply will not be refunded $tgFunc ("$[$SymbolByU...
by Sertik
Mon Dec 04, 2023 9:16 pm
Forum: Scripting
Topic: Passing a parameter from a script to another script
Replies: 8
Views: 2384

Re: Passing a parameter from a script to another script

It turns out that you can pass parameters from a script to a script while preserving their type. This is done like this: # Script transfer :local scrName "scriptReceiver" :local Var1 "Par1=text" :local Var2 "Par2=12" :local Var3 14 :local Var4 192.168.0.1 :local Var5 [/...
by Sertik
Mon Dec 04, 2023 1:58 pm
Forum: Scripting
Topic: Passing a parameter from a script to another script
Replies: 8
Views: 2384

Re: Passing a parameter from a script to another script

Да, можно передавать и именованные и позиционные, но всё равно все превращаются в тип "str" Yes, you can pass both named and positional ones, but still everything turns into the "str" type: scrTransfer: :local scrName "scriptReceiver" :local Var1 "12" :local V...
by Sertik
Mon Dec 04, 2023 1:41 pm
Forum: Scripting
Topic: Passing a parameter from a script to another script
Replies: 8
Views: 2384

Re: Passing a parameter from a script to another script

Here, Russian friends gave me the idea that I was bothering a lot and that I could pass positional parameters like $0, $1, etc. from the script to the script ... with the same construction. We should try it too.

and catching them in script Receiver is just like :local Par1 $0
by Sertik
Mon Dec 04, 2023 12:43 pm
Forum: Scripting
Topic: Passing a parameter from a script to another script
Replies: 8
Views: 2384

Re: Passing a parameter from a script to another script

Rex and Amm0 where are you friends?
by Sertik
Mon Dec 04, 2023 11:10 am
Forum: Scripting
Topic: Passing a parameter from a script to another script
Replies: 8
Views: 2384

Passing a parameter from a script to another script

Hello everybody! This is not GPT! My question is: I want to pass a parameter from one script to another. What's easier, you say, do it through global variables. But I want to do without variables (the interest is purely academic) I managed to do it using this method: script Transfer: :local scrName ...
by Sertik
Sat Dec 02, 2023 3:06 pm
Forum: Scripting
Topic: AI GPT and Mikrotik`s scripts
Replies: 0
Views: 2309

AI GPT and Mikrotik`s scripts

That article that I promised to present:

https://habr.com/ru/articles/778020
by Sertik
Tue Nov 28, 2023 1:46 pm
Forum: Scripting
Topic: GPIO function for RBM33G
Replies: 1
Views: 1615

Re: GPIO function for RBM33G

My new article about RBM33G https://habr.com/ru/articles/776908/ 1. Control of the RBM33G Mikrotik via the second serial port 2. Connecting the remote control to the Microtik 3. Connecting the beeper module 4. Talking microtik - connecting the voice recording/playback module 5. Serial MP3 Player con...
by Sertik
Thu Nov 23, 2023 8:35 pm
Forum: Scripting
Topic: output data to serial port using script
Replies: 2
Views: 1246

Re: output data to serial port using script

Thanks Rex, but it's too complicated for me. I've found another way so far. I have a device that can do this and it is controlled by http requests. That is, I can send an http request to this device from Mikrotik, and it will already transfer the data to whoever needs it. It's a pity that Mikrotik c...
by Sertik
Thu Nov 23, 2023 12:47 pm
Forum: Scripting
Topic: output data to serial port using script
Replies: 2
Views: 1246

output data to serial port using script

already asked somewhere but no one answered. Maybe I asked in the wrong section of the forum. I’ll ask separately again: is it possible to somehow use a script to output data to the serial port of Mikrotik? As far as I understand from the descriptions, the output comes only from the keyboard, and I ...
by Sertik
Thu Nov 23, 2023 9:07 am
Forum: Scripting
Topic: Logging GPS Coordinates in File when LTE Disconnects
Replies: 3
Views: 1110

Re: Logging GPS Coordinates in File when LTE Disconnects

I think yes it can be done. When the connection is disconnected, the latest data remains in /system gps, unless the router has been rebooted. You can take it from there with a script and save it in a variable/file or ip firewall layer7. When the connection appears, you can transfer them. But what 's...
by Sertik
Wed Nov 22, 2023 11:56 am
Forum: Scripting
Topic: GPT4 and writing scripts for Mikrotik
Replies: 51
Views: 6105

Re: GPT4 and writing scripts for Mikrotik

There is no point in describing the advantages of machine AI over human AI: it has no physical shell (body), is N-times faster, does not depend on environmental conditions, does not get tired, does not need rest, can unlimitedly increase power by increasing the number of elements (humans do not have...
by Sertik
Wed Nov 22, 2023 11:21 am
Forum: Scripting
Topic: GPT4 and writing scripts for Mikrotik
Replies: 51
Views: 6105

Re: GPT4 and writing scripts for Mikrotik

Nevertheless, one person, no matter how talented he is, can be effective in one (even several) areas. All of humanity is an example of the cooperation of many intellects (if you want elements of a global neural network). However, if an artificial superintelligence is created that surpasses humans in...
by Sertik
Wed Nov 22, 2023 11:16 am
Forum: Scripting
Topic: GPT4 and writing scripts for Mikrotik
Replies: 51
Views: 6105

Re: GPT4 and writing scripts for Mikrotik

I make do with what's available. Both in programming and in real life. I don't spend a single euro on plumbers, electricians, painters, and anything else, I do everything myself... I save a lot of money which I then spend on leisure. Well, as they say, “a talented person is talented in everything.”...
by Sertik
Tue Nov 21, 2023 9:00 pm
Forum: Scripting
Topic: GPT4 and writing scripts for Mikrotik
Replies: 51
Views: 6105

Re: GPT4 and writing scripts for Mikrotik

And in fact, if you look at it now, the programmer performs the work of the machine in its pure form by 80% (if you remove the creative component of coming up with solutions and algorithms, which, by the way, have mostly already been invented). The programmer has to know from memory or find in refer...
by Sertik
Tue Nov 21, 2023 8:44 pm
Forum: Scripting
Topic: GPT4 and writing scripts for Mikrotik
Replies: 51
Views: 6105

Re: GPT4 and writing scripts for Mikrotik

Well, you really... I can find syntax errors most often, but coming up with constructions is worse. GPT4 in the latest release does not make mistakes like its predecessors. He doesn’t create non-existent commands, as he did before, he doesn’t fantasize - he produces maybe not super-optimal, but very...
by Sertik
Tue Nov 21, 2023 11:18 am
Forum: Virtualization
Topic: GoldenOrb (ROOter Firmware)
Replies: 0
Views: 2392

GoldenOrb (ROOter Firmware)

I will ask in this section: Has anyone used ROOter Firmware firmware for Microtik ?

https://www.ofmodemsandmen.com/firmware.html
by Sertik
Tue Nov 21, 2023 9:21 am
Forum: Scripting
Topic: GPT4 and writing scripts for Mikrotik
Replies: 51
Views: 6105

Re: GPT4 and writing scripts for Mikrotik

Communicating on the forum, we not only exchange technical information (as machines), but also put our soul into it (as people), getting to know each other better and possibly enriching each other. And it's still more pleasant for me to communicate with Rex than with GPT. :D
by Sertik
Tue Nov 21, 2023 9:14 am
Forum: Scripting
Topic: GPT4 and writing scripts for Mikrotik
Replies: 51
Views: 6105

Re: GPT4 and writing scripts for Mikrotik

There is no sense in the bankruptcy of open artificial intelligence. Now there is already a race between the creators of artificial intelligence, there will be no open AI - there will be others, whether we want it or not. Now billions of dollars are pouring into them. Those who created television or...
by Sertik
Tue Nov 21, 2023 9:08 am
Forum: Scripting
Topic: GPT4 and writing scripts for Mikrotik
Replies: 51
Views: 6105

Re: GPT4 and writing scripts for Mikrotik

If many do not want to, we will not continue this topic. Believe me, I have no goal to promote technology, as someone said here. But I like the discussion with Rex, since he is an autodidact (self-taught) like me, and although he does not have systematic knowledge of philosophy, for example, he has ...
by Sertik
Mon Nov 20, 2023 9:33 pm
Forum: Scripting
Topic: GPT4 and writing scripts for Mikrotik
Replies: 51
Views: 6105

Re: GPT4 and writing scripts for Mikrotik

As far as I understand, you Rex do not want to get your own personal experience with GPT. This is weird. Why ? Any scientist or researcher of something always wants to gain his own experience. No need to jump from the 99th floor because it is clear that you will crash. But when biologists tested the...
by Sertik
Mon Nov 20, 2023 3:45 pm
Forum: Scripting
Topic: GPT4 and writing scripts for Mikrotik
Replies: 51
Views: 6105

Re: GPT4 and writing scripts for Mikrotik

Contradict yourself. Say that knowledge is taken from experience and do not want to personally get this experience. Are you afraid that it will hurt ?
by Sertik
Mon Nov 20, 2023 2:45 pm
Forum: Scripting
Topic: GPT4 and writing scripts for Mikrotik
Replies: 51
Views: 6105

Re: GPT4 and writing scripts for Mikrotik

Intelligence does not exist, in any form. Even inventing something does not require intelligence, but knowledge. This is Rex's opinion. I think many will disagree with this. For now, knowledge can only be created and increased by people through intelligence. Let's stop here and see what happens nex...
by Sertik
Mon Nov 20, 2023 1:00 pm
Forum: Scripting
Topic: GPT4 and writing scripts for Mikrotik
Replies: 51
Views: 6105

Re: GPT4 and writing scripts for Mikrotik

In my humble opinion, GPT4 today cannot create something fundamentally new, creating only what we (human programmers) know how to write. But after clarification, he is able to produce working code and significantly reduce the time for searching and writing significant pieces of the script. It’s clea...
by Sertik
Mon Nov 20, 2023 12:55 pm
Forum: Scripting
Topic: GPT4 and writing scripts for Mikrotik
Replies: 51
Views: 6105

Re: GPT4 and writing scripts for Mikrotik

By the way, Rex himself never expressed his opinion about GPT4...
by Sertik
Mon Nov 20, 2023 12:53 pm
Forum: Scripting
Topic: GPT4 and writing scripts for Mikrotik
Replies: 51
Views: 6105

Re: GPT4 and writing scripts for Mikrotik

To our respected and beloved Rex, in any case, good health, long years and new successes! I hope it will remain ahead of GPT for a long time! By the way, the last task - to write a script for transcoding text from 1251 to UTF8 GPT4 was also completed, but not completely (he avoids long tasks, at fir...
by Sertik
Mon Nov 20, 2023 12:45 pm
Forum: Scripting
Topic: GPT4 and writing scripts for Mikrotik
Replies: 51
Views: 6105

Re: GPT4 and writing scripts for Mikrotik

No, gentlemen, it’s not like that. I gave GPT 3.5 three tasks (write a script for searching for active routes on the Internet, including marked ones; write a script for turning on a relay through the Laurent 5G module; write a script for transcoding the Cyrillic alphabet to send text to a Telegram b...
by Sertik
Mon Nov 20, 2023 8:34 am
Forum: Scripting
Topic: GPT4 and writing scripts for Mikrotik
Replies: 51
Views: 6105

Re: GPT4 and writing scripts for Mikrotik

Despite the fact that the AI's success is impressive, it is important to keep in mind that the AI can only combine [*] the knowledge it has gained during training. Don't think like that. Regarding GPT4, he can, for example, search for knowledge on the Internet, climbing into any online manuals and ...
by Sertik
Fri Nov 17, 2023 1:06 pm
Forum: Scripting
Topic: GPT4 and writing scripts for Mikrotik
Replies: 51
Views: 6105

Re: GPT4 and writing scripts for Mikrotik

Rex, being a very smart person, understood all this and stopped writing scripts for Mikrotik, not wanting to train the neural network. :D In this sense, I most like the famous story by Cyril Kornblatt “Gomez” (if you haven’t read it, I recommend reading it).
by Sertik
Fri Nov 17, 2023 12:08 pm
Forum: Scripting
Topic: GPT4 and writing scripts for Mikrotik
Replies: 51
Views: 6105

Re: GPT4 and writing scripts for Mikrotik

Perhaps the timing of my forecasts is even too optimistic. And either humanity will stop working on instruments for its own destruction and find means of protection or...
by Sertik
Fri Nov 17, 2023 12:05 pm
Forum: Scripting
Topic: GPT4 and writing scripts for Mikrotik
Replies: 51
Views: 6105

Re: GPT4 and writing scripts for Mikrotik

Thank you very much Amm0 for your answer. Jokes aside, the release of GPT5 is just around the corner. In addition, you need to clearly understand that what developers are now giving away online and what they are already giving in practice are two different things, because they are controlled by wars...
by Sertik
Thu Nov 16, 2023 9:58 pm
Forum: Scripting
Topic: GPT4 and writing scripts for Mikrotik
Replies: 51
Views: 6105

Re: GPT4 and writing scripts for Mikrotik

I agree, this is not a good example.

And this is what GPT gave when asked to “write a script to search for active routes on the Internet”:
:put [/ip route print where dst-address~"0.0.0.0/0"]
It's better, isn't it?
by Sertik
Thu Nov 16, 2023 3:00 pm
Forum: Scripting
Topic: GPT4 and writing scripts for Mikrotik
Replies: 51
Views: 6105

Re: GPT4 and writing scripts for Mikrotik

This is what GPT gave in 5 seconds when asked to contact a specific device with a specific OID. Yes, it's simple, but it replaces 10 minutes of my time writing and checking syntax. # settings :local deviceIP "192.168.1.1" :local snmpCommunity "public" :local relayOID "1.3.6....
by Sertik
Thu Nov 16, 2023 2:50 pm
Forum: Scripting
Topic: GPT4 and writing scripts for Mikrotik
Replies: 51
Views: 6105

Re: GPT4 and writing scripts for Mikrotik

I only tried GPT3.5 This neural network, of course, cannot write the final script, but it can significantly reduce the time for a non-professional in writing scripts by providing ready-made code snippets upon request, instead of searching for them on forums. Considering that GPT4 is an order of magn...
by Sertik
Wed Nov 15, 2023 12:44 pm
Forum: Announcements
Topic: v7.13beta [testing] is released!
Replies: 467
Views: 95311

Re: v7.13beta [testing] is released!

Can someone clearly explain the syntax and use of the new commands:

:serialize
:deserialize
:onerror
:grep
by Sertik
Wed Nov 15, 2023 12:18 pm
Forum: Scripting
Topic: GPT4 and writing scripts for Mikrotik
Replies: 51
Views: 6105

GPT4 and writing scripts for Mikrotik

Has anyone tried to get GPT4 to write a script for Mikrotik? I wonder how it's going? I can’t try - I’m in Russia, I don’t have VDS abroad.
I wonder when GPT will be able to replace Rex ? :D
by Sertik
Wed Nov 15, 2023 12:14 pm
Forum: RouterBOARD hardware
Topic: SIM insertion
Replies: 7
Views: 2589

Re: SIM insertion

Well, we sorted out 88 and 188. Maybe the topicmaster doesn’t have an address on the interface at all?
Let him try to connect using the Mac address.
by Sertik
Tue Nov 14, 2023 10:22 am
Forum: RouterBOARD hardware
Topic: RBM33G GPIO and extra interfaces documentation
Replies: 4
Views: 4257

Re: RBM33G GPIO and extra interfaces documentation

It seems that a detailed description of the RBM33G pin does not exist or is not published... There is no response from the developers to our pleas. In general, Mikrotik has not released OEM boards for a long time. It would be nice to release a new board with the performance of the RB5009, built-in t...
by Sertik
Mon Nov 13, 2023 9:42 pm
Forum: RouterBOARD hardware
Topic: SIM insertion
Replies: 7
Views: 2589

Re: SIM insertion

I also cannot connect to 192.168.188.1, but I think that's a different issue...
In Mikrotik you usually need to connect to 192.168.88.1 ...
by Sertik
Mon Nov 13, 2023 11:12 am
Forum: RouterBOARD hardware
Topic: RBM33G serial ports [SOLVED]
Replies: 10
Views: 8643

Re: RBM33G serial ports [SOLVED]

... Although, if :put will pour data into the Terminal, and it is connected to serial1, then in theory everything should pour into the serial port, and accordingly be transferred to the usb serial Player... It is possible and will work. USB-serial Player of the latest version (I found 1.3.2) costs a...
by Sertik
Mon Nov 13, 2023 10:26 am
Forum: RouterBOARD hardware
Topic: RBM33G serial ports [SOLVED]
Replies: 10
Views: 8643

Re: RBM33G serial ports [SOLVED]

If you use the command :put to pour data into the console connected to the serial port, will this data pour into the port ? Like they should ?
by Sertik
Mon Nov 13, 2023 9:20 am
Forum: RouterBOARD hardware
Topic: RBM33G serial ports [SOLVED]
Replies: 10
Views: 8643

Re: RBM33G serial ports [SOLVED]

cIn theory, you should try this - сonnect the terminal to serial 1 port: /system serial-terminal serial1 After which you can send commands from the console. USB serial Player should catch them. But whether it will be possible to do this from a script ? is a big question... Probably not. It’s a pity ...
by Sertik
Mon Nov 13, 2023 8:01 am
Forum: RouterBOARD hardware
Topic: RBM33G GPIO and extra interfaces documentation
Replies: 4
Views: 4257

Re: RBM33G GPIO and extra interfaces documentation

Is there any documentation on RBM33G connectors ?
by Sertik
Sun Nov 12, 2023 8:48 pm
Forum: RouterBOARD hardware
Topic: RBM33G serial ports [SOLVED]
Replies: 10
Views: 8643

Re: RBM33G serial ports [SOLVED]

Greetings to all. I'm wondering if it's possible to use the additional serial1 port of the RBM33G to transmit and receive data? Including whether it is possible to connect a device that also has a similar serial port to PIN12-16 and control it from Mikrotik. For example, let it be Serial MP3 Player ...
by Sertik
Thu Nov 09, 2023 12:16 pm
Forum: Announcements
Topic: WinBox v3.40 released!
Replies: 159
Views: 146510

Re: WinBox v3.40 released!

I don’t really understand what we’re talking about here. Downloaded new Winbox. Launched. Everything is working. What is the BTH?
by Sertik
Tue Oct 31, 2023 3:52 pm
Forum: Scripting
Topic: GPIO function for RBM33G
Replies: 1
Views: 1615

GPIO function for RBM33G

I wrote a function to work with GPIO RBM33G I/O lines. Probably not everything is rational in it, since I wrote with little time for optimization, just to work. But it works. Take who needs it. See the parameters in the function code. In general, this is $1 - action, $2 - line number (or all), $3 &q...
by Sertik
Tue Oct 31, 2023 3:39 pm
Forum: Scripting
Topic: function "Escape" how to support CP1251?
Replies: 5
Views: 1937

Re: function "Escape" how to support CP1251?

Dear Rex , That's why I'm asking, because I don't want to try "idle". You, as an expert and an author, will tell me right away...
by Sertik
Fri Oct 27, 2023 12:47 pm
Forum: Scripting
Topic: function "Escape" how to support CP1251?
Replies: 5
Views: 1937

Re: function "Escape" how to support CP1251?

I have a lot of text in Russian in my scripts (for example, in comments). Will your Escape function work with them? Or do you need to replace the conversion tables in it?
by Sertik
Wed Oct 25, 2023 2:14 pm
Forum: Scripting
Topic: function "Escape" how to support CP1251?
Replies: 5
Views: 1937

function "Escape" how to support CP1251?

Rex once wrote a wonderful “escape” function that allowed you to escape characters for transferring scripts over SSH. https://forum.mikrotik.com/viewtopic.php?p=980088#p980088 It supports ASCII 1252 encoding. Is it possible to ask the author to remake it so that it supports ASCII 1251 (Cyrilic) enco...
by Sertik
Wed Oct 25, 2023 1:58 pm
Forum: Scripting
Topic: ✂ Rextended Fragments of Snippets
Replies: 96
Views: 69492

Re: ✂ Rextended Fragments of Snippets

Have you damaged 6 Mikrotik devices? It's hard to believe. What devices are these and how did this happen?
by Sertik
Wed Oct 25, 2023 12:27 pm
Forum: Scripting
Topic: ✂ Rextended Fragments of Snippets
Replies: 96
Views: 69492

Re: ✂ Rextended Fragments of Snippets

Rex has written almost every script you can think of.
What should we do now?
It's time to hack the Router OS (scientifically speaking, reverse engineer it).
by Sertik
Wed Oct 18, 2023 9:45 am
Forum: RouterBOARD hardware
Topic: LtAP mini (RB912R-2nD-LTm)
Replies: 24
Views: 4132

Re: LtAP mini (RB912R-2nD-LTm)

Only other is did you update the firmware via /system/routerboard/upgrade? Yes, of course. Flashed ROS 7.11 stable with gjvjom. Netinstall. Rebooted the router. Made /system routerboard upgrade firmware. Rebooted the router again. Everything is as I usually do. No effect - the wifi interface does n...
by Sertik
Tue Oct 17, 2023 10:28 pm
Forum: RouterBOARD hardware
Topic: LtAP mini (RB912R-2nD-LTm)
Replies: 24
Views: 4132

Re: LtAP mini (RB912R-2nD-LTm)

I also tried your advice, Amm0. After reflashing Netinstall ROS 7.11 did not help. The wifi interface does not appear in the list of interfaces. So most likely this is a factory defect.
by Sertik
Tue Oct 17, 2023 9:01 pm
Forum: RouterBOARD hardware
Topic: LtAP mini (RB912R-2nD-LTm)
Replies: 24
Views: 4132

Re: LtAP mini (RB912R-2nD-LTm)

And it is unlikely that you will be able to return it or get warranty repairs, since the terms of the warranty are not met - the boards are “broken” out of the case, and they were not purchased from an official dealer. I'm now trying to understand how they were bought.
by Sertik
Tue Oct 17, 2023 8:56 pm
Forum: RouterBOARD hardware
Topic: LtAP mini (RB912R-2nD-LTm)
Replies: 24
Views: 4132

Re: LtAP mini (RB912R-2nD-LTm)

Dear Amm0! I'll probably try what you recommend. But it seems to me that the Netinstall version and the Router OS version have nothing to do with it. Otherwise, official technical support could have recommended this, but they didn’t. The Wifi interface must be defined in any version of Ros.
by Sertik
Tue Oct 17, 2023 8:13 pm
Forum: RouterBOARD hardware
Topic: LtAP mini (RB912R-2nD-LTm)
Replies: 24
Views: 4132

Re: LtAP mini (RB912R-2nD-LTm)

This is what Mikrotik technical support told me: Hello, It looks like the device has an HW problem, please contact the distributor form witch you bought the device and ask about the possibility of repairing it. Best regards, Viesturs R. The answer must be, to put it mildly, exhaustive... I would lik...
by Sertik
Tue Oct 17, 2023 1:53 pm
Forum: RouterBOARD hardware
Topic: LtAP mini (RB912R-2nD-LTm)
Replies: 24
Views: 4132

Re: LtAP mini (RB912R-2nD-LTm)

Microtik technical support is still silent. Does anyone have any other thoughts?
by Sertik
Tue Oct 17, 2023 12:01 am
Forum: RouterBOARD hardware
Topic: LtAP mini (RB912R-2nD-LTm)
Replies: 24
Views: 4132

Re: LtAP mini (RB912R-2nD-LTm)

I created supout.rif as Normis said and sent it to support@mikrotik.com. Perhaps Mikrotik specialists will figure out what’s wrong?
by Sertik
Mon Oct 16, 2023 11:37 pm
Forum: RouterBOARD hardware
Topic: LtAP mini (RB912R-2nD-LTm)
Replies: 24
Views: 4132

Re: LtAP mini (RB912R-2nD-LTm)

Here is a photo of the board. In photo 2 (back side) traces of thermal paste are visible. What could be there?

Image

Image
by Sertik
Mon Oct 16, 2023 11:27 pm
Forum: RouterBOARD hardware
Topic: LtAP mini (RB912R-2nD-LTm)
Replies: 24
Views: 4132

Re: LtAP mini (RB912R-2nD-LTm)

Let me clarify that I only have the RB912 board on hand, and not the LtaP mini device in the case. Could the wifi have been damaged when removed from the case?
by Sertik
Mon Oct 16, 2023 11:24 pm
Forum: RouterBOARD hardware
Topic: LtAP mini (RB912R-2nD-LTm)
Replies: 24
Views: 4132

Re: LtAP mini (RB912R-2nD-LTm)

I reflashed the router with Netinstall. Same effect. There is no wifi interface. Moreover, the one who gave me this board assures that he has 13 such boards. Could someone intentionally damage the wifi interface so that it does not work in this RB? Or could the Mikrotik company supply someone with a...
by Sertik
Mon Oct 16, 2023 10:55 pm
Forum: RouterBOARD hardware
Topic: LtAP mini (RB912R-2nD-LTm)
Replies: 24
Views: 4132

Re: LtAP mini (RB912R-2nD-LTm)

Since there is nothing else left, I'll try, thanks
by Sertik
Mon Oct 16, 2023 10:46 pm
Forum: RouterBOARD hardware
Topic: LtAP mini (RB912R-2nD-LTm)
Replies: 24
Views: 4132

Re: LtAP mini (RB912R-2nD-LTm)

I apologize for the inaccuracy. The 6.49.10 long-term package is installed. As far as I understand, the wareless package is included in the main package and it appears in my /system package. Why should I install it separately?
by Sertik
Mon Oct 16, 2023 10:36 pm
Forum: RouterBOARD hardware
Topic: LtAP mini (RB912R-2nD-LTm)
Replies: 24
Views: 4132

Re: LtAP mini (RB912R-2nD-LTm)

Currently installed ROS 6.47.10 long-term main package.
by Sertik
Mon Oct 16, 2023 10:15 pm
Forum: RouterBOARD hardware
Topic: LtAP mini (RB912R-2nD-LTm)
Replies: 24
Views: 4132

Re: LtAP mini (RB912R-2nD-LTm)

Today I received the RB912R_2nD board without a case. The board boots up, everything is fine, except for one thing - there is no wifi interface as such. There is only eth1 in the list of interfaces (the LTE modem is not installed in the mini PCI-e slot). Am I missing something or where is the wifi i...
by Sertik
Sat Oct 14, 2023 8:25 pm
Forum: Scripting
Topic: Remove disk from /files
Replies: 10
Views: 2255

Re: Remove disk from /files

OK, Thanks !
by Sertik
Sat Oct 14, 2023 7:55 pm
Forum: Scripting
Topic: function convert UnicodeToURL
Replies: 3
Views: 1582

function convert UnicodeToURL

Our one Russian forum member wrote this recoding function. I can’t understand whether Rex already had one like this or not? :global fUnicodeToURL :if (!any $fUnicodeToURL) do={ :global fUnicodeToURL do={ :local Ubytes [:tonum $1] :local EscapeStr "" :local HighByte :local LowByte :local fi...
by Sertik
Fri Oct 13, 2023 2:38 pm
Forum: Scripting
Topic: Remove disk from /files
Replies: 10
Views: 2255

Re: Remove disk from /files

Come on. And should I upgrade to version 7 because of this? Why did she give herself up to me? I have a lot of devices on version 6 and I'm not going to update it.
by Sertik
Fri Oct 13, 2023 9:33 am
Forum: Scripting
Topic: Remove disk from /files
Replies: 10
Views: 2255

Re: Remove disk from /files

The fact of the matter is that the nasty Router Mukh stores the names of the disks somewhere and does not delete them from its memory after unmounting. If, say, disk1 was created, then ejected and a new disk is mounted, then it already receives the name disk2, and disk 1, no matter how you delete it...
by Sertik
Thu Oct 12, 2023 8:23 pm
Forum: Scripting
Topic: Remove disk from /files
Replies: 10
Views: 2255

Re: Remove disk from /files

Has no one encountered this?
by Sertik
Thu Oct 12, 2023 3:35 pm
Forum: Scripting
Topic: Remove disk from /files
Replies: 10
Views: 2255

Remove disk from /files

After using SDD or SD, it doesn’t matter, I can’t adequately remove the disk from /files. Even if you correctly eject and delete the directory with the disk from winbox or CLI, after rebooting the router it appears again. I still haven’t found a way to permanently remove the disk other than reflashi...
by Sertik
Mon Oct 09, 2023 2:32 pm
Forum: RouterBOARD hardware
Topic: LtAP mini (RB912R-2nD-LTm)
Replies: 24
Views: 4132

Re: LtAP mini (RB912R-2nD-LTm)

Thank you. I think those who used these boards were doing something wrong. I'll take one and try it myself. In any case, I will report the result.
by Sertik
Mon Oct 09, 2023 1:23 pm
Forum: RouterBOARD hardware
Topic: LtAP mini (RB912R-2nD-LTm)
Replies: 24
Views: 4132

Re: LtAP mini (RB912R-2nD-LTm)

Again, is it possible to kill the wifi interface with the Ros7 firmware on this device?
by Sertik
Mon Oct 09, 2023 1:22 pm
Forum: RouterBOARD hardware
Topic: LtAP mini (RB912R-2nD-LTm)
Replies: 24
Views: 4132

Re: LtAP mini (RB912R-2nD-LTm)

I don't have any configuration data yet. Just one person claims that he has 13 such RB, which does not work wifi. It's hard for me to believe this, both in the marriage of the factory, and in the fact that somehow you can kill the built-in wifi on this board. So I wanted to ask if there were similar...
by Sertik
Mon Oct 09, 2023 1:05 pm
Forum: RouterBOARD hardware
Topic: LtAP mini (RB912R-2nD-LTm)
Replies: 24
Views: 4132

LtAP mini (RB912R-2nD-LTm)

Has anyone heard of a defect in this RB's wifi?
There is a batch of devices where supposedly wifi is not detected in Winbox and naturally does not work.
by Sertik
Tue Sep 26, 2023 5:12 pm
Forum: Scripting
Topic: RBM33G GPIO used
Replies: 4
Views: 1675

Re: RB33G GPIO used

I tried it ! Yes, it works! As it turned out, the RBM33G does not really have analog lines, but it has as many as 6 digital ones, each of which can be configured for both input and output: /iot gpio digital print # NAME DIRECTION OUTPUT INPUT SCRIPT 0 pin3 input 0 1 1 pin5 input 0 1 2 pin15 input 0 ...
by Sertik
Tue Sep 26, 2023 9:14 am
Forum: Scripting
Topic: RBM33G GPIO used
Replies: 4
Views: 1675

Re: RB33G GPIO used

After rereading the documentation, I realized that for RBM33G, you can use GPIO lines 12,13,15,16 of its connector. At the same time, you must first disconnect them from serial1: /system/routerboard/settings/set gpio-function="" /system/reboot RBM33G has no analog lines. These four lines a...
by Sertik
Mon Sep 25, 2023 2:36 pm
Forum: Scripting
Topic: RBM33G GPIO used
Replies: 4
Views: 1675

Re: RB33G GPIO used

It's okay Rex. Maybe Amm0 has RBM33G?
by Sertik
Mon Sep 25, 2023 2:10 pm
Forum: Scripting
Topic: RBM33G GPIO used
Replies: 4
Views: 1675

RBM33G GPIO used

RBM33G has a GPIO, which can be used, in particular, by connecting script execution to them. Could respected gurus explain in detail how best to use this? Or is it related only to KNOT ? As far as I understand, you can connect analog outputs of equipment to PIN 2,3 and use a script to read the volta...
by Sertik
Mon Sep 25, 2023 1:28 pm
Forum: RouterBOARD hardware
Topic: Cooler for RBM33G
Replies: 8
Views: 4210

Re: Cooler for RBM33G

I'm interested in this too, it would be especially interesting to use GPIO to control an external relay. But no one says anything here... GPIO pinout M33 pinout is shown below: All output pins are open drain. Digital input voltage is 0 to 3.63 V max. To receive a logical "0" on the pin, th...
by Sertik
Mon Sep 25, 2023 1:19 pm
Forum: RouterBOARD hardware
Topic: support for third-party modems Cat 16-18
Replies: 0
Views: 2561

support for third-party modems Cat 16-18

Has anyone installed modems on RB Mikrotik M.2 via USB adapters ? I'm interested in the possibility of installing modems like: Fibocom 850 Fibocom 860 Foxconn FOXCONN-T77W968 Is it possible, in particular, to connect such modems in a USB adapter to the RB33G, which supports USB 3.0? Do the latest ve...
by Sertik
Thu Sep 21, 2023 9:59 am
Forum: Scripting
Topic: $YAML - convert arrays to pretty YAML-formated text
Replies: 3
Views: 1998

Re: $YAML - convert arrays to pretty YAML-formated text

Thank you very much to the author for this useful feature. I wanted to ask how YAML differs from the JParsePrint function from the Chupacabra JSON parser set ? :global fJParsePrint :if (!any $fJParsePrint) do={ :global fJParsePrint do={ :global JParseOut :local TempPath :global fJParsePrint :if ([:l...
by Sertik
Tue Sep 19, 2023 1:59 pm
Forum: Scripting
Topic: Laurent Telegram Terminal
Replies: 8
Views: 2836

Re: Laurent Telegram Terminal

by Sertik
Fri Sep 08, 2023 3:24 pm
Forum: Scripting
Topic: New command in RouterOs 7
Replies: 34
Views: 7197

Re: New command in RouterOs 7

I wrote a short article for the Russian-speaking audience on the new commands of the scripting language in the Router OS based on the materials of this topic. I hope I didn't mix anything up. I also thanked our respected gurus Rextended and Amm0 in the article for their help, explanations and exampl...
by Sertik
Thu Sep 07, 2023 4:03 pm
Forum: Scripting
Topic: "foreach loop" behavior change in version 7
Replies: 9
Views: 2993

Re: "foreach loop" behavior change in version 7

Thank you very much. Now, with a simple example, everything is clear.
by Sertik
Thu Sep 07, 2023 3:29 pm
Forum: Scripting
Topic: "foreach loop" behavior change in version 7
Replies: 9
Views: 2993

Re: "foreach loop" behavior change in version 7

Still, Rex, could you add... What exactly has been fixed in the work on arrays in ROS7 relative to ROS6 ?
by Sertik
Thu Sep 07, 2023 2:23 pm
Forum: Scripting
Topic: "foreach loop" behavior change in version 7
Replies: 9
Views: 2993

Re: "foreach loop" behavior change in version 7

I have come across a description of this problem many times, in particular, on the Russian-language Microtik forum, our programmers complained about the behavior of RouterOS when working with arrays. But I, by virtue of my abilities, did not understand the essence of the problem. Can one of the resp...
by Sertik
Mon Sep 04, 2023 9:30 am
Forum: Scripting
Topic: New command in RouterOs 7
Replies: 34
Views: 7197

Re: New command in RouterOs 7

I'll digress a little from the main topic of the topic and give examples of the possibility of entering a line in the Terminal: To enter a line from the Terminal, of course, you can write a small script using :terminal inkey like this: :local EnterString do={ :local cont; :local string :while ($cont...
by Sertik
Mon Sep 04, 2023 9:20 am
Forum: Scripting
Topic: New command in RouterOs 7
Replies: 34
Views: 7197

Re: New command in RouterOs 7

So, what we have today (to version 7.12): :timestamp :rndnum from=[num] to=[num] :retry command={abc} delay=1 max=2 on-error={} :rndstr from=[str] length=[num] :convert from=[arg] to=[arg] transform= :jobname :tonsec :terminal/ask preinput= prompt= :console/inspect as-value request= path= :task :ex...
by Sertik
Fri Sep 01, 2023 8:57 pm
Forum: Scripting
Topic: New command in RouterOs 7
Replies: 34
Views: 7197

Re: New command in RouterOs 7

No, I think it's better to post here for now all the new commands of the entire Router OS 7.
by Sertik
Fri Sep 01, 2023 2:35 pm
Forum: Scripting
Topic: New command in RouterOs 7
Replies: 34
Views: 7197

Re: New command in RouterOs 7

By the way, some descriptions of the new commands are present here:
https://help.mikrotik.com/docs/display/ROS/Scripting
by Sertik
Fri Sep 01, 2023 1:51 pm
Forum: Scripting
Topic: New command in RouterOs 7
Replies: 34
Views: 7197

Re: New command in RouterOs 7

Is it possible to encode some data with a key using :convert, and then decode it only if this key is known?
by Sertik
Fri Sep 01, 2023 9:32 am
Forum: Scripting
Topic: New command in RouterOs 7
Replies: 34
Views: 7197

Re: New command in RouterOs 7

Thank you very much. Let's put in this topic everything that concerns the new Ros teams. It will be easy to search.
by Sertik
Thu Aug 31, 2023 10:12 pm
Forum: Scripting
Topic: New command in RouterOs 7
Replies: 34
Views: 7197

Re: New command in RouterOs 7

Yeah interesting. It will probably solve many problems with various recodings and shorten scripts. Thanks a lot for the explanations.
by Sertik
Thu Aug 31, 2023 8:50 pm
Forum: Scripting
Topic: New command in RouterOs 7
Replies: 34
Views: 7197

Re: New command in RouterOs 7

Forgive me for being stupid, but could you explain why the :convert command is needed at all? The transform parameters are reminiscent of encryption options...
by Sertik
Thu Aug 31, 2023 8:17 pm
Forum: Scripting
Topic: New command in RouterOs 7
Replies: 34
Views: 7197

Re: New command in RouterOs 7

I can’t understand how the :convert command works, what features and parameters it has ?
by Sertik
Thu Aug 31, 2023 3:35 pm
Forum: Scripting
Topic: New command in RouterOs 7
Replies: 34
Views: 7197

Re: New command in RouterOs 7

The only way ?
by Sertik
Thu Aug 31, 2023 3:30 pm
Forum: Scripting
Topic: New command in RouterOs 7
Replies: 34
Views: 7197

New command in RouterOs 7

As you know, the developers of Mikrotik finally took up the "scripts" section and supplemented the system with a number of new commands, such as, for example, : timestamp, : rndnum. Recent versions have received :convert, :jobname, tosec, /terminal/ask. But I did not find data on these com...
by Sertik
Thu Aug 31, 2023 3:26 pm
Forum: Scripting
Topic: All data types on RouterOS
Replies: 2
Views: 1918

Re: All data types on RouterOS

:D :lol: :lol:
by Sertik
Thu Aug 31, 2023 2:38 pm
Forum: Scripting
Topic: All data types on RouterOS
Replies: 2
Views: 1918

All data types on RouterOS

In a post viewtopic.php?p=1014223#p1014223 Rex wrote the following: All types of RouterOS, including those that have not yet been discovered from other users.... The usual ones nil nothing str (string) bool (truth value) num (integer number) time (time interval) ip (ip address) ip-prefix (ip prefix)...
by Sertik
Wed Aug 02, 2023 10:38 am
Forum: Scripting
Topic: find addresses with same octets
Replies: 39
Views: 4976

Re: find addresses with same octets

Renamed one variable, it seems to work: :local Inlist "inlist" :local listblock "dahgers-list" :local count 4 /ip firewall address-list { :local ip2net do={:return [[:parse ":return $($1 & 255.255.255.0)/$2"]]} :local addr 0.0.0.0 :local net 0.0.0.0 :foreach item in...
by Sertik
Wed Aug 02, 2023 10:23 am
Forum: Scripting
Topic: find addresses with same octets
Replies: 39
Views: 4976

Re: find addresses with same octets

Thanks a lot to Amm0 for supporting my idea of $1="help"! I'm trying to use a piece of Rex'a to implement the initial task of the topic. There is a mistake somewhere ... :local list "inlist" :local listblock "dahgers-list" :local count 4 /ip firewall address-list { :loc...
by Sertik
Tue Aug 01, 2023 2:58 pm
Forum: Scripting
Topic: find addresses with same octets
Replies: 39
Views: 4976

Re: find addresses with same octets

Yes, no why, give a link, please, it might be useful.
by Sertik
Tue Aug 01, 2023 9:20 am
Forum: Scripting
Topic: find addresses with same octets
Replies: 39
Views: 4976

Re: find addresses with same octets

Oh, friends, you've written something complicated here... It seems to me that my task is easier - to find addresses with the same first three octets in one particular NameList address sheet and mark the moment when there are more of them, say 5. The subnet mask is not taken into account, it can be d...
by Sertik
Mon Jul 31, 2023 3:24 pm
Forum: Scripting
Topic: find addresses with same octets
Replies: 39
Views: 4976

Re: find addresses with same octets

Yes, probably so. I was thinking how can I use posix patterns to compare addresses...
And yes, probably, as you said, it will heavily load the processor
by Sertik
Mon Jul 31, 2023 1:21 pm
Forum: Scripting
Topic: find addresses with same octets
Replies: 39
Views: 4976

Re: find addresses with same octets

I don't know what this is for, one user from the Russian-speaking forum needs it. I don't care what he wants to do with it. God bless them with computing power. We need a script with probably a posix regexp template that allows you to select addresses with the same first three octets.
by Sertik
Mon Jul 31, 2023 10:27 am
Forum: Scripting
Topic: find addresses with same octets
Replies: 39
Views: 4976

Re: find addresses with same octets

I'll try to explain again... Let's say we have a certain address list, to which arbitrary addresses are added by some kind of firewall rule. Of course, we do not know these addresses in advance. Among them, there may be the same and similar. We need to catch addresses in this list with the same firs...
by Sertik
Mon Jul 31, 2023 10:12 am
Forum: Scripting
Topic: find addresses with same octets
Replies: 39
Views: 4976

Re: find addresses with same octets

Dear Amm0. If it were that easy, I wouldn't be asking. Addresses and subnets are not known in advance. Dear Amm0. If it were that easy, I wouldn't be asking. Addresses and subnets are not known in advance. This address list was given as an example
by Sertik
Mon Jul 31, 2023 9:17 am
Forum: Scripting
Topic: find addresses with same octets
Replies: 39
Views: 4976

Re: find addresses with same octets

You need to get a list of IP addresses from the address list myAddr, where the first three octets of the IP address are the same, but only the last one differs. for example: 192.168.88.3, 192.168.88.67; 192.168.88.12; 192.168.0.11; 192.168.67.5; 192.168.88.34 From these, addresses with the first thr...
by Sertik
Fri Jul 28, 2023 12:44 pm
Forum: Scripting
Topic: find addresses with same octets
Replies: 39
Views: 4976

find addresses with same octets

You need to get a list of IP addresses from the address list in which the first three octets of the IP addresses are the same, but only the last one is different and there are more than four such addresses. I understand that you need to use posix regex, but I'm not on friendly terms with this at all...
by Sertik
Thu Jul 27, 2023 11:11 am
Forum: RouterBOARD hardware
Topic: dual-band wifi adapters for Mikrotik
Replies: 9
Views: 3103

Re: dual-band wifi adapters for Mikrotik

Firstly, it's about the price. And secondly, I am interested in a card that supports both 2.4 and 5 ranges by choice. Microtik doesn't seem to have one.
by Sertik
Thu Jul 27, 2023 10:29 am
Forum: RouterBOARD hardware
Topic: dual-band wifi adapters for Mikrotik
Replies: 9
Views: 3103

Re: dual-band wifi adapters for Mikrotik

For example, it is known on which chips Microtik mini pci-e wifi modules are made: https://mikrotik.com/product/R11e-5HnD - AR9580 https://mikrotik.com/product/R11e-2HPnD - AR9582 https://mikrotik.com/product/R11e-2HnD - AR9582 https://mikrotik.com/product/R11e-5HacD - QCA9882 Will a wifi module fro...
by Sertik
Thu Jul 27, 2023 9:12 am
Forum: RouterBOARD hardware
Topic: dual-band wifi adapters for Mikrotik
Replies: 9
Views: 3103

Re: dual-band wifi adapters for Mikrotik

Thanks, but that's not quite it. I need to put a pci-e wifi adapter in the RBM33G, not a wifi module in a Microtik based on an X86 PC. I know for sure that Atheros, whose model I wrote above, works. I would like to know what modern models of wifi modules Microtik supports. It is unlikely that they w...
by Sertik
Wed Jul 26, 2023 3:05 pm
Forum: RouterBOARD hardware
Topic: dual-band wifi adapters for Mikrotik
Replies: 9
Views: 3103

Re: dual-band wifi adapters for Mikrotik

Well, at least wifi 2.4 MHz, what module can be installed other than the native Mikrotik ones?

Atheros AR5B95 ?

And which one is modern?
by Sertik
Wed Jul 26, 2023 1:37 pm
Forum: RouterBOARD hardware
Topic: dual-band wifi adapters for Mikrotik
Replies: 9
Views: 3103

Re: dual-band wifi adapters for Mikrotik

I want to install a non-Mikrotik wifi adapter in RB33G pci-e ...
by Sertik
Wed Jul 26, 2023 11:56 am
Forum: RouterBOARD hardware
Topic: dual-band wifi adapters for Mikrotik
Replies: 9
Views: 3103

dual-band wifi adapters for Mikrotik

Tell me, what dual-band wifi adapters does Mikrotik Ros support, except for the brand's boards?
by Sertik
Mon Jul 24, 2023 10:34 am
Forum: Scripting
Topic: Convert cyrillic to PDU modem format for sending SMS
Replies: 31
Views: 4725

Re: Convert cyrillic to PDU modem format for sending SMS

Now multi-lingual RouterOS
no, a multilingual OS router is not needed, you only need the ability to install support packages for national languages to send SMS
by Sertik
Fri Jul 21, 2023 8:42 pm
Forum: Scripting
Topic: option "help" for user`s function
Replies: 1
Views: 1709

option "help" for user`s function

I suggest that every valued function include a "help" option as a possible first parameter ($1). This option provides a brief output of information about the use of the function, parameters and examples. In order not to litter the log help is displayed only in the CLI for example: :global ...
by Sertik
Fri Jul 21, 2023 4:16 pm
Forum: Scripting
Topic: Convert cyrillic to PDU modem format for sending SMS
Replies: 31
Views: 4725

Re: Convert cyrillic to PDU modem format for sending SMS

Yes, but sends that from the CLI probably. And from a script?
by Sertik
Fri Jul 21, 2023 3:55 pm
Forum: Scripting
Topic: Convert cyrillic to PDU modem format for sending SMS
Replies: 31
Views: 4725

Re: Convert cyrillic to PDU modem format for sending SMS

It's clear. So this is not possible with the help of the script. This can only be implemented by the developers of the Router OS, but they will not do this, since it is necessary to support not only the Russian language, but also all other national languages. Although they could make it possible to ...
by Sertik
Fri Jul 21, 2023 12:38 pm
Forum: Scripting
Topic: Convert cyrillic to PDU modem format for sending SMS
Replies: 31
Views: 4725

Re: Convert cyrillic to PDU modem format for sending SMS

This is not a problem, but a desire. :)
by Sertik
Fri Jul 21, 2023 11:42 am
Forum: Scripting
Topic: Convert cyrillic to PDU modem format for sending SMS
Replies: 31
Views: 4725

Re: Convert cyrillic to PDU modem format for sending SMS

Sure. We will wait for you, Master.
by Sertik
Fri Jul 21, 2023 10:53 am
Forum: Scripting
Topic: Remove from the environment variables that satisfy the conditions
Replies: 6
Views: 2128

Re: Remove from the environment variables that satisfy the conditions

Wow!

(\\(code\\)

Why is code escaped with two slashes on both sides ?

Is one \ escaping (, and the second \ escaping the first \ ?
by Sertik
Fri Jul 21, 2023 9:37 am
Forum: Scripting
Topic: Remove from the environment variables that satisfy the conditions
Replies: 6
Views: 2128

Re: Remove from the environment variables that satisfy the conditions

Thank you very much. And if among the candidates for deletion there are functions created by the [:parse] method with content (code) ? /system script environment remove [find where (value~"^;\\(eva\?l ") and (value~"code") and (name~"^ABC")] OK? /system script environme...
by Sertik
Thu Jul 20, 2023 10:39 pm
Forum: Scripting
Topic: Convert cyrillic to PDU modem format for sending SMS
Replies: 31
Views: 4725

Re: Convert cyrillic to PDU modem format for sending SMS

Yes, but the received data can no longer be sent using the /tool ​​sms send method. It will be necessary to send through the modem PDU mode, right? But we don’t have the function of creating a ready-made PDU ... Do I understand correctly?
by Sertik
Thu Jul 20, 2023 10:29 pm
Forum: Scripting
Topic: Remove from the environment variables that satisfy the conditions
Replies: 6
Views: 2128

Remove from the environment variables that satisfy the conditions

Only variables that are functions with a specific name pattern need to be removed from the environment For example, you want to remove all functions that contain code and whose names start with ABC. Yes, this can be easily done with a :foreach loop, but I want to do without it. Here are the beginnin...
by Sertik
Thu Jul 20, 2023 2:46 pm
Forum: Scripting
Topic: Convert cyrillic to PDU modem format for sending SMS
Replies: 31
Views: 4725

Re: Convert cyrillic to PDU modem format for sending SMS

sometime in 2020 I wrote the function of transliterating Russian messages for Telegram There is not a complete CP table, but all the characters needed for transliteration. https://habr.com/ru/articles/519406/ # Function Translite of Russian characters for sending in Telegram # by Sertik 16/09/2020 #...
by Sertik
Thu Jul 20, 2023 2:18 pm
Forum: Scripting
Topic: Convert cyrillic to PDU modem format for sending SMS
Replies: 31
Views: 4725

Re: Convert cyrillic to PDU modem format for sending SMS

Mi vsi brati, xochesh ne xochesh :D That's right. That is, we do not communicate with the PDU, but simply transliterate the SMS and send it using the usual /tool ​​sms send tool. This, of course, is not what I wanted, but also a way out. But in the link I already gave, it says that sending Russian-...
by Sertik
Wed Jul 19, 2023 1:42 pm
Forum: Scripting
Topic: Convert cyrillic to PDU modem format for sending SMS
Replies: 31
Views: 4725

Re: Convert cyrillic to PDU modem format for sending SMS

How now to transfer this to the modem using lte-at chat ? Just a line?

For PDU, after all, it is necessary to read and transmit the length of the SMS, the recipient's number and the SMS itself ...
by Sertik
Mon Jul 17, 2023 4:37 pm
Forum: Scripting
Topic: TLGRM - combined notifications script & launch of commands
Replies: 7
Views: 7587

Re: TLGRM - combined notifications script & launch of commands

An alternative system Telegram active Runner and Notifier (TaRaN) has also been created:

https://forummikrotik.ru/viewtopic.php?f=14&t=14281

the truth is not adapted yet under ROS7
by Sertik
Mon Jul 17, 2023 4:13 pm
Forum: Scripting
Topic: Built in function library
Replies: 142
Views: 141094

Re: Built in function library

As for the built-in functions, I will refrain from speaking for now, but what I would like is that it would be possible to create sections in the script repository , so that it would be possible to store scripts not in a common huge list. After all, the number of scripts in the repository of a moder...
by Sertik
Mon Jul 17, 2023 4:01 pm
Forum: Scripting
Topic: Built in function library
Replies: 142
Views: 141094

Re: Built in function library

We are considering to add commonly used functions as built-in. What functions would you like to see? For example, MD5hash, random number generator and so on. Please fix the "third function call" error at last. For example, we have a function: :local myFunc do {:log info "Hello world ...
by Sertik
Mon Jul 17, 2023 3:04 pm
Forum: Scripting
Topic: Frequent empty variables in scripts turned out to be Bug ?
Replies: 10
Views: 2440

Re: Frequent empty variables in scripts turned out to be Bug ?

No, they won't fix it. We reported a long time ago that when a function is executed twice in a subshell, it is executed three times. Woz and now there. Mikrotik doesn't know how to fix the error. [$myFunc] [$myFunc] Yes, I agree with Amm0, there is no "third time error" without a shell. $m...
by Sertik
Thu Jul 13, 2023 11:38 am
Forum: RouterBOARD hardware
Topic: M.2 modem for RBM33G
Replies: 1
Views: 2460

M.2 modem for RBM33G

Has anyone tried to install an M.2 modem on the RBM33G platform? Does RouterOS support such integration and with which modems?
by Sertik
Thu Jul 13, 2023 10:39 am
Forum: Scripting
Topic: $INQUIRE - prompt user for input using array of questions + $CHOICES
Replies: 21
Views: 3421

Re: $INQUIRE - prompt user for input using array of questions, ft. inline functions (>[])

Also, the Amm0 script is good as an example of using (>[]). Question to the author: now what do you think when in practice it is appropriate to use the new data type op (>[]) that you explored?
by Sertik
Thu Jul 13, 2023 10:22 am
Forum: Scripting
Topic: $INQUIRE - prompt user for input using array of questions + $CHOICES
Replies: 21
Views: 3421

Re: $INQUIRE - prompt user for input using array of questions, ft. inline functions (>[])

By the way, what is the /terminal cu command and when did it appear?
by Sertik
Thu Jul 13, 2023 8:45 am
Forum: Scripting
Topic: $INQUIRE - prompt user for input using array of questions + $CHOICES
Replies: 21
Views: 3421

Re: $INQUIRE - prompt user for input using array of questions, ft. inline functions (>[])

Very cool !
Practically a preceptron of a neural network. A little more and there will be artificial intelligence on Mikrotik. :D
by Sertik
Mon Jul 10, 2023 9:56 pm
Forum: Scripting
Topic: check the element for occurrence in the key array without circle
Replies: 9
Views: 2044

Re: check the element for occurrence in the key array without circle

If I may have one more small question, Rex: Can I somehow check for the occurrence of an element in several arrays at once? I try this - it doesn't work: :local array1 {"a1"="val1"; "a2"="val2"} :local array2 {"b1"="val3"; "b2"=&q...
by Sertik
Mon Jul 10, 2023 12:28 pm
Forum: Scripting
Topic: check the element for occurrence in the key array without circle
Replies: 9
Views: 2044

Re: check the element for occurrence in the key array witnout circle

I immediately saw this error, but I don't know how to fix the title of the post
by Sertik
Mon Jul 10, 2023 11:25 am
Forum: Scripting
Topic: check the element for occurrence in the key array without circle
Replies: 9
Views: 2044

Re: check the element for occurrence in the key array witnout circle

:if ([:typeof ($arrayCom->"key2")] != "nothing") do={
Thanks !
by Sertik
Mon Jul 10, 2023 10:02 am
Forum: Scripting
Topic: check the element for occurrence in the key array without circle
Replies: 9
Views: 2044

check the element for occurrence in the key array without circle

You can check an element for occurrence in a simple array like this: :local list [:toarray "a, b, c, d"]; :if ([:len [find key="a" in=$list ]] > 0) do={log warning "Yes"} else={:log error "No"} An attempt to similarly check in the key array fails: :global arra...
by Sertik
Mon Jul 10, 2023 9:07 am
Forum: Scripting
Topic: Convert cyrillic to PDU modem format for sending SMS
Replies: 31
Views: 4725

Re: Convert cyrillic to PDU modem format for sending SMS

It would be much easier if MT improves SMS tool
It is unlikely that we will wait for this, it's better to wait until Rex becomes freer. :D
by Sertik
Fri Jul 07, 2023 9:21 pm
Forum: Scripting
Topic: Convert cyrillic to PDU modem format for sending SMS
Replies: 31
Views: 4725

Re: Convert cyrillic to PDU modem format for sending SMS

I have a link to an example of encoding and sending SMS via PDU in Russian.

https://wireless-e.ru/development/pdu/

Maybe this will help you?
... entire SMS PDU needs to be created ...
I won't be able to write this...
by Sertik
Fri Jul 07, 2023 8:53 pm
Forum: Scripting
Topic: Convert cyrillic to PDU modem format for sending SMS
Replies: 31
Views: 4725

Re: Convert cyrillic to PDU modem format for sending SMS

So good.
1. I have a working function to convert CP1251 to UTF-8.
2. You wrote a function to convert UTF-8 to UCS-2.
3. And then how?
by Sertik
Fri Jul 07, 2023 8:45 pm
Forum: Scripting
Topic: Convert cyrillic to PDU modem format for sending SMS
Replies: 31
Views: 4725

Re: Convert cyrillic to PDU modem format for sending SMS

Oh Rex, I'm sorry I didn't understand anything... Could you please explain to the teapot :D what should I do to send a text to CP1251 via SMS?
by Sertik
Fri Jul 07, 2023 12:47 pm
Forum: Scripting
Topic: Convert cyrillic to PDU modem format for sending SMS
Replies: 31
Views: 4725

Convert cyrillic to PDU modem format for sending SMS

Our Rextended has already written the wonderful conversion functions $gsm7topdu and $pdutogsm7 to convert code page 1252, if I understand correctly. And how could the text CP1251 (Cyrillic) be converted into PDU format for sending SMS in Russian? For good, we need a function for converting mixed tex...
by Sertik
Thu Jul 06, 2023 12:04 pm
Forum: Scripting
Topic: Function for time
Replies: 14
Views: 2668

Re: Function for time

Thanks !
by Sertik
Thu Jul 06, 2023 12:03 pm
Forum: Scripting
Topic: Function for time
Replies: 14
Views: 2668

Re: Function for time

Your wonderful piece of correct gmt-offset calculation { :local tzmin [/system clock get gmt-offset] :if ($tzmin > 0x7FFFFFFF) do={:set tzmin ($tzmin - 0x100000000)} :local tzsign "+" :if ($tzmin < 0) do={:set tzsign "-"; :set tzmin ($tzmin * -1)} :local tzstr [:pick "$tzsi...
by Sertik
Thu Jul 06, 2023 11:53 am
Forum: Scripting
Topic: Function for time
Replies: 14
Views: 2668

Re: Function for time

Thank you very much. Within what limits can the timeZone change (from 0 to 24 hours)?
by Sertik
Thu Jul 06, 2023 11:50 am
Forum: Scripting
Topic: Function for time
Replies: 14
Views: 2668

Re: Function for time

:global FuncEpochTime 
:global  FuncUnixTimeToFormat 
:local nowtime [$FuncEpochTime "nogmt" "Oct/26/2021"]
:log warning [$FuncUnixTimeToFormat $nowtime]
by Sertik
Thu Jul 06, 2023 11:50 am
Forum: Scripting
Topic: Function for time
Replies: 14
Views: 2668

Re: Function for time

The function of translating UnixTime into the usual date and time formats # the year is not limited to a century # usial [$FuncUnixTimeToFormat "timeStamp", "type"] # type: # "unspecified" - month/dd/yyyy <only> ((Mikrotik sheduller format) # 1 - yyyy/mm/dd hh:mm:ss # ...
by Sertik
Thu Jul 06, 2023 11:45 am
Forum: Scripting
Topic: Function for time
Replies: 14
Views: 2668

Re: Function for time

timeStamp calculation function # limited to 2000-2199 years # without parameters - returns timeStamp (UnixTime) # with $1 parameters - should gmt be taken into account or not # returns the UnixTime of this time point # if $2 is not set, the current date is taken from /system clock # if $3 is not se...
by Sertik
Thu Jul 06, 2023 11:40 am
Forum: Scripting
Topic: Function for time
Replies: 14
Views: 2668

Re: Function for time

I have such working functions, but I don't like them, because there is a feeling that they are not quite rationally written. Maybe I'll post them, and you look?
by Sertik
Thu Jul 06, 2023 11:38 am
Forum: Scripting
Topic: Function for time
Replies: 14
Views: 2668

Re: Function for time

Rex, do you have the functions ready?
by Sertik
Thu Jul 06, 2023 11:34 am
Forum: Scripting
Topic: Function for time
Replies: 14
Views: 2668

Re: Function for time

In fact, I need the functions of calculating UnixTime and translating UnixTime to a normal date and time.
by Sertik
Thu Jul 06, 2023 11:29 am
Forum: Scripting
Topic: Function for time
Replies: 14
Views: 2668

Re: Function for time

Let's say there is a UTC time and a date of the form 12:00:00 06/07/2023. It is necessary to take into account timeZone (for example Moscow +3.00)
by Sertik
Thu Jul 06, 2023 11:22 am
Forum: Scripting
Topic: Function for time
Replies: 14
Views: 2668

Function for time

Do we have a ready-made (already written) function for translating UTC time into time taking into account TimeZone for Ros 6 ? Probably two functions will be involved here - UnixTime calculations, TimeZone increments and the timeStamp translation function back to "human" time. Thank you.
by Sertik
Thu Jul 06, 2023 9:32 am
Forum: RouterBOARD hardware
Topic: GPS in Mikrotik
Replies: 41
Views: 6172

Re: GPS in Mikrotik

It's funny that the antenna and router are standing still, and the service shows movement at a speed of 1 to 5 km /h /system gps monitor date-and-time: nov/20/2003 06:32:31 latitude: 55.903083 longitude: 37.576866 altitude: 234.800003m speed: 3.148400 km/h destination-bearing: none true-bearing: 8.4...
by Sertik
Thu Jul 06, 2023 9:29 am
Forum: RouterBOARD hardware
Topic: GPS in Mikrotik
Replies: 41
Views: 6172

Re: GPS in Mikrotik

Yes, everything is fine. As soon as I put the dd co-combine format, it shows the correct values. Thanks ! /system gps monitor date-and-time: nov/20/2003 06:29:54 latitude: 55.902823 longitude: 37.576974 altitude: 219.000000m speed: 2.963200 km/h destination-bearing: none true-bearing: 349.899994 deg...
by Sertik
Thu Jul 06, 2023 9:22 am
Forum: RouterBOARD hardware
Topic: GPS in Mikrotik
Replies: 41
Views: 6172

Re: GPS in Mikrotik

Didn't understand why your mistake?
by Sertik
Thu Jul 06, 2023 9:10 am
Forum: RouterBOARD hardware
Topic: GPS in Mikrotik
Replies: 41
Views: 6172

Re: GPS in Mikrotik

Another question: why is the latitude value (5554.1746) correct, and the longitude (03734.6117) is reduced by an order of magnitude (an extra leading zero): /system gps monitor date-and-time: nov/19/2003 18:52:48 latitude: 5554.1746 longitude: 03734.6117 altitude: 207.199997m speed: 0.000000 km/h de...
by Sertik
Thu Jul 06, 2023 9:06 am
Forum: RouterBOARD hardware
Topic: GPS in Mikrotik
Replies: 41
Views: 6172

Re: GPS in Mikrotik

Thank you very much for all the tips and clarifications. They helped me a lot.
by Sertik
Wed Jul 05, 2023 9:53 pm
Forum: RouterBOARD hardware
Topic: GPS in Mikrotik
Replies: 41
Views: 6172

Re: GPS in Mikrotik

/system gps monitor date-and-time: nov/19/2003 18:52:48 latitude: 5554.1746 longitude: 03734.6117 altitude: 207.199997m speed: 0.000000 km/h destination-bearing: none true-bearing: 226.399994 deg. True magnetic-bearing: 226.399994 deg. Mag valid: yes satellites: 8 fix-quality: 1 horizontal-dilution...
by Sertik
Wed Jul 05, 2023 9:49 pm
Forum: RouterBOARD hardware
Topic: GPS in Mikrotik
Replies: 41
Views: 6172

Re: GPS in Mikrotik

/interface lte at-chat [find] input="AT!GPSSATINFO\?" output: Satellites in view: 19 * SV: 3 ELEV: 37 AZI: 146 SNR: 30 * SV: 4 ELEV: 79 AZI: 91 SNR: 35 * SV: 6 ELEV: 37 AZI: 268 SNR: 20 * SV: 7 ELEV: 19 AZI: 208 SNR: 20 * SV: 11 ELEV: 21 AZI: 317 SNR: 35 * SV: 16 ELEV: 23 AZI: 104 SNR: 38 ...
by Sertik
Wed Jul 05, 2023 9:14 pm
Forum: RouterBOARD hardware
Topic: GPS in Mikrotik
Replies: 41
Views: 6172

Re: GPS in Mikrotik

There is progress. As soon as I "threw the GPS antenna out the window" the GPS service worked fine.
Now I'm wondering the following:
why does /interface lte at-chat [find] input="AT!GPSSATINFO\?" gives out, say, 18 satellites, and the GPS service shows 6 satellites?
by Sertik
Wed Jul 05, 2023 2:36 pm
Forum: RouterBOARD hardware
Topic: GPS in Mikrotik
Replies: 41
Views: 6172

Re: GPS in Mikrotik

I use MikroTik ACGPSA antenna.
That is, the antenna really should "see the sky"? So it doesn 't work indoors ?
by Sertik
Wed Jul 05, 2023 11:36 am
Forum: RouterBOARD hardware
Topic: GPS in Mikrotik
Replies: 41
Views: 6172

Re: GPS in Mikrotik

Here 's what my modem gives out for the following commands: /interface lte at-chat [find] input="AT!GPSSTATUS\?" output: Current time: 2023 07 05 2 08:31:25 2023 07 05 2 08:30:10 Last Fix Status = FAIL, FAILCODE = 12 2023 07 05 2 05:57:04 Fix Session Status = ACTIVE No TTFF available OK /...
by Sertik
Tue Jul 04, 2023 11:52 am
Forum: RouterBOARD hardware
Topic: GPS in Mikrotik
Replies: 41
Views: 6172

Re: GPS in Mikrotik

I tried it on another RB - RBM33G and another modem - SIERRA 7710. Previously, using the AT command, I turn on the GPS on the modem. The same result - the functionality is turned on, there is no data. The functionality is enabled on USB3 port 2, on others it simply does not work from the word at all...
by Sertik
Fri Jun 30, 2023 10:47 am
Forum: Scripting
Topic: New data type in Mikrotik RouterOS
Replies: 19
Views: 3239

Re: New data type in Mikrotik RouterOS

Lesson 1) MIKROTIK DO NOT HAVE POINTER. If on the past pointer work, is only one error and is "fixed". op..."only pointer" ? Probably is only for point data inside complex array without everytime specify full path... You see, Rex, Microtik RouterOS is full of surprises. So it tu...
by Sertik
Tue Jun 27, 2023 4:31 pm
Forum: Scripting
Topic: New data type in Mikrotik RouterOS
Replies: 19
Views: 3239

Re: New data type in Mikrotik RouterOS

Exactly.
by Sertik
Tue Jun 27, 2023 3:53 pm
Forum: Scripting
Topic: New data type in Mikrotik RouterOS
Replies: 19
Views: 3239

Re: New data type in Mikrotik RouterOS

Yes, that's for sure. You are a perfectionist in the best possible way. However, code optimization is essentially an endless process and takes a lot of time and effort. Especially time. There are certain scales here: the quality and quantity of what is written. If Microsoft had optimized their code ...
by Sertik
Tue Jun 27, 2023 3:39 pm
Forum: Scripting
Topic: New data type in Mikrotik RouterOS
Replies: 19
Views: 3239

Re: New data type in Mikrotik RouterOS

It’s a pity I can’t check it now, but since Rex writes, it means it definitely works.
by Sertik
Tue Jun 27, 2023 3:31 pm
Forum: Scripting
Topic: New data type in Mikrotik RouterOS
Replies: 19
Views: 3239

Re: New data type in Mikrotik RouterOS

Of course not. It was preserved in the topic we are discussing on a complex array. :)
by Sertik
Tue Jun 27, 2023 3:26 pm
Forum: Scripting
Topic: New data type in Mikrotik RouterOS
Replies: 19
Views: 3239

Re: New data type in Mikrotik RouterOS

op..."only pointer" ? Well, thank you very much! It turns out that you can use this to reduce the pointer to an array element. One could test on a complex nested associative array like in this thread: https://forum.mikrotik.com/viewtopic.php?t=191832 :global ArrayIN { "alertList"...
by Sertik
Tue Jun 27, 2023 2:55 pm
Forum: Scripting
Topic: prevent the script from running if it is already running
Replies: 6
Views: 2610

Re: prevent the script from running if it is already running

until you manually remove the flag...
or the script itself. Thank you very much, Rex, I got it.
by Sertik
Tue Jun 27, 2023 9:35 am
Forum: Scripting
Topic: prevent the script from running if it is already running
Replies: 6
Views: 2610

Re: prevent the script from running if it is already running

Rex, I'm sorry I didn't answer right away. Some circumstances distracted me. Thank you for the code. I never thought that this is how you can solve the problem. One more question, if I may. But what if you need to block from restarting not a script, but a function? After all, when the function works...
by Sertik
Fri Jun 23, 2023 10:45 pm
Forum: Scripting
Topic: prevent the script from running if it is already running
Replies: 6
Views: 2610

prevent the script from running if it is already running

The topic was probably discussed, but I want a short and beautiful solution. How to prevent a script from running if it is already running?
In this case, the executable script itself must perform the check.
by Sertik
Fri Jun 23, 2023 3:58 pm
Forum: Scripting
Topic: Switching between Wireguard Interface (random) [SOLVED]
Replies: 5
Views: 2783

Re: Switching between Wireguard Interface (random) [SOLVED]

/ip firewall nat set [find where comment~"extWG"] out-interface=([/interface wireguard find where disabled=no]->0) ([/interface wireguard find where disabled=no]->0) ? Why use ->0 ? Why not /ip firewall nat set [find where comment~"extWG"] out-interface=[/interface wireguard fin...
by Sertik
Fri Jun 23, 2023 11:22 am
Forum: Scripting
Topic: New data type in Mikrotik RouterOS
Replies: 19
Views: 3239

Re: New data type in Mikrotik RouterOS

They just can't buy Rex. :D
by Sertik
Fri Jun 23, 2023 9:32 am
Forum: Scripting
Topic: New data type in Mikrotik RouterOS
Replies: 19
Views: 3239

Re: New data type in Mikrotik RouterOS

No, I think the developers of ROS will not fix it. There is an opinion that they are generally afraid to touch anything in the script part of ROS. Or they have no time. After all, the development of new routers is more important and more profitable than picking at software. Perhaps they no longer ha...
by Sertik
Thu Jun 22, 2023 1:39 pm
Forum: Scripting
Topic: Log Filter
Replies: 66
Views: 9413

Re: Log Filter

So I want him to please us even more.
by Sertik
Thu Jun 22, 2023 1:03 pm
Forum: Scripting
Topic: Log Filter
Replies: 66
Views: 9413

Re: Log Filter

After all, others might want to, but they can't, but you can.
Well, everyone wants to be happy, but since the time of Adam and Eve, no one has yet succeeded.
by Sertik
Thu Jun 22, 2023 1:02 pm
Forum: Scripting
Topic: Log Filter
Replies: 66
Views: 9413

Re: Log Filter

I already have my own company and working for others is out of the question. Being a programmer for work is much more stressful than being an ISP... Filling my free time with other jobs is out of the question, I don't want to be rich, I want to be happy... It's not about that at all. I'm not sugges...
by Sertik
Thu Jun 22, 2023 12:52 pm
Forum: Scripting
Topic: New data type in Mikrotik RouterOS
Replies: 19
Views: 3239

Re: New data type in Mikrotik RouterOS

The topic is not open at all as useless. Thus, more people will learn about the new type of data available in Microtik Routers, and where this information was first mentioned, few people will find it. It's like a nuclear weapon - it's important that everyone knows about it and no one uses it quietly...
by Sertik
Wed Jun 21, 2023 4:34 pm
Forum: Scripting
Topic: New data type in Mikrotik RouterOS
Replies: 19
Views: 3239

Re: New data type in Mikrotik RouterOS

I have not yet reached the hands of a deep study of this type of variables. However, it is already clear that saving and restoring the code as well as the code of real functions does not work here. It's a pity !
by Sertik
Wed Jun 21, 2023 4:30 pm
Forum: Scripting
Topic: New data type in Mikrotik RouterOS
Replies: 19
Views: 3239

New data type in Mikrotik RouterOS

Recently Fludorkin discovered a new data type in Mikrotik - "OP": by flydvorkin » Sat Jun 17, 2023 1:46 am I found another lost data type: CODE: SELECT ALL :put [:typeof (>[])] Return: op this data type behaves like code Amm researched it a bit: :global optype (>[:global z "blah"...
by Sertik
Wed Jun 21, 2023 4:23 pm
Forum: Scripting
Topic: Log Filter
Replies: 66
Views: 9413

Re: Log Filter

By the way, why doesn't a programmer like you have serious big jobs? Not enough time? So you would take up the development of a universal graphics engine for Telegram bots on Mikrotik. It would be great.
by Sertik
Wed Jun 21, 2023 4:12 pm
Forum: Scripting
Topic: Log Filter
Replies: 66
Views: 9413

Re: Log Filter

There are probably errors, but the scripts are working. All their functions are performed. There is no big job without mistakes. And a clear example of this is RouterOS itself, in which errors are fixed from version to version, and they keep appearing and new ones appear ... What script did you pull...
by Sertik
Wed Jun 21, 2023 3:16 pm
Forum: Scripting
Topic: Log Filter
Replies: 66
Views: 9413

Re: Log Filter

In no way belittling the merits of our esteemed Rextended, we previously made the TLGRM system and TaRaN system, which allows not only to annotate messages in Telegram, but also to control Mikrotik from the chat https://forummikrotik.ru/viewtopic.php?f=14&t=12659 https://forummikrotik.ru/viewtop...
by Sertik
Tue Jun 20, 2023 9:32 am
Forum: RouterBOARD hardware
Topic: GPS in Mikrotik
Replies: 41
Views: 6172

Re: GPS in Mikrotik

Thank you so much for your detailed answer. I will try.
by Sertik
Tue Jun 20, 2023 12:35 am
Forum: RouterBOARD hardware
Topic: GPS in Mikrotik
Replies: 41
Views: 6172

Re: GPS in Mikrotik

It is interesting that after the commands

/interface lte at-chat lte1 input="AT^WPDST=1"
/interface lte at-chat lte1 input="AT^WPDGP"

and turning on GPS in the /ports tab opposite USB2, GPS appears for a few seconds, but then disappears.
by Sertik
Tue Jun 20, 2023 12:31 am
Forum: RouterBOARD hardware
Topic: GPS in Mikrotik
Replies: 41
Views: 6172

Re: GPS in Mikrotik

Did you try various value in data-channel= within the GPS settings?
Yes, I try.
Is the modem getting GPS readings via an AT command?
How to check it?
by Sertik
Mon Jun 19, 2023 11:22 pm
Forum: RouterBOARD hardware
Topic: GPS in Mikrotik
Replies: 41
Views: 6172

Re: GPS in Mikrotik

The firmware version of my modem is 12.636.11.01.00

Installed a MicroTik ACGPSA antenna. The functionality turns on, but in the GPS tab all the numbers are zero and there are no satellites found.
:(
by Sertik
Thu Jun 15, 2023 10:01 am
Forum: RouterBOARD hardware
Topic: GPS in Mikrotik
Replies: 41
Views: 6172

Re: GPS in Mikrotik

Fine. Thanks again.
by Sertik
Wed Jun 14, 2023 9:52 am
Forum: RouterBOARD hardware
Topic: GPS in Mikrotik
Replies: 41
Views: 6172

Re: GPS in Mikrotik

Thanks a lot, Amm0.
In Huawey modems, GPS output is enabled by the command "AT^WPDST=1,AT^WPDGP".
While I'm waiting for the GPS antenna to be delivered to me.
I'll try what you advised, I'll unsubscribe.
by Sertik
Tue Jun 13, 2023 5:08 pm
Forum: General
Topic: GPS with RouterOS 6.2X and Huawei ME909u-521
Replies: 1
Views: 1546

Re: GPS with RouterOS 6.2X and Huawei ME909u-521

Were you able to solve your problem?
  • 1
  • 2