Shop OBEX P1 Docs P2 Docs Learn Events
Teraterm question — Parallax Forums

Teraterm question

max72max72 Posts: 1,155
edited 2012-07-24 03:22 in General Discussion
I'm testing the WiFly module to remotely control the propeller.
I would like to be able to enter commands simply selecting a key. At the moment when I type in teraterm the text is forwarded only after a carriage return is sent.
Is there a workaround? I also tried Putty but it complains about the connection, even in raw mode, so this is not working at all.

Thanks in advance,
Massimo

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2012-07-17 08:05
    There should be an option that specifies when the terminal emulator sends a packet. Sometimes it may be a maximum number of characters or a line delimiter or a timeout. I don't use Teraterm, so I can't be specific, but I have a similar terminal emulator for the Mac that's configurable that way.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-07-17 08:47
    I suspect that you are collecting characters in a buffer and the CR releases them to save interrupts to the computer.

    If you can specify NO BUFFER, each character would be sent at once. Xterm or something else may work. There are lots of choices.

    http://en.wikipedia.org/wiki/List_of_terminal_emulators

    Something low level, like Termite may be better suited.

    http://www.compuphase.com/software_termite.htm

    Terminal is an old favorite for hobby work (With such a generic name is is difficult to search for, but it is excellent).

    https://sites.google.com/site/terminalbpp/
  • max72max72 Posts: 1,155
    edited 2012-07-17 10:45
    Thanks,
    I searched an option to directly sent the chars, but with no success.
    I tested the latest putty, and in raw data I can successfully access the wifly module, but it has the same behaviour of teraterm, and also in this case I cannot find the possibility to directly readdress the data.
    I'm connecting via TCP/IP, so Termite and friends are not a suitable solution. I tested locally with the parallax serial terminal and it worked, but when I moved to remote connection I found this unexpected problem.

    Massimo
  • max72max72 Posts: 1,155
    edited 2012-07-17 10:53
    A little update..
    it *almost* works with putty.

    There is an option called local line editing.
    Problem is I set the wifly password, and this setting is not compatible with local line editing off. So I have to start with "on", log in, and switch it to "off".
    With no password set there should be no problem.
    I think I'll try to code a kind of access control inside the propeller..

    Massimo
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-07-17 11:54
    The TCP/IP has an added latency in it that may be the source of all your woes. If that is the problem, there may not be much that can be resolved.

    It may all be involved in some design decisions about how large a packet should be before sent and only over-ridden for small packages with the CR.
  • prof_brainoprof_braino Posts: 4,313
    edited 2012-07-17 13:45
    When I type in teraterm, each character is sent immediately. The characters are echoed back by the application, and local echo is switched off (box not checked). The application on the other end, in my case propforth, buffers the characters unit a carriage return is entered.

    So as I'm seeing it, the character are being sent by teraterm, and its the application thats waiting for the carriage return. We have all the setting as default per the installation, except for baud. (and maybe send is CR instead of CR+LF, I forget).
  • max72max72 Posts: 1,155
    edited 2012-07-17 14:24
    prof_braino,
    what version do you have?
    From an unsolved thread it looks former version of Teratem had the instant behavior while more recent one are waiting for the end of line. To tell the truth the putty option name is not so intuitive, so maybe also in teraterm it is buried somewhere...

    Massimo
  • TubularTubular Posts: 4,706
    edited 2012-07-17 17:11
    I use Teraterm 4.7 and like Prof Braino says I've only ever known it to forward stuff immediately. Sometimes when using Serial<>Ethernet converters (over TCP/IP) the converters have a timeout for how long they wait before sending an assembled packet of a few characters. I couldn't find any such setting inside the Teraterm options.

    I would try some of the counter-intuitive settings (character delays) in case the WiFly is messing with the timing at its end. Are you 'pasting' the commands in, or typing them one character at a time?
  • max72max72 Posts: 1,155
    edited 2012-07-18 05:21
    Ok, I think I got it sorted, at least partially.
    Wifly password login requires to send the full string at once, otherwise you get error.
    I disabled password control and I implemented it in the propeller.
    I saved the password in the upper 32k eeprom memory, together with some parameters, so It is persistent and configurable (with Wifly I disabled the remote configuration, so it is not possible to do it remotely).

    Teraterm keeps waiting for a carriage return and cannot change it. Putty accepts both options.
    Finally I tested with windows telnet. In this case the problem is the clear screen sequence I use it is not recognised.
    For the record Putty and Teraterm accept the following sequence:
       term.tx(27)
       term.tx(1)
       term.tx("c")
    

    Another nice point is the terminal can stay open while reprogramming..

    I'll try to upload some code and a little bit of summary on the forum.
    I have yet to update the slender propeller platform board variant in Tubular's PCB wiki, but I'll try to do both shortly.

    Massimo
  • prof_brainoprof_braino Posts: 4,313
    edited 2012-07-18 19:14
    I guess I have an older version 2010.2.20 (Ver 4.65)

    I don't use any passwords as the props are inside the firewall(s).

    I have the prop sending these ANSI codes for controlling the VT100 terminal emulation,

    http://propforth.googlecode.com/files/ANSI%20Escape%20Sequences20120704-1652.f

    and they work pretty well (the ones that didn't are commented out, but they should work, I got lazy).

    At least the ESC, Home, Clear, and most of the colors work.
  • max72max72 Posts: 1,155
    edited 2012-07-19 14:00
    Thanks, I'll try your code combination to clear the screen.
    I liked the idea access password was directly handled by the wifly, but a prop controlled login is even more flexible (can set timeout, change password..) and not so difficult to handle.
    Massimo
  • max72max72 Posts: 1,155
    edited 2012-07-24 03:22
    A little update:
    using prof_braino's escape combination clear screen now works also with windows telnet. Have yet to try with the android tablet but I guess at least a client will comply.
    Configuring a WiFly module I discovered that teraterm sends directly the chars when in serial mode, while it waits for the carriage return when connected in TCP/IP.
    For the record here is the spin code I adapted from propforth... have definitely to start learning forth..

    Thanks again,
    Massimo
    pri csi ' escape sequence
             term.tx(27)
             term.tx($5b)
    
    pri term_clear
             csi
             term.str(string("1;1f"))  ' home
             csi
             term.str(string("2J"))    ' clear
    
    
    pri term_red
           csi
           term.str(string("31m"))
    
    pri term_white
           csi
           term.str(string("37m"))
    
Sign In or Register to comment.