Community discussions

 
David1234
Forum Guru
Forum Guru
Topic Author
Posts: 1264
Joined: Sun Sep 18, 2011 7:00 pm

C# API - disable serial port

Wed Oct 03, 2018 7:50 pm

Helllo ,

I can;t seem to understadn why this command does't work:
mikrotik.Send("/port/remote-access/set");
mikrotik.Send("=port=serial0");
mikrotik.Send("disabled=yes" , true);
I have also try

?=
?
=.id=



any idea?

Thanks ,
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2411
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: C# API - disable serial port

Thu Oct 04, 2018 11:33 am

mikrotik.Send("/port/remote-access/set");
mikrotik.Send("=numbers=serial0");
mikrotik.Send("=disabled=true" , true);
In general:
1. Target items with "=numbers=".
2. Specify properties to be modified with "=", name of property, "=", value.
3. For Boolean values, use "true" and "false" instead of terminal's "yes" and "no".
PEAR2_Net_RouterOS(1.0.0b6) - My API client in PHP
(Rate my posts? If you want... no pressure...)
 
David1234
Forum Guru
Forum Guru
Topic Author
Posts: 1264
Joined: Sun Sep 18, 2011 7:00 pm

Re: C# API - disable serial port

Thu Oct 04, 2018 12:00 pm

Not working
mikrotik.Send("/port/remote-access/set");
            mikrotik.Send("=numbers=serial0");
            mikrotik.Send("=disabled=yes", true);
        "!trap=message=no such item"	string
but i did in the end is to get the .id of the serial - then use this.

so I will use this .

but very strange tht what you said didn't work...


Thanks any why (to make me think :-) )

Who is online

Users browsing this forum: No registered users and 12 guests