Community discussions

MikroTik App
 
OKNET
Member
Member
Topic Author
Posts: 354
Joined: Mon Jun 22, 2015 9:22 am

Terminal paste issue

Tue Jul 11, 2023 6:34 pm

I met a strange behavior in copying configuration text from a notepad TXT file and paste into winbox terminal windows (right click-paste) in ros 7.10.1 :
pasted text put in and out safe mode, often random characters are displayed, causing bad command name.
All is fine pasting the same text (from windows clipboard) into a telnet session.

Any idea ?
Thanks.
 
User avatar
TomjNorthIdaho
Forum Guru
Forum Guru
Posts: 1493
Joined: Mon Oct 04, 2010 11:25 pm
Location: North Idaho
Contact:

Re: Terminal paste issue

Tue Jul 11, 2023 8:29 pm

I met a strange behavior in copying configuration text from a notepad TXT file and paste into winbox terminal windows (right click-paste) in ros 7.10.1 :
pasted text put in and out safe mode, often random characters are displayed, causing bad command name.
All is fine pasting the same text (from windows clipboard) into a telnet session.

Any idea ?
Thanks.
If you are pasting large/huge amounts of text into any network device ( via telnet or ssh ) , consider using Terra-Term.
Terra-Term has two optional delay options
- Delay time between characters when pasting
- Delay time after a carrage-retrun / line-feed when pasting
* When using Terra-Term with both paste delay options , i've been able to paste in 64-thousand lines of code/text/data and not loose anything and not overrun any input buffers on the device I am pasting into.

North Idaho Tom Jones
 
OKNET
Member
Member
Topic Author
Posts: 354
Joined: Mon Jun 22, 2015 9:22 am

Re: Terminal paste issue

Tue Jul 11, 2023 11:19 pm

Yes character and line delay is very useful in transferring many lines at a time (something like fast-typing by hand), however telnet/ssh is not the issue.

I always used to copy-paste from notepad to winbox terminal remotely and locally either, never had any problem.

This time I connected my HP notebook nic directly to an HAp-AX3 ethernet and got this behavior, either mac or IP connect, even just copying a single line.

I tried few reset-no default cfg without success.

Weird, really...
 
marko1982m
just joined
Posts: 9
Joined: Fri Aug 22, 2014 12:19 pm

Re: Terminal paste issue

Wed Jul 12, 2023 12:16 am

I have the same problem with copy/paste in Winbox with Notepad. Use notepad++.
 
User avatar
TomjNorthIdaho
Forum Guru
Forum Guru
Posts: 1493
Joined: Mon Oct 04, 2010 11:25 pm
Location: North Idaho
Contact:

Re: Terminal paste issue

Wed Jul 12, 2023 12:31 am

one of the problems with pasting into a cli on any device might be the following:
- each time there is a <CR> ( carriage return ) in the paste , the OS performs something and while it is in the process of performing something ( aka processing the command line , new paste data continues coming into the network device at the same time.
- when the network device is busy processing your pasted line up to the <CR> the CPU is doing something else which may cause a TCP/IP network buffer to start to fill up. If the CPU is unable to finish the last line <CR> while the buffer is filling up , then you can end up with dropped/missing data ( aka garbage ).

Thus this is one of the reasons I sometimes use the Terra-Term telnet/ssh program when pasting large amounts of data. The delay settings after each character ( I use 1 ms ) and the delay settings after a carriage-return/line-feed ( I use 30 ms ) , will pause the paste just long enough for the CPU to complete processing something and return to the TCP/IP input buffer prior to it filling up - thus no loss of data and no garbage.

North Idaho Tom Jones
 
fragtion
Member Candidate
Member Candidate
Posts: 260
Joined: Fri Nov 13, 2009 10:08 pm
Location: Johannesburg, South Africa

Re: Terminal paste issue

Wed Jul 12, 2023 2:05 am

I have the same problem with winbox and notepad. I don't see this issue with any other ssh/telnet client so the suggestions offered, while helpful in most cases, don't really apply here
 
User avatar
TomjNorthIdaho
Forum Guru
Forum Guru
Posts: 1493
Joined: Mon Oct 04, 2010 11:25 pm
Location: North Idaho
Contact:

Re: Terminal paste issue

Wed Jul 12, 2023 2:17 am

I have the same problem with winbox and notepad. I don't see this issue with any other ssh/telnet client so the suggestions offered, while helpful in most cases, don't really apply here
Re: ... don't really apply here ...

I assume you know you can ssh and/or telnet into a Mikrotik - so It sure does apply here ( especially when pasting thousands of lines into a Mikrotik - such as a NAT444 config to manage thousands of IPs across a dozen networks )
 
User avatar
pekr
Member Candidate
Member Candidate
Posts: 169
Joined: Tue Feb 22, 2005 9:05 pm
Location: Czech Republic
Contact:

Re: Terminal paste issue

Mon Aug 21, 2023 10:57 am

Bumping up this thread. This is beyond unbelievable - copy pasting from Notepad was NEVER a problem with ROS 6. Pasting ROS 6 config to ROS 7 console malforms the lines.

I always thought, that Notepad = clean text input / output and I am usually using it as a middle ground to copy paste across apps, and it always works. Not so with Mikrotik ROS 7 console.

And you know what? I have tried something completly crazy - I have copy pasted the config to MS Word. And man, it just works. MT should win some special prize for curing out the MS Word inefficiencies!

So plese, Mikrotik - could you fix this apparent buggy copy paste experince? And please, don't suggest using other editor apart from Notepad - you know, I've got the MS Word already :D

Might be read as funny experience, except it's not - there will be many ppl trying to get their config from ROS 6 to ROS 7 generation. We should make their experience easier, not the opposite.
 
User avatar
elvtechnology
just joined
Posts: 2
Joined: Tue Dec 26, 2023 5:31 pm
Location: Melbourne, AU
Contact:

Re: Terminal paste issue

Tue Dec 26, 2023 5:35 pm

Just wanted to add my experience here. Like the rest of you, I just ran into this issue with all sorts of weird behaviour as others have found.

I think you are jumping the gun to blame Mikrotik here. You know what else has had a lot of updates in recent months apart from RouterOS? Notepad has.

As much as I don't really use Notepad++, I just switched to it and the problems instantly went away.

Now I can't say for sure that is isn't a weird Winbox compatibility issue, but I do know for a fact that Notepad has had a tonne of updates (which I'm personally not a fan of, but that's a different issue) so at least for now just switch to Notepad++ when doing this kind of task.
 
kevinds
Long time Member
Long time Member
Posts: 651
Joined: Wed Jan 14, 2015 8:41 am

Re: Terminal paste issue

Fri Dec 29, 2023 12:18 pm

Try updating RouterOS

The last few versions had updates that specifically dealt with pasting large text with SSH, but I am not sure if the Terminal window is an SSH connection or Telnet.


*) ssh - fix error that caused large chunks of text not being pasted in their entirety into console;

*) ssh - improved connection stability when pasting large chunks of text into console;

Not sure how they define "large", but they did make improvements.
 
User avatar
patrikg
Member Candidate
Member Candidate
Posts: 262
Joined: Thu Feb 07, 2013 6:38 pm
Location: Stockholm, Sweden

Re: Terminal paste issue

Fri Dec 29, 2023 10:14 pm

And don't forget that you are using Windows and that using two characters for ending lines.
And unix/linux only uses one character for ending lines.

<CR> = Carriage return
<LF> = Line feed

For Windows
<CR><LF>
Ascii dec value 13,10

For Unix/Linux
<LF>
Ascii dec value 10

For Mac OS Ver < 10
<CR>
Ascii value dec 13

If you using relative newer versions of editor you can switch between thees 3 variants.
And then mark the text and copy and then paste. So you get the correct line endings with just <LF>.
 
LdB
Member Candidate
Member Candidate
Posts: 145
Joined: Thu May 20, 2021 4:23 pm

Re: Terminal paste issue

Sun Dec 31, 2023 4:43 am

It's actually got worse over time with new versions of winbox.
It has nothing to do with CR+LF because often you don't get anywhere near the right text or amount of it and appears to be a clipboard issue.

Using an SSH agent like putty and using that to paste text in seems to be better but I have still had issues with what seems to be font character differences.
 
OKNET
Member
Member
Topic Author
Posts: 354
Joined: Mon Jun 22, 2015 9:22 am

Re: Terminal paste issue

Thu Mar 21, 2024 12:24 pm

Ok , but once text is copied (from notepad, word, wordpad, etc. ) it gaves unwanted behavior online when pasted into winbox, all’ is fine via network connections like telnet or ssh,
Where is the real issue ??
 
kevinds
Long time Member
Long time Member
Posts: 651
Joined: Wed Jan 14, 2015 8:41 am

Re: Terminal paste issue

Thu Mar 21, 2024 2:08 pm

Using an SSH agent like putty and using that to paste text in seems to be better but I have still had issues with what seems to be font character differences.
You need to be copy/pasting from a plain text editor..

If you make " marks and it curls them to be pretty, it isn't going to work.

Who is online

Users browsing this forum: grryf and 27 guests