28

I'm using minicom to connect through a serial link to a target (UART link of a sparc processor). With gtkterm or cutecom, I can connect, read and send characters. The only issue with them is that they both insert empty lines after each LF character, and : -gtkterm cannot record output to a file -cutecom does not "flush" after recording output to a file (it gets delayed, and flushed only after every 16k bunch of data)

Minicom, which is console based, would solve these problems (and it does not insert empty lines...), but I still cannot send any character with it, and don't understand why! When I press a key (for example, "0" + Return), is is written (if I enable local echoing), but nothing happens (while it works with gtkterm and cuteterm!!). In my program, I read using the following :

r = scanf("%d", &option);

Using a debugger, I see that the program never goes past this line...

Has anybody any idea?

2
  • Basically, the application on the remote side does never receive the "0"+Return, while when I do the same thing with gtkcom or cutecom, it does.
    – Goulou
    Oct 12, 2010 at 11:06
  • OK. 1) Why would minicom solve those problems because it is console based? I don't get that connection. 2) Probably something is misconfigured in minicom, like baud rate. Type CTRL-A, then O, to enter minicom configuration mode. 3) This does not feel like a programmer question, more like a superuser.com or perhaps even serverfault.com question. Oct 12, 2010 at 11:26

4 Answers 4

99

You might try setting the 'Hardware Flow Control' option to 'NO' in the serial port setup of the minicom configuration.

Check the meaning of that option in minicom docs :)

5
  • This actually solved my problem. Everything was correct in the baud rate and settings but this tiny option. Thanks.
    – d6bels
    May 26, 2014 at 12:08
  • Solved my problem. Thanks Jun 7, 2016 at 22:25
  • Solved my problem with u-boot on beaglebone black.
    – slogan621
    Jun 26, 2021 at 6:29
  • 1
    Solved an issue I was having with CP2102 USB to UART adapter. Worked in Arduino IDE but not in Minicom until this change was made. Thanks!
    – QuickishFM
    Mar 29, 2023 at 15:00
  • This solved mine as well
    – Keshava GN
    Jul 4, 2023 at 8:26
24
  1. Set Hardware Flow Control to No under setting port will help you.(minicom -s; go to Serial Port Setup; last two lines are Hardware and Software Flow control; just set NO both)
  2. Turn on echo (ctrl + A after turn on minicom, then press E) to check whether you send something is good idea too.
4

Local echo says nothing about what goes over the wire. It can also be something with how scanf() interprets newlines. Try to create a program with getchar() and see if that gets any input at all, especially what happens when you press enter in the different terminal emulators.

Check that all baud rate, etc settings are set correctly in minicom. Check out the command line parameters for minicom, this way you can specify options directly.

1
  • 2
    Adjusting the baud rate which i got using wvdialconf fixed it for me Nov 26, 2013 at 16:54
0

Restarting my Linux Machine solved the issue for me.

Minicom was working before and then when my colleague accidentally turned the board off it stopped taking input. I tried everything for an hour. When nothing worked I restarted my PC and voila it started working.

1
  • There is a proverb rhyming in Frenglish which fits the situation perfectly: dans le doute, reboot 😂 ! This means: in case of doubt, reboot! Sep 8, 2020 at 16:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.