View previous topic :: View next topic |
Author |
Message |
PQPGuy n00b
Joined: 04 Sep 2017 Posts: 31
|
Posted: Fri Sep 29, 2017 4:11 pm Post subject: STTY help |
|
|
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 |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9883 Location: almost Mile High in the USA
|
Posted: Fri Sep 29, 2017 5:32 pm Post subject: |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54799 Location: 56N 3W
|
Posted: Fri Sep 29, 2017 8:31 pm Post subject: |
|
|
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 |
|
|
PQPGuy n00b
Joined: 04 Sep 2017 Posts: 31
|
Posted: Fri Sep 29, 2017 10:49 pm Post subject: |
|
|
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 |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9883 Location: almost Mile High in the USA
|
Posted: Sat Sep 30, 2017 12:30 am Post subject: |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54799 Location: 56N 3W
|
Posted: Sat Sep 30, 2017 9:06 am Post subject: |
|
|
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 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 |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3489
|
Posted: Sat Sep 30, 2017 9:32 am Post subject: |
|
|
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 |
|
|
|