summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorWill Andrews <will@FreeBSD.org>2001-09-03 18:57:03 +0000
committerWill Andrews <will@FreeBSD.org>2001-09-03 18:57:03 +0000
commita65d9733c1100d8c265c133e8c7ebd33e247e2c4 (patch)
tree4d37df15db36ce159f711d1d33f94dce67277bbe /misc
parentAdd mysql-gui, a graphical SQL client for MySQL. (diff)
Add speedtouch_usb 21062001, support for the SpeedTouch ADSL USB
adapter. PR: 29646 Submitted by: n_hibma
Notes
Notes: svn path=/head/; revision=47394
Diffstat (limited to 'misc')
-rw-r--r--misc/Makefile1
-rw-r--r--misc/speedtouch_usb/Makefile33
-rw-r--r--misc/speedtouch_usb/distinfo2
-rw-r--r--misc/speedtouch_usb/files/adsl.conf.sample22
-rw-r--r--misc/speedtouch_usb/files/adsl.sh.sample14
-rw-r--r--misc/speedtouch_usb/files/configuration16
-rw-r--r--misc/speedtouch_usb/files/patch-modem_run.c67
-rw-r--r--misc/speedtouch_usb/files/patch-pppoa2.c55
-rw-r--r--misc/speedtouch_usb/pkg-comment1
-rw-r--r--misc/speedtouch_usb/pkg-descr7
-rw-r--r--misc/speedtouch_usb/pkg-plist3
11 files changed, 221 insertions, 0 deletions
diff --git a/misc/Makefile b/misc/Makefile
index d1f288ef0eb3..b0c68ad7ab56 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -170,6 +170,7 @@
SUBDIR += sls
SUBDIR += smssend
SUBDIR += snowflake
+ SUBDIR += speedtouch_usb
SUBDIR += splitvt
SUBDIR += sshbuddy
SUBDIR += stan
diff --git a/misc/speedtouch_usb/Makefile b/misc/speedtouch_usb/Makefile
new file mode 100644
index 000000000000..c1350c47e359
--- /dev/null
+++ b/misc/speedtouch_usb/Makefile
@@ -0,0 +1,33 @@
+# New ports collection makefile for: speedtouch_usb
+# Date created: 7 August 2001
+# Whom: Nick Hibma
+#
+# $FreeBSD$
+#
+
+PORTNAME= speedtouch
+PORTVERSION= 21062001
+CATEGORIES= misc
+MASTER_SITES= http://www.xsproject.org/speedtouch/files/ \
+ http://www.alcatel.com/consumer/dsl/
+DISTFILES= speedtouch-${PORTVERSION}.tar.gz \
+ speedmgmt.tar.gz
+
+MAINTAINER= ports@FreeBSD.org
+
+do-install:
+ [ -d ${PREFIX} ] || ${MKDIR} ${PREFIX}
+ ${INSTALL_PROGRAM} ${WRKSRC}/modem_run ${PREFIX}/bin/
+ ${INSTALL_PROGRAM} ${WRKSRC}/pppoa2 ${PREFIX}/bin/
+ ${INSTALL_DATA} ${WRKDIR}/mgmt/mgmt.o ${PREFIX}/libdata
+
+ @${ECHO} "#!/bin/sh" > ${WRKDIR}/adsl.sh.sample
+ @${ECHO} "PREFIX=${PREFIX}" >> ${WRKDIR}/adsl.sh.sample
+ ${CAT} files/adsl.sh.sample >> ${WRKDIR}/adsl.sh.sample
+ ${INSTALL_SCRIPT} ${WRKDIR}/adsl.sh.sample ${PREFIX}/etc/rc.d/
+
+ ${INSTALL_DATA} files/adsl.conf.sample /etc/ppp/
+
+ @${CAT} files/configuration
+
+.include <bsd.port.mk>
diff --git a/misc/speedtouch_usb/distinfo b/misc/speedtouch_usb/distinfo
new file mode 100644
index 000000000000..dcd0a9a57c36
--- /dev/null
+++ b/misc/speedtouch_usb/distinfo
@@ -0,0 +1,2 @@
+MD5 (speedmgmt.tar.gz) = 102dc7a457c3942ee21dc834db68eac2
+MD5 (speedtouch-21062001.tar.gz) = a82e7feceedfa0ef5836f11b15a7286d
diff --git a/misc/speedtouch_usb/files/adsl.conf.sample b/misc/speedtouch_usb/files/adsl.conf.sample
new file mode 100644
index 000000000000..2e91951cb960
--- /dev/null
+++ b/misc/speedtouch_usb/files/adsl.conf.sample
@@ -0,0 +1,22 @@
+# Sample configuration for the SpeedTouch ADSL adapter.
+#
+# You will have to fill in:
+# - <login>
+# - <password>
+# - <VPI>.<VCI> is defined by your provider. Common values are:
+# - 8.35 or 8.67 in France
+# - 0.38 in the UK
+# - 8.48 in the Netherlands
+# or check the value used in Windows.
+
+adsl:
+ set authname <login>
+ set authkey <password>
+ set device !"pppoa2 -vpi <VPI> -vci <VCI> -v 1"
+ accept chap
+ set speed sync
+ set timeout 900
+ set dial ""
+ set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
+ add default HISADDR
+ enable dns
diff --git a/misc/speedtouch_usb/files/adsl.sh.sample b/misc/speedtouch_usb/files/adsl.sh.sample
new file mode 100644
index 000000000000..722e77c63c97
--- /dev/null
+++ b/misc/speedtouch_usb/files/adsl.sh.sample
@@ -0,0 +1,14 @@
+ISP=adsl
+PATH=$PATH:$PREFIX/bin
+
+case $1 in
+stop)
+ killall modem_run
+ killall ppp
+ ;;
+*)
+ modem_run -f $PREFIX/libdata/mgmt.o -m \
+ && ppp -quiet -auto $ISP \
+ && echo -n ' ppp($ISP)'
+ ;;
+esac
diff --git a/misc/speedtouch_usb/files/configuration b/misc/speedtouch_usb/files/configuration
new file mode 100644
index 000000000000..5713cf892f15
--- /dev/null
+++ b/misc/speedtouch_usb/files/configuration
@@ -0,0 +1,16 @@
+----------------------------------------------------------------------
+Installation instructions:
+
+- Your kernel will need to contain support for USB and the ugen device.
+
+- Your /etc/ppp/ppp.conf file will need to contain an entry for the ADSL
+connection. A sample has been installed as /etc/ppp/adsl.conf.sample.
+
+- You can then start your connection with the following sequence:
+ modem_run -f $PREFIX/libdata/mgmt.o -m
+ ppp -ddial adsl
+or use the sample rc.d file in
+ $PREFIX/etc/rc.d/adsl.sh.sample
+
+For more information see the INSTALL-BSD in the source directory.
+-----------------------------------------------------------------------
diff --git a/misc/speedtouch_usb/files/patch-modem_run.c b/misc/speedtouch_usb/files/patch-modem_run.c
new file mode 100644
index 000000000000..5ef54dc7a05b
--- /dev/null
+++ b/misc/speedtouch_usb/files/patch-modem_run.c
@@ -0,0 +1,67 @@
+--- modem_run.c.orig Tue Aug 7 22:57:21 2001
++++ modem_run.c Tue Aug 7 23:08:42 2001
+@@ -216,6 +216,7 @@
+ printf("usage: modem_run [-v] [-f microcode] [-m]\n");
+ printf(" -v : verbose mode\n");
+ printf(" -f microcode : upload this microcode file first\n");
++ printf(" -d device : use this USB device\n");
+ printf(" -m : monitor the line\n");
+ printf(" --help : this message\n");
+ exit (-1);
+@@ -611,6 +612,7 @@
+ int verbose = 0, monitoring = 0;
+ unsigned char buf[TOTAL+1000], prevbuf[TOTAL];
+ const char * file = NULL;
++ const char * device = NULL;
+
+ for (i=1;i<argc;i++)
+ if (strcmp(argv[i],"-v")==0)
+@@ -619,6 +621,8 @@
+ monitoring = 1;
+ else if (strcmp(argv[i],"-f")==0 && i+1<argc)
+ file = argv[++i];
++ else if (strcmp(argv[i],"-d")==0 && i+1<argc)
++ device = argv[++i];
+ else if (strcmp(argv[i],"--help")==0)
+ usage();
+ else
+@@ -627,16 +631,29 @@
+ if (file == NULL)
+ usage();
+
+- /* we search the modem on the USB bus */
+- fdusb = pusb_search_open(ST_VENDOR,ST_PRODUCT);
+- if (fdusb == NULL)
+- {
+- printf("I'm sorry, I didn't find your ADSL modem!\n");
+- printf("Tips: check that you are running this program as root"
+- " and your device is seen by Linux"
+- " by checking /proc/bus/usb/devices\n");
+- return -1;
+- }
++ if (device == NULL)
++ {
++ /* we search the modem on the USB bus */
++ fdusb = pusb_search_open(ST_VENDOR,ST_PRODUCT);
++ if (fdusb == NULL)
++ {
++ printf("I'm sorry, I didn't find your ADSL modem!\n");
++ printf("Tips: check that you are running this program as root"
++ " and your device is seen by Linux"
++ " by checking /proc/bus/usb/devices\n");
++ return -1;
++ }
++ }
++ else
++ {
++ fdusb = pusb_open(device);
++ if (fdusb == NULL)
++ {
++ printf("I'm sorry, I could not open your ADSL modem at %s\n",
++ device);
++ return -1;
++ }
++ }
+
+ printf("Gotcha, I found your ADSL ALCATEL SpeedTouch USB modem!\n");
+
diff --git a/misc/speedtouch_usb/files/patch-pppoa2.c b/misc/speedtouch_usb/files/patch-pppoa2.c
new file mode 100644
index 000000000000..323ca0872165
--- /dev/null
+++ b/misc/speedtouch_usb/files/patch-pppoa2.c
@@ -0,0 +1,55 @@
+--- pppoa2.c.orig Tue Aug 7 23:02:15 2001
++++ pppoa2.c Tue Aug 7 23:06:41 2001
+@@ -890,6 +890,7 @@
+ {
+ char *logfile;
+ int fdin, fdout, log;
++ const char * device = NULL;
+ int i;
+
+ pusb_device_t fdusb;
+@@ -908,6 +909,8 @@
+ my_vci = atoi(argv[++i]);
+ else if(strcmp(argv[i], "--help") == 0)
+ usage();
++ else if(strcmp(argv[i], "-d") == 0 && i + 1 < argc)
++ device = argv[++i];
+ else if(strcmp(argv[i], "-f") == 0 && i + 1 < argc) {
+ logfile = argv[++i];
+ if(!verbose) verbose = 1;
+@@ -1049,17 +1052,26 @@
+ #endif
+ }
+
+- /*
+- * We search for the first USB device matching ST_VENDOR & ST_PRODUCT.
+- * usbdevfs must be mount on /proc/bus/usb (or you may change the path
+- * here, according to your config
+- */
++ if (device == NULL) {
++ /*
++ * We search for the first USB device matching ST_VENDOR & ST_PRODUCT.
++ * usbdevfs must be mount on /proc/bus/usb (or you may change the path
++ * here, according to your config
++ */
+
+- fdusb = pusb_search_open(ST_VENDOR, ST_PRODUCT);
++ fdusb = pusb_search_open(ST_VENDOR, ST_PRODUCT);
+
+- if(fdusb == NULL && verbose) {
+- printf("< pid=%d > Where is this crappy modem ?!\n", this_process);
+- return(-1);
++ if(fdusb == NULL && verbose) {
++ printf("< pid=%d > Where is this crappy modem ?!\n", this_process);
++ return(-1);
++ }
++ } else {
++ fdusb = pusb_open(device);
++
++ if(fdusb == NULL && verbose) {
++ printf("< pid=%d > The modem is not at %s\n", this_process, device);
++ return(-1);
++ }
+ }
+
+ /*Debug message*/
diff --git a/misc/speedtouch_usb/pkg-comment b/misc/speedtouch_usb/pkg-comment
new file mode 100644
index 000000000000..62d633810d2e
--- /dev/null
+++ b/misc/speedtouch_usb/pkg-comment
@@ -0,0 +1 @@
+Support for the SpeedTouch ADSL USB adapter
diff --git a/misc/speedtouch_usb/pkg-descr b/misc/speedtouch_usb/pkg-descr
new file mode 100644
index 000000000000..be6dd73685b4
--- /dev/null
+++ b/misc/speedtouch_usb/pkg-descr
@@ -0,0 +1,7 @@
+Driver for the SpeedTouch ADSL USB adapter.
+
+It uses a closed source kernel provided by Alcatel, surrounded
+by some glue code to make it work on Linux, FreeBSD, NetBSD and
+OpenBSD.
+
+WWW: http://www.xsproject.org/speedtouch/index.html
diff --git a/misc/speedtouch_usb/pkg-plist b/misc/speedtouch_usb/pkg-plist
new file mode 100644
index 000000000000..c9e8d9b1c88e
--- /dev/null
+++ b/misc/speedtouch_usb/pkg-plist
@@ -0,0 +1,3 @@
+bin/modem_run
+bin/pppoa2
+libdata/mgmt.o