Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
STTY help
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
PQPGuy
n00b
n00b


Joined: 04 Sep 2017
Posts: 31

PostPosted: Fri Sep 29, 2017 4:11 pm    Post subject: STTY help Reply with quote

All,

I'm new to serial devices, and I want to migrate from a Windows-based serial terminal to either minicom or moserial. To do so, I need to mimic the settings of that Windows terminal. These settings are:

Flow Control Support: manual - RTS / DTR can be set or reset manually. CTS / DSR lines are displayed, but not used for synchronization. They are all unset, in my particular case.
Communication mode: Send/Receive
Baud rate: 115200
Parity: None
Parity Error Char: Ignore
Data Bits: 8
Stop Bits: 1

What is the coresponding stty command for this?

My serial device is FT232RL.

Many thx.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9883
Location: almost Mile High in the USA

PostPosted: Fri Sep 29, 2017 5:32 pm    Post subject: Reply with quote

You should set those parameters within minicom as minicom would overwrite any setting that you set.
In fact I think when the serial port is closed, many of the settings are reset...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54799
Location: 56N 3W

PostPosted: Fri Sep 29, 2017 8:31 pm    Post subject: Reply with quote

PQPGuy,

Your FT232RL is a USB to Serial converter. When your kernel support is in place, it will appear as /dev/ttyUSB*.
Normally, only root can set serial port parameters. Add yourself to the group that your /dev/ttyUSB* is in.
Here, its uucp.

Whatever the serial port is, set that up in minicom. Minicom will remember the settings.

Connect the serial port Tx and Rx lines together. This is called loopback.
Anything that you type into minicom will be echoed back to you.
Once that works, you can try talking to another device.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
PQPGuy
n00b
n00b


Joined: 04 Sep 2017
Posts: 31

PostPosted: Fri Sep 29, 2017 10:49 pm    Post subject: Reply with quote

eccerr0r, NeddySeagoon,

This is what confuses me. On Windows, the serial device works with these and only these settings (see above). Thus, the only choice, as I see it, is to mimic them in minicom which I don't know well enough.

Many thanks.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9883
Location: almost Mile High in the USA

PostPosted: Sat Sep 30, 2017 12:30 am    Post subject: Reply with quote

In minicom, you use command-o and then use arrow keys to select serial port setup.

The "command" sequence could be control-a, esc, or meta- (alt-) depending on how your minicom is set up. If you're running straight in an xterm, likely alt-o will work; but it may be control-a o, or esc o depending on your terminal or settings. You may be able to force using your meta key by starting minicom with -m .

In any case minicom will print out what mode it is when you first start it up, if it says "Press Meta-Z for help on special keys" and meta-z works, then you should be able to also use meta-o.

Now if you're running in gnu screen...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54799
Location: 56N 3W

PostPosted: Sat Sep 30, 2017 9:06 am    Post subject: Reply with quote

PQPGuy,

minicom won't start unless it can find your serial port.
Its start screen is
Code:
Welcome to minicom 2.7

OPTIONS: I18n
Compiled on Jun 12 2017, 18:19:11.
Port /dev/ttyUSB0

Press CTRL-A Z for help on special keys
CTRL-A Z (two separate keypresses shows
Code:
Welco+-------------------------------------------------------------------+
     |                      Minicom Command Summary                      |
OPTIO|                                                                   |
Compi|              Commands can be called by CTRL-A <key>               |
Port |                                                                   |
     |               Main Functions                  Other Functions     |
Press|                                                                   |
     | Dialing directory..D  run script (Go)....G | Clear Screen.......C |
     | Send files.........S  Receive files......R | cOnfigure Minicom..O |
     | comm Parameters....P  Add linefeed.......A | Suspend minicom....J |
     | Capture on/off.....L  Hangup.............H | eXit and reset.....X |
     | send break.........F  initialize Modem...M | Quit with no reset.Q |
     | Terminal settings..T  run Kermit.........K | Cursor key mode....I |
     | lineWrap on/off....W  local Echo on/off..E | Help screen........Z |
     | Paste file.........Y  Timestamp toggle...N | scroll Back........B |
     | Add Carriage Ret...U                                              |
     |                                                                   |
     |             Select function or press Enter for none.              |
     +-------------------------------------------------------------------+
Its playing at popup windows :)
You need
Code:
cOnfigure Minicom..O
so press 'o'
This gets you
Code:
             +-----[configuration]------+                                 
            | Filenames and paths      |                                 
            | File transfer protocols  |                                 
            | Serial port setup        |                                 
            | Modem and dialing        |                                 
            | Screen and keyboard      |                                 
            | Save setup as dfl        |                                 
            | Save setup as..          |                                 
            | Exit                     |                                 
            +--------------------------+

Down arrow to
Code:
Serial port setup
and press return/enter and you set all the things from your original post.
Code:
OPTI+-----------------------------------------------------------------------+
Comp| A -    Serial Device      : /dev/ttyUSB0                              |
Port| B - Lockfile Location     : /var/lock                                 |
    | C -   Callin Program      :                                           |
Pres| D -  Callout Program      :                                           |
    | E -    Bps/Par/Bits       : 115200 8N1                                |
    | F - Hardware Flow Control : Yes                                       |
    | G - Software Flow Control : No                                        |
    |                                                                       |
    |    Change which setting?                                              |
    +-----------------------------------------------------------------------+

You need entries A, E, F and G.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3489

PostPosted: Sat Sep 30, 2017 9:32 am    Post subject: Reply with quote

I personally found minicom very clunky. Fortunately, screen did the trick for me.
So you may want to try this:
screen /dev/ttyUSB0 115200
or something along the lines of this:
screen /dev/ttyUSB0 115200,cs8,-cstopb
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum