Telnet wrapping lines
![](https://secure.gravatar.com/avatar/e0114f22fcde3deed8ebe94c70652140.jpg?s=120&d=mm&r=g)
I'm using twisted.conch.telnet to send commands to a switch, and the output is coming back with newlines added after the 80th character. It doesn't do that if I log in to the switch interactively. Is there some configuration setting in the telnet protocol that I haven't found, to stop it doing this? thanks, Peter.
![](https://secure.gravatar.com/avatar/eba6eb871de2549c7447a8701352cd35.jpg?s=120&d=mm&r=g)
Hi On Tue, 15 Feb 2022 at 15:47, Peter Westlake <peter.westlake@pobox.com> wrote:
I'm using twisted.conch.telnet to send commands to a switch, and the output is coming back with newlines added after the 80th character. It doesn't do that if I log in to the switch interactively. Is there some configuration setting in the telnet protocol that I haven't found, to stop it doing this?
I am not sure what "log in to the switch interactively" really means :) Since this is telnet, I guess that you can capture the communication between and you and the switch and see what are the differences. Cheers -- Adi Roiban
![](https://secure.gravatar.com/avatar/e0114f22fcde3deed8ebe94c70652140.jpg?s=120&d=mm&r=g)
On Tue, 15 Feb 2022, at 17:49, Adi Roiban wrote:
"telnet switchname" at the Linux command line, instead of running my Twisted program.
Since this is telnet, I guess that you can capture the communication between and you and the switch and see what are the differences.
I'll try. But even if I find it, it will be Twisted sending the different messages, and I'll still need to know how to stop it wrapping. Peter.
![](https://secure.gravatar.com/avatar/607cfd4a5b41fe6c886c978128b9c03e.jpg?s=120&d=mm&r=g)
On Tue, Feb 15, 2022 at 1:42 PM Peter Westlake <peter.westlake@pobox.com> wrote:
In general, Telnet has a lot of negotiable features. It's not too likely that Twisted's telnet implementation and telnet(1) negotiate exactly the same features right out of the box. If you figure out what telnet(1) and this switch are negotiating then it will probably be fairly straightforward to convince your Twisted code to behave the same way (application-controllable feature negotiation is one of the main features of twisted.conch.telnet).
![](https://secure.gravatar.com/avatar/e0114f22fcde3deed8ebe94c70652140.jpg?s=120&d=mm&r=g)
On Tue, 15 Feb 2022 at 15:47, Peter Westlake <peter.westlake@pobox.com> wrote:
I'm using twisted.conch.telnet to send commands to a switch, and the output is coming back with newlines added after the 80th character. It doesn't do that if I log in to the switch interactively. Is there some configuration setting in the telnet protocol that I haven't found, to stop it doing this?
Update: in the end it turned out to be a badly-documented property of the switch itself. Telnet was passing everything through faithfully. Peter.
![](https://secure.gravatar.com/avatar/e1554622707bedd9202884900430b838.jpg?s=120&d=mm&r=g)
On Feb 17, 2022, at 10:37 AM, Peter Westlake <peter.westlake@pobox.com> wrote:
Update: in the end it turned out to be a badly-documented property of the switch itself. Telnet was passing everything through faithfully.
Thanks for following up! It’s always a bummer when a bug report like this becomes accidental folk knowledge, like “sometimes Twisted does X wrong, nobody knows why”, so hearing that it wasn’t actually a bug is very helpful. -g
![](https://secure.gravatar.com/avatar/eba6eb871de2549c7447a8701352cd35.jpg?s=120&d=mm&r=g)
Hi On Tue, 15 Feb 2022 at 15:47, Peter Westlake <peter.westlake@pobox.com> wrote:
I'm using twisted.conch.telnet to send commands to a switch, and the output is coming back with newlines added after the 80th character. It doesn't do that if I log in to the switch interactively. Is there some configuration setting in the telnet protocol that I haven't found, to stop it doing this?
I am not sure what "log in to the switch interactively" really means :) Since this is telnet, I guess that you can capture the communication between and you and the switch and see what are the differences. Cheers -- Adi Roiban
![](https://secure.gravatar.com/avatar/e0114f22fcde3deed8ebe94c70652140.jpg?s=120&d=mm&r=g)
On Tue, 15 Feb 2022, at 17:49, Adi Roiban wrote:
"telnet switchname" at the Linux command line, instead of running my Twisted program.
Since this is telnet, I guess that you can capture the communication between and you and the switch and see what are the differences.
I'll try. But even if I find it, it will be Twisted sending the different messages, and I'll still need to know how to stop it wrapping. Peter.
![](https://secure.gravatar.com/avatar/607cfd4a5b41fe6c886c978128b9c03e.jpg?s=120&d=mm&r=g)
On Tue, Feb 15, 2022 at 1:42 PM Peter Westlake <peter.westlake@pobox.com> wrote:
In general, Telnet has a lot of negotiable features. It's not too likely that Twisted's telnet implementation and telnet(1) negotiate exactly the same features right out of the box. If you figure out what telnet(1) and this switch are negotiating then it will probably be fairly straightforward to convince your Twisted code to behave the same way (application-controllable feature negotiation is one of the main features of twisted.conch.telnet).
![](https://secure.gravatar.com/avatar/e0114f22fcde3deed8ebe94c70652140.jpg?s=120&d=mm&r=g)
On Tue, 15 Feb 2022 at 15:47, Peter Westlake <peter.westlake@pobox.com> wrote:
I'm using twisted.conch.telnet to send commands to a switch, and the output is coming back with newlines added after the 80th character. It doesn't do that if I log in to the switch interactively. Is there some configuration setting in the telnet protocol that I haven't found, to stop it doing this?
Update: in the end it turned out to be a badly-documented property of the switch itself. Telnet was passing everything through faithfully. Peter.
![](https://secure.gravatar.com/avatar/e1554622707bedd9202884900430b838.jpg?s=120&d=mm&r=g)
On Feb 17, 2022, at 10:37 AM, Peter Westlake <peter.westlake@pobox.com> wrote:
Update: in the end it turned out to be a badly-documented property of the switch itself. Telnet was passing everything through faithfully.
Thanks for following up! It’s always a bummer when a bug report like this becomes accidental folk knowledge, like “sometimes Twisted does X wrong, nobody knows why”, so hearing that it wasn’t actually a bug is very helpful. -g
participants (4)
-
Adi Roiban
-
Glyph
-
Jean-Paul Calderone
-
Peter Westlake