Ctrl+c in Minicom

Adam Lackorzynski adam at os.inf.tu-dresden.de
Sat Aug 2 22:01:40 UTC 2008


Hi,


On Mon Jul 28, 2008 at 14:07:34 -0700, Jon Carmicheal wrote:
> The robot uses busybox, and stty is not built in to it.  Is there a way that
> I could map something so that I know it's trying to send Ctrl+C?

Well, it depends on what you have available on your robot to capture
input and display it. On the minicom side you may apply the following
patch to see the character being sent in /tmp/outlog:

Index: main.c
===================================================================
RCS file: /cvsroot/minicom/minicom/src/main.c,v
retrieving revision 1.24
diff -u -r1.24 main.c
--- main.c	2 Aug 2008 20:27:07 -0000	1.24
+++ main.c	2 Aug 2008 22:00:29 -0000
@@ -348,6 +348,12 @@
   if (len == 0)
     len = strlen(s);
 
+  FILE *x = fopen("/tmp/outlog", "a");
+  if (x) {
+    fprintf(x, "<%c/%d>\n", *s,*s);
+    fclose(x);
+  }
+
   if (P_PARITY[0] == 'M') {
     for(f = 0; f < len && f < 256; f++)
       buf[f] = *s++ | 0x80;
 
> On Sat, Jul 26, 2008 at 2:30 AM, R.L. Horn <lists at eastcheap.org> wrote:
> 
> > On Thu, 24 Jul 2008, Jon Carmicheal wrote:
> >
> >  Something that I very often need to be able to do, but have not yet been
> >> able to find out, is to send the "Ctrl+c" command through minicom to cancel
> >> a program.
> >>
> >
> > Well, generally, you type Ctrl+C.  So far as I know, minicom shouldn't
> > filter ETX unless it's remapped through the character conversion table.
> >
> >  I've also tried other serial port terminals, but none of them let me send
> >> "Ctrl+c" either.  Do you know of a way I can do this?
> >>
> >
> > It sounds like the robot is receiving Ctrl+C but not acting on it.  Can you
> > run "stty -a" on the critter and, if so, what do you get?

Adam
-- 
Adam                 adam at os.inf.tu-dresden.de
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/



More information about the minicom-devel mailing list