From 2324a5ddbc866c669a45d759897a8f2a05550696 Mon Sep 17 00:00:00 2001 From: Daniel Oosterwijk Date: Tue, 15 Jun 2021 16:34:48 +1200 Subject: [PATCH 1/3] Made personal parameter files more usable. --- config.c | 1 + remoterc.dfl | 4 ++-- rwconf.c | 12 ++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/config.c b/config.c index d6a33e8..e2d88c8 100644 --- a/config.c +++ b/config.c @@ -70,6 +70,7 @@ void read_parms() /* Read personal parameters */ if ((fp = sfopen(pparfile, "r")) != (FILE *)NULL) { + fprintf(stderr, "Also using personal configuration from %s\n", pparfile); readpars(fp, 0); fclose(fp); } diff --git a/remoterc.dfl b/remoterc.dfl index f576e56..b90f9e0 100644 --- a/remoterc.dfl +++ b/remoterc.dfl @@ -8,7 +8,7 @@ pu pname6 YDNY pu pname7 YUYN pu pname8 NDYN pu pprog1 down -pr port /dev/ttyUSB1 -pu baudrate 38400 +#pr port Set this to one of the symlinks in /dev/serial/by-id/ depending on which device SP1 is +pr baudrate 38400 pu rtscts No pu mfcolor RED diff --git a/rwconf.c b/rwconf.c index 5a03a19..559912f 100644 --- a/rwconf.c +++ b/rwconf.c @@ -93,13 +93,13 @@ struct pars mpars[] = { { "", PUBLIC, "pprog11" }, { "", PUBLIC, "pprog12" }, /* Serial port & friends */ - { DFL_PORT, PRIVATE, "port" }, + { DFL_PORT, PUBLIC, "port" }, { CALLIN, PRIVATE, "callin" }, { CALLOUT, PRIVATE, "callout" }, { UUCPLOCK, PRIVATE, "lock" }, - { DEF_BAUD, PUBLIC, "baudrate" }, - { "8", PUBLIC, "bits" }, - { "N", PUBLIC, "parity" }, + { DEF_BAUD, PRIVATE, "baudrate" }, + { "8", PRIVATE, "bits" }, + { "N", PRIVATE, "parity" }, /* Kermit the frog */ { KERMIT, PRIVATE, "kermit" }, { "Yes", PRIVATE, "kermallow" }, @@ -214,14 +214,14 @@ FILE *fp; int init; { struct pars *p; - char line[80]; + char line[300]; char *s; int public; int dosleep = 0; if (init) strcpy(P_SCRIPTPROG, "runscript"); - while(fgets(line, 80, fp) != (char *)0) { + while(fgets(line, 300, fp) != (char *)0) { s = strtok(line, "\n\t "); if (s == NULL) continue; From 5beae1c33f51fcffa4911c92ba9eb7be0a47ad3f Mon Sep 17 00:00:00 2001 From: Daniel Oosterwijk Date: Tue, 15 Jun 2021 16:48:48 +1200 Subject: [PATCH 2/3] Add remote launch script that detects SP1 location --- remote_launch | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 remote_launch diff --git a/remote_launch b/remote_launch new file mode 100755 index 0000000..f9c9d14 --- /dev/null +++ b/remote_launch @@ -0,0 +1,8 @@ +#!/bin/bash + +POSSIBLE_SP1_LOCATIONS=( "/dev/serial/by-id/usb-Digilent_Digilent_USB_Device_*-if01-port0" ) + +echo "# Automatically generated based on this system's actual location for the first serial port" > ~/.remoterc.dfl +echo -e "pu port\t" $POSSIBLE_SP1_LOCATIONS >> ~/.remoterc.dfl + +remote_bin From f9e88fde27722335c38eb1c24dc0c214da6f70e5 Mon Sep 17 00:00:00 2001 From: Daniel Oosterwijk Date: Tue, 15 Jun 2021 16:51:50 +1200 Subject: [PATCH 3/3] Add script to detect and launch serial port 2 --- sp2_launch | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 sp2_launch diff --git a/sp2_launch b/sp2_launch new file mode 100755 index 0000000..dc0e0e7 --- /dev/null +++ b/sp2_launch @@ -0,0 +1,5 @@ +#!/bin/bash + +POSSIBLE_SP2_LOCATIONS=( "/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_*-if00-port0" ) + +screen $POSSIBLE_SP2_LOCATIONS 38400