English Amiga Board Amiga Lore


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 05 April 2015, 19:46   #1
ovale
Registered User

 
Join Date: Jun 2014
Location: milan / italy
Posts: 137
remote shell howto

Hello, I tried to setup a remote shell but it doesn't work as expected.
Every enter introduces 2 empty lines. I can see the prompt but if I type Dir nothing is printed... But if I continue to press enter then the Dir output is printed one line at time and strangenesses like this.

My setup was: winuae 3.0, serial 0.0.0.0:1234, shared, putty as terminal, on the Amiga I have typed mount aux: and then newshell aux:

What is wrong? What is the correct setup?

Thanks!
ovale is offline  
AdSense AdSense  
Old 07 April 2015, 07:33   #2
Locutus
Registered User

 
Join Date: Jul 2014
Location: Finland
Posts: 725
Curious, this sounds like a flow control/line feed issue if it where a real serial line.

I use the TCP/IP Serial for generating debug output with a standard 9600 8n1 mode and i've not seen this before.

I dont know if the WinUAE TCPIP Serial port makes any assumptions or such on what serial mode is expected, can you check what your serial settings are in sys:Prefs/Serial?
Locutus is offline  
Old 07 April 2015, 08:37   #3
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,661
Sounds like CF/LF conversion problem. Check putty's CR/LF options. WinUAE won't do any conversions.
Toni Wilen is online now  
Old 10 April 2015, 21:07   #4
ovale
Registered User

 
Join Date: Jun 2014
Location: milan / italy
Posts: 137
Tried again but I don't understand what is going on.
Maybe this could give you some idea about what I'm doing wrong.

putty
- logging
- 'implicit CR in every LF' on
- 'Return key sends Telnet New Line instead of ^M' off
- 'local echo' force off
- 'local line editing' force off

winuae
- no shared
- no rts/cts
- no directt
- no uaeserial.device

amigaos
- 9600 baud
- 512B buffer
- handshaking xon/xoff (or none, seems it doesn't matter)
- parity none
- bits 8
- stop 1

>mount aux:
>copy s:startup-sequence aux:
correctly logged in putty with 0a as newline

>mount aux:
>copy aux: dh0:test
in 'test' every line (except the first) starts with 00 and ends with 0a
logged in putty without the initial 00 and 0a0d at the end


>mount aux:
>newshell aux:
putty logs 'New Shell process 1' 0a0d0f '1.System:> '
then I type 'dir' plus enter and putty logs 'dir' 0a0d
at this point nothing happens and only if I press repeately enter the output of command dir is presented

ovale is offline  
Old 15 April 2015, 17:03   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,661
Correct options are:

Return key sends Telnet New Line instead of ^M: off
Both "Implicit.." options: off

But it looks like there is PuTTY bug (or some weird telnet feature), if "Return key sends Telnet New Line instead of ^M" is not ticked and return is pressed, putty sends ascii codes $0a and $00, instead of single $0a (LF). Zero byte confuses Amiga's shell.

I could filter zero bytes in WinUAE side but it would break all binary transfers.
Toni Wilen is online now  
Old 18 April 2015, 15:00   #6
ovale
Registered User

 
Join Date: Jun 2014
Location: milan / italy
Posts: 137
Another test, this time with Telnet (win7).

winuae 3.0.0
- no shared
- no rts/cts
- no directt
- no uaeserial.device

amigaos KS 40.63, WB 40.42
- 9600 baud
- 512B buffer
- handshaking none
- parity none
- bits 8
- stop 1

telnet
- ctrl+] display
Il carattere di Escape è 'CTRL++'
Will auth (autenticazione ntlm)
Eco locale disattivato
Accesso client
File registro: d:\tn2.txt
Modalità nuova riga - Fa in modo che il tasto INVIO invii CR LF
Modem corrente: Flusso
Negozierà il tipo di terminale
Tipo di terminale preferito: ANSI

Test 1
>mount aux:
>copy aux: dh0:test
- d(enter)
-- is logged by winuae as 64 0a
-- is logged by telnet as 64 64 0a 0a
- (enter)
-- is logged by winuae as 0a 0a
-- is not logged by telnet

Test 2
- as with Putty after I type dir I have to press enter multiple times to see the output one line at time.
ovale is offline  
Old 18 April 2015, 15:54   #7
ovale
Registered User

 
Join Date: Jun 2014
Location: milan / italy
Posts: 137
Same results with WinUae 3.1.0b16
ovale is offline  
Old 19 April 2015, 10:19   #8
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,661
I can't get RETURN=$0A with Windows telnet (at least when using Windows 10 builds), it always sends $0a $0d

Code:
Microsoft Telnet> unset crlf
Line feed mode - Causes return key to send CR
Still $0a $0d.
Toni Wilen is online now  
Old 19 April 2015, 12:37   #9
ovale
Registered User

 
Join Date: Jun 2014
Location: milan / italy
Posts: 137
Yes you are right enter is logged as 0d 0a by telnet.
Sorry.

And with test2 I meant
>mount aux:
>newshell aux:
ovale is offline  
Old 19 April 2015, 13:18   #10
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,661
It seems I have to implement CR/LF <> CR translation option after all if all (Windows?) telnet programs are too broken..
Toni Wilen is online now  
Old 19 April 2015, 13:58   #11
ovale
Registered User

 
Join Date: Jun 2014
Location: milan / italy
Posts: 137
Do you think this will fix the strange shell behavior?
It looks like a buffering/ack problem to me.

I plan to install a virtual com: device and see if this happens only with the serial over telnet.
ovale is offline  
Old 19 April 2015, 14:14   #12
Locutus
Registered User

 
Join Date: Jul 2014
Location: Finland
Posts: 725
I know its probably far out of the standard usecase you support (understandably).

But connecting using standard Linux NetKit Telnet or Netcat and Konsole/urxvt always worked fine for me. I've never seen the issue described here.
Locutus is offline  
Old 19 April 2015, 15:45   #13
ovale
Registered User

 
Join Date: Jun 2014
Location: milan / italy
Posts: 137
Attempted to use com0com (http://sourceforge.net/projects/com0...d.zip/download) but WinUae doesn'r recognize the virtual COMs (Putty does)

@Locutus not sure to follow you, I'm not using Linux. On the same Windows7 machine I start WinUae and Telnet (or Putty) and I would like to connect the 2. Why? Because I would like to do cross development on PC using the virtual Amiga as target.
ovale is offline  
Old 19 April 2015, 15:55   #14
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,661
Quote:
Originally Posted by ovale View Post
WinUae doesn'r recognize the virtual COMs (Putty does)
It should, I confirmed it working with bluetooth virtual COM ports. Attach winuaebootlog.txt.
Toni Wilen is online now  
Old 19 April 2015, 16:44   #15
ovale
Registered User

 
Join Date: Jun 2014
Location: milan / italy
Posts: 137
Attached
Attached Files
File Type: txt winuaetemplog.txt (9.6 KB, 68 views)
ovale is offline  
Old 20 April 2015, 16:28   #16
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,661
com0com devices only appear if they are named COMx. Reason unknown because enumeration code simply asks Windows to return all devices that are GUID_DEVINTERFACE_COMPORT type.
Toni Wilen is online now  
Old 20 April 2015, 21:54   #17
ovale
Registered User

 
Join Date: Jun 2014
Location: milan / italy
Posts: 137
Confirmed.
Even COMxx doesn't work (e.g COM10 and COM11).

With com0com I'm able to connect WinUAE on one side and Putty on the other correctly.

Not sure how to fix the Telnet.
ovale is offline  
Old 24 April 2015, 20:13   #18
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,661
Does http://www.winuae.net/files/b/winuae.zip work with putty? Add "serial_translate=crlf_cr" to config file manually (without quotes) to enable translation.

Use "Direct" serial mode.
Toni Wilen is online now  
Old 26 April 2015, 17:50   #19
ovale
Registered User

 
Join Date: Jun 2014
Location: milan / italy
Posts: 137
It works!
ovale is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote C/C++ debugging? alkis Coders. C/C++ 1 03 January 2014 12:17
Shell help? madman support.Apps 5 24 June 2011 22:32
CDTV IR remote marty support.Hardware 4 23 February 2011 00:41
Clear background color for Shell window- Shell-StartUp fc.studio support.Apps 12 29 December 2009 14:21
Remote filesystems kenmo346 support.WinUAE 0 27 December 2002 06:31

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 18:50.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.25081 seconds with 12 queries