Community discussions

MikroTik App

Search found 38 matches

by bonnecomm
Thu May 04, 2023 12:44 am
Forum: Scripting
Topic: Can't concatenate variable and a string.?!
Replies: 9
Views: 4057

Re: Can't concatenate variable and a string.?!

Every language has its peculiarities. Java is very like C++. C++ is an extension of C so very similar. PHP has a very C-like syntax and uses much of the C library. It also borrows extensively from Java and C++. JavaScript is kind of similar to Java. Fortran, Cobol, and Forth are like nothing else, e...
by bonnecomm
Wed May 03, 2023 6:32 pm
Forum: Scripting
Topic: Can't concatenate variable and a string.?!
Replies: 9
Views: 4057

Re: Can't concatenate variable and a string.?!

Ok. Thanks.

Mikrotik scripting language is a strange beast, nothing like C, C++, C#, Java, PHP, JavaScript, Fortran, Cobol, Forth, 8086, M68k, 6800, TMS740, TMS720, 8051, or any of the other languages I know.
by bonnecomm
Tue May 02, 2023 9:28 pm
Forum: Scripting
Topic: Can't concatenate variable and a string.?!
Replies: 9
Views: 4057

Re: Can't concatenate variable and a string.?!

$q comes from the lines I didn't include in order to keep things concise to the problem: :local qid; :local qplan 0; :local qq; :local qpm; :foreach q in=[/queue simple find parent!=none] do={ The Queue names are things like V05_172.16.20.5, W03_172.16.20.14, H07_172.16.20.5, X10_172.16.20.15, B18_1...
by bonnecomm
Tue May 02, 2023 7:36 pm
Forum: Scripting
Topic: Can't concatenate variable and a string.?!
Replies: 9
Views: 4057

Can't concatenate variable and a string.?!

RouterOS 6.49.7 (stable) Here's what I'm trying to do: :set $qid [/queue simple get value-name=name $q]; :set $qq [:pick $qid 0 1]; :set $qplan [:pick $qid 1 3]; :set $qplan [:tonum $qplan]; :set $qpm [:tostr $qplan]."M"; :if ($qplan>0) do={ /queue simple set [find name=$qid] max-limit=&qu...
by bonnecomm
Wed Dec 08, 2021 12:56 am
Forum: Forwarding Protocols
Topic: Redirect HTTPS nicely
Replies: 2
Views: 2408

Redirect HTTPS nicely

I have client addresses mapped to 172.20.100.0/22. Every now and again, I want to redirect them, one at a time, to a server where they'll be asked to update their information. That server is at 172.21.100.4 As an example, I have /ip firewall nat chain=dstnat src-address=172.20.100.8 action=dst-nat t...
by bonnecomm
Tue Jul 06, 2021 6:14 am
Forum: Scripting
Topic: How to determine if a setting is available
Replies: 3
Views: 1733

How to determine if a setting is available

This shouldn't be complicated but I'm not sure how to do this. I'm writing a script that reconfigures a variety of 5-port routers to how we actually use them, which is nothing like the default configuration. I want one part of the script to work like this: IF ether3 has poe-out available, set poe-ou...
by bonnecomm
Fri Sep 04, 2020 6:17 pm
Forum: Scripting
Topic: -> doesn't work?!
Replies: 2
Views: 1069

Re: -> doesn't work?!

That works! Corrected script: { :local todate [/system clock get date]; # $day is a string. It may have a preceeding 0. :local day [:tonum [:pick $todate 4 6]]; # $month = 3-letter month name; $mon = month number. :local months {"jan";"feb";"mar";"apr";"m...
by bonnecomm
Thu Sep 03, 2020 8:07 am
Forum: Scripting
Topic: -> doesn't work?!
Replies: 2
Views: 1069

-> doesn't work?!

Here is my script: { :local todate [/system clock get date]; # $day is a string. It may have a preceeding 0. :local day [:tonum [:pick $todate 4 6]]; # $month = 3-letter month name; $mon = month number. :local months ("jan","feb","mar","apr","may",&q...
by bonnecomm
Sun Jan 12, 2020 5:38 pm
Forum: Scripting
Topic: A different kind of hotspot
Replies: 0
Views: 2367

A different kind of hotspot

I need something different than the usual hotspot and I'm having difficulty figuring how to do it. This is going into a seasonal trailer park. Currently clients arrive in the spring, power up their CPE, call us up to tell us they have no internet, we then ask what the last day of their intended stay...
by bonnecomm
Wed Apr 03, 2019 2:31 am
Forum: Useful user articles
Topic: USB Outdoor temperature sensor
Replies: 17
Views: 26223

USB Outdoor temperature sensor

I want a temperature sensor that can plug into the USB port on an RB750UP and allow me to, via a script, read the temperature. Primarily, I want to read the temperature inside the equipment shed at a remote tower to make sure it hasn't gotten too cold (meaning the heater is busted) or too hot (meani...
by bonnecomm
Thu Aug 30, 2018 8:51 pm
Forum: General
Topic: What's wrong with the rb750r2??
Replies: 30
Views: 16272

Re: What's wrong with the rb750r2??

I managed to solved the dead LED issue by going to the /system LED menu and creating entries for each LED on each ether and setting the type to interface activity.
by bonnecomm
Thu Aug 30, 2018 8:39 pm
Forum: General
Topic: What's wrong with the rb750r2??
Replies: 30
Views: 16272

Re: What's wrong with the rb750r2??

I am having the same problem. I found this thread because the LEDs on one of the RB750r2s we got didn't light when in use. They light when the unit is powered up, but when you plug a cable into a port and a connection is made, they stay dark. On a second RB750r2, they behaved the way they did on the...
by bonnecomm
Sun May 14, 2017 12:22 am
Forum: Scripting
Topic: Quiet scripting
Replies: 5
Views: 1668

Re: Quiet scripting

I suppose I could do that, have a script with ugly output run once a minute and set the globals I need, and then grab the globals from the script that is called by SSH. That might be the only workable solution. Thanks for the idea.
by bonnecomm
Sat May 13, 2017 11:41 pm
Forum: Scripting
Topic: Quiet scripting
Replies: 5
Views: 1668

Re: Quiet scripting

What you gave me gives me the exact same problem I was complaining about. /system script run script1 name: ether1 rx-packets-per-second: 244 rx-bits-per-second: 232.1kbps rx-drops-per-second: 0 rx-errors-per-second: 0 tx-packets-per-second: 32 tx-bits-per-second: 38.0kbps tx-drops-per-second: 0 tx-e...
by bonnecomm
Wed May 10, 2017 6:09 am
Forum: Scripting
Topic: Quiet scripting
Replies: 5
Views: 1668

Quiet scripting

I haven't had this problem before so I'm asking for a bit of help. Here's my script so far: :local tx; :local rx; /interface monitor [/interface find name="ether1"] once do={ :set tx $"tx-bits-per-second"; :set rx $"rx-bits-per-second" }; put "{\tTxRate: $tx,\r\n\t...
by bonnecomm
Thu Dec 31, 2015 11:48 pm
Forum: General
Topic: Supported UPS`s
Replies: 53
Views: 49254

Re: Supported UPS`s

We've just connected a Back-UPS RS 1500G with AVR and it is working with RouterOS 5.26.
by bonnecomm
Tue Sep 08, 2015 9:02 pm
Forum: Wireless Networking
Topic: WPS & Mikrotik
Replies: 13
Views: 39769

Re: WPS & Mikrotik

I'm trying to hook up a Ubiquiti mPower bar. WPS is the only thing the mPower bar understands. I'm running an RB751U-2Hnd with routeros 5.26.
by bonnecomm
Tue Dec 10, 2013 7:01 am
Forum: Scripting
Topic: Generating a chart and sending it
Replies: 2
Views: 1558

Re: Generating a chart and sending it

I realised last night as I nodded off to sleep that I could run the script and replace the put instruction with a fetch instruction which would then send the data to a web-server script which would then store it into a database for me, which is where I want it to end up anyways. I had also thought a...
by bonnecomm
Sat Dec 07, 2013 5:31 am
Forum: Scripting
Topic: Generating a chart and sending it
Replies: 2
Views: 1558

Generating a chart and sending it

I have this simple script6 which works: :local i :foreach i in=[/queue simple find name!="AllQueues"] do={:put ( "IP: " . [/queue simple get $i target-addresses] . "\tBytes: " . [/queue simple get $i bytes] . "\t");} It generates a chart with the target-addres...
by bonnecomm
Sat Aug 11, 2012 6:59 am
Forum: General
Topic: Another issue with RB750, RB751 G/U
Replies: 1
Views: 1141

Re: Another issue with RB750, RB751 G/U

I have one RB750 and two RB751U. Got the RB750 first with it running 5.14. Eth1 was WAN with Eth2 through Eth5 being on a bridge with a wire going to each room. Powered by the brick it came with. No PoE. It ran great for 3 months. Then it just suddenly, for no apparent reason, stopped working on Eth...
by bonnecomm
Sat Aug 11, 2012 6:32 am
Forum: General
Topic: eht1 port shuts down
Replies: 14
Views: 6403

Re: eht1 port shuts down

I have had exactly the same problem with an RB750, and a pair of RB751s. I do not use PoE injectors but use the external power supply.
by bonnecomm
Thu Apr 26, 2012 11:55 pm
Forum: MikroTik hardware questions
Topic: RouterBoard USB port not active?
Replies: 48
Views: 37152

Re: RouterBoard USB port not active?

After some delays, the RB493G is installed with its Vantec Go-2.0 USB hub. And it kind-of talks to the new APC Back-UP ES 750. The only thing it is actually able to see is the Serial Number: 4B1023P45521. However, while installing the box in its new home, I took my EeePC 901 Netbook with me. The net...
by bonnecomm
Wed Apr 25, 2012 11:13 pm
Forum: Beginner Basics
Topic: Bridge with NAT reflection.
Replies: 2
Views: 1720

Re: Bridge with NAT reflection.

Did as you said and set "Use IP Firewall" to the bridge settings.

Added the NAT below as well.
/ip firewall nat print
0 chain=dstnat action=netmap to-addresses=172.16.2.2 dst-address=69.165.166.46
Still not working.
by bonnecomm
Wed Apr 25, 2012 9:15 pm
Forum: Beginner Basics
Topic: Bridge with NAT reflection.
Replies: 2
Views: 1720

Bridge with NAT reflection.

We have an RB450G with rOS 5.14 sitting between our 24-port switch and the wireless connection to the next building where we have another RB450G acting as our internet gateway and firewall. The switch is on Ether5 and the wireless connection is on Ether4 and the two are ports on bridge1 . In order t...
by bonnecomm
Tue Apr 24, 2012 7:16 pm
Forum: MikroTik hardware questions
Topic: RouterBoard USB port not active?
Replies: 48
Views: 37152

Re: RouterBoard USB port not active?

Mine is a Vantec Go-2.0 powered USB hub. The APC I tried it with is an older one. I'll be trying it with a new APC tomorrow. I'll post on that after I'm done.
by bonnecomm
Fri Apr 20, 2012 2:38 am
Forum: MikroTik hardware questions
Topic: RouterBoard USB port not active?
Replies: 48
Views: 37152

Re: RouterBoard USB port not active?

Never mind. I tried it with the powered USB hub and then it worked. I guess that's my solution.
by bonnecomm
Fri Apr 20, 2012 2:33 am
Forum: MikroTik hardware questions
Topic: RouterBoard USB port not active?
Replies: 48
Views: 37152

Re: RouterBoard USB port not active?

[quote="Radek"]Janis: I tryed to add new ups trough Terminal. Now I was succesfull. But I can't still change the port. I can see only choice serial0 despite of USB in menu System Resources is printed. Have I to set up the USB? There is possible to see the possibilities for setup. I am havi...
by bonnecomm
Tue Apr 10, 2012 5:54 am
Forum: Scripting
Topic: Fetch Command - HTTP Upload
Replies: 3
Views: 2687

Re: Fetch Command - HTTP Upload

That's an HTTP GET. The question was about an HTTP POST. And the answer appears to be, no, it can GET but not POST.
by bonnecomm
Sat Feb 18, 2012 4:32 am
Forum: General
Topic: downgrade/back to 4.x
Replies: 12
Views: 6811

Re: downgrade/back to 4.x

I'm using an RB450G. Version 5.13 seems to have bug in MLPPP where one line connects with 8 connections and the remaining 4 don't connect at all. I thought I'd try 4.17 just in case.

I opened a new terminal and typed in "/system package downgrade" and it worked fine.
by bonnecomm
Sat Apr 02, 2011 1:46 pm
Forum: General
Topic: PCQ and MultiWAN
Replies: 0
Views: 733

PCQ and MultiWAN

Here's my situation: I have 300 users and I want to set up a system where the MT will do the following: 1) auto-generate an outbound/inbound queue for each active user 2) load-balance all of the users so that none is hogging the bandwidth. 3) split the outbound traffic into 2 so that it can be load-...
by bonnecomm
Thu Oct 22, 2009 7:49 pm
Forum: General
Topic: 1:1 NAT set up?
Replies: 1
Views: 1041

1:1 NAT set up?

I'm trying to set up a 1:1 NAT for a single client. Their LAN IP address is 192.168.102.109. Their public IP address is 69.165.166.225. In Firewall-NAT, I've set the following: Chain: dstnat dst address: 69.165.166.225 in.Interface: pppoe-out1 action: dst-nat To Addresses: 192.168.102.109 Chain: src...
by bonnecomm
Fri Jul 03, 2009 2:43 am
Forum: Wireless Networking
Topic: Building a repeater by bridging wlan1 and wlan2
Replies: 9
Views: 3777

Re: Building a repeater by bridging wlan1 and wlan2

So here's how it's set up: Security profile is set up. wlan2 is set to station pseudobrdige. bridge1 is created. ether1 is added to bridge1 wlan2 is added to bridge1 IP address is added to bridge1. Tweaking a bit of the security profile finally gets wlan2 to connect. Yes, it works. wlan1 is set to a...
by bonnecomm
Thu Jul 02, 2009 4:47 pm
Forum: Wireless Networking
Topic: Building a repeater by bridging wlan1 and wlan2
Replies: 9
Views: 3777

Re: Building a repeater by bridging wlan1 and wlan2

Thanks,

That looks to be exactly what I'm looking for. I'll give it a try and let you know how well it works.
by bonnecomm
Wed Jun 24, 2009 5:40 pm
Forum: Wireless Networking
Topic: WR: 304km with RouterOS + XR5 + handmade antenna
Replies: 78
Views: 74094

Re: WR: 304km with RouterOS + XR5 + handmade antenna

WOW! That is just amazing! I am very much impressed.
by bonnecomm
Wed Jun 24, 2009 5:21 pm
Forum: Wireless Networking
Topic: Building a repeater by bridging wlan1 and wlan2
Replies: 9
Views: 3777

Re: Building a repeater by bridging wlan1 and wlan2

I already looked at that before my first post. It describes what you were describing in your previous email, creating a bridge from 2 radios, an interesting concept for sure. I'm just trying to create a bridge across one board.
by bonnecomm
Wed Jun 24, 2009 8:29 am
Forum: Wireless Networking
Topic: Building a repeater by bridging wlan1 and wlan2
Replies: 9
Views: 3777

Re: Building a repeater by bridging wlan1 and wlan2

The head-end is not Mikrotik and I'm not about to change a dozen radios up there to make this work.

The head-end is using just normal 802.11a radios in AP mode which bridge between their radio and ethernet sides. To be precise, the one I want to connect to happens to be a Tranzeo TR5PLUS.
by bonnecomm
Tue Jun 23, 2009 8:21 pm
Forum: Wireless Networking
Topic: Building a repeater by bridging wlan1 and wlan2
Replies: 9
Views: 3777

Building a repeater by bridging wlan1 and wlan2

I'm trying to build a repeater station. My unit has 2 wireless cards, wlan1 and wlan2. wlan2 is the backhaul radio which connects to the head-end. wlan1 is the AP which clients are suppose to connect to. eth1 is the ethernet port which the person hosting the repeater station can use to surf the inte...
by bonnecomm
Sat May 30, 2009 9:26 am
Forum: Beginner Basics
Topic: Channel Bonding !!!!!
Replies: 8
Views: 3431

Re: Channel Bonding !!!!!

if the ISP supports it, you could use MLPPP: http://forum.mikrotik.com/viewtopic.php?f=13&t=30559&p=150448& RouterOS MLPPP There is now Multilink PPP support in PPPoE client, starting with v3.10. PPPoE client “interface” property has been changed to “interfaces”, and new property in sta...