summaryrefslogtreecommitdiff
path: root/package/comgt
diff options
context:
space:
mode:
authorwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
committerwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
commit219a6dab8995aad9ac4860cc1a84d6f3509a03a4 (patch)
treeb9c0f3c43aebba2fcfef777592d0add39f2072f4 /package/comgt
Initial import
Diffstat (limited to 'package/comgt')
-rw-r--r--package/comgt/Config.in11
-rw-r--r--package/comgt/Makefile29
-rw-r--r--package/comgt/files/dial.comgt26
-rw-r--r--package/comgt/files/setmode.comgt26
-rw-r--r--package/comgt/ipkg/comgt.control4
-rw-r--r--package/comgt/patches/patch-comgt_0_32_Makefile33
-rw-r--r--package/comgt/patches/patch-comgt_h14
7 files changed, 143 insertions, 0 deletions
diff --git a/package/comgt/Config.in b/package/comgt/Config.in
new file mode 100644
index 000000000..4711c2195
--- /dev/null
+++ b/package/comgt/Config.in
@@ -0,0 +1,11 @@
+config ADK_PACKAGE_COMGT
+ prompt "comgt............................. Option/Vodafone 3G/GPRS control tool"
+ tristate
+ default n
+ help
+ Option GlobeTrotter GPRS/EDGE/3G/HSDPA and Vodafone 3G/GPRS datacard control tool
+
+ comgt is a scripting language interpreter useful for establishing communications
+ on serial lines and through PCMCIA modems as well as GPRS and 3G datacards.
+
+ http://www.pharscape.org/content/view/46/70/
diff --git a/package/comgt/Makefile b/package/comgt/Makefile
new file mode 100644
index 000000000..c9304dda8
--- /dev/null
+++ b/package/comgt/Makefile
@@ -0,0 +1,29 @@
+# $Id$
+#-
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include ${TOPDIR}/rules.mk
+
+PKG_NAME:= comgt
+PKG_VERSION:= 0.32
+PKG_RELEASE:= 1
+PKG_MD5SUM:= db2452680c3d953631299e331daf49ef
+DISTFILES:= ${PKG_NAME}.${PKG_VERSION}.tgz
+MASTER_SITES:= ${MASTER_SITE_SOURCEFORGE:=comgt/}
+WRKDIST= ${WRKDIR}/${PKG_NAME}.${PKG_VERSION}
+
+include ${TOPDIR}/mk/package.mk
+
+$(eval $(call PKG_template,COMGT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+
+BUILD_STYLE= auto
+ALL_TARGET= comgt
+
+do-install:
+ ${INSTALL_DIR} ${IDIR_COMGT}/usr/bin
+ ${INSTALL_DIR} ${IDIR_COMGT}/etc/comgt
+ ${INSTALL_BIN} ${WRKBUILD}/comgt ${IDIR_COMGT}/usr/bin/comgt
+ ${INSTALL_DATA} ./files/dial.comgt ${IDIR_COMGT}/etc/comgt/dial.comgt
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/comgt/files/dial.comgt b/package/comgt/files/dial.comgt
new file mode 100644
index 000000000..de3327331
--- /dev/null
+++ b/package/comgt/files/dial.comgt
@@ -0,0 +1,26 @@
+# dial given number
+opengt
+ set com 115200n81
+ set senddelay 0.02
+ waitquiet 1 0.2
+ flash 0.1
+
+:start
+ print "Dialing '"+$env("NUMBER")+"'\n"
+ send "ATDT"+$env("NUMBER")+"^m"
+
+ waitfor 15 "CONNECT" "OK","ERR","ERROR"
+ if % = 0 goto continue
+ if % = 1 goto continue
+ if % = 2 goto senderror
+ if % = 3 goto senderror
+
+ print "Timeout dialing '"+$env("NUMBER")+"'\n"
+ exit 1
+
+:senderror
+ print "Error dialing '"+$env("NUMBER")+"'\n"
+ exit 1
+
+:continue
+ exit 0
diff --git a/package/comgt/files/setmode.comgt b/package/comgt/files/setmode.comgt
new file mode 100644
index 000000000..4ce0b5fa7
--- /dev/null
+++ b/package/comgt/files/setmode.comgt
@@ -0,0 +1,26 @@
+# set wwan mode from environment
+opengt
+ set com 115200n81
+ set senddelay 0.02
+ waitquiet 1 0.2
+ flash 0.1
+
+:start
+ print "Trying to set mode\n"
+ send $env("MODE")
+ send "^m"
+
+ waitfor 15 "OK","ERR","ERROR"
+ if % = 0 goto continue
+ if % = 1 goto modeerror
+ if % = 2 goto modeerror
+
+ print "Timeout setting WWAN mode!\n"
+ exit 1
+
+:modeerror
+ print "Error setting WWAN mode!\n"
+ exit 1
+
+:continue
+ exit 0
diff --git a/package/comgt/ipkg/comgt.control b/package/comgt/ipkg/comgt.control
new file mode 100644
index 000000000..fe2c1cd61
--- /dev/null
+++ b/package/comgt/ipkg/comgt.control
@@ -0,0 +1,4 @@
+Package: comgt
+Priority: optional
+Section: console
+Description: Option GlobeTrotter GPRS/EDGE/3G/HSDPA and Vodafone 3G/GPRS datacard control tool
diff --git a/package/comgt/patches/patch-comgt_0_32_Makefile b/package/comgt/patches/patch-comgt_0_32_Makefile
new file mode 100644
index 000000000..29a6dbfdc
--- /dev/null
+++ b/package/comgt/patches/patch-comgt_0_32_Makefile
@@ -0,0 +1,33 @@
+$Id$
+--- comgt.0.32.orig/Makefile 2006-10-20 16:49:46.000000000 +0200
++++ comgt.0.32/Makefile 2006-12-05 18:03:37.000000000 +0100
+@@ -23,8 +23,6 @@
+ #
+ #
+
+-LIB = -L/usr/local/lib
+-INC = -I/usr/local/include
+ EXE = /usr/local/bin
+ MAN = /usr/share/man/man1
+ CPROG = comgt
+@@ -33,9 +31,6 @@ SCRIPTSRC = ./scripts/
+ BIN = $(CPROG)
+ MANP = comgt.1 sigmon.1
+
+-CFLAGS = -c
+-LDFLAGS =
+-
+ all: $(BIN)
+
+ install:
+@@ -72,8 +67,8 @@ clean:
+
+
+ comgt: comgt.o
+- cc comgt.o $(LDFLAGS) -o comgt
++ $(CC) comgt.o $(LDFLAGS) -o comgt
+
+ comgt.o: comgt.c comgt.h
+- cc comgt.c $(CFLAGS)
++ $(CC) comgt.c -c $(CFLAGS)
+
diff --git a/package/comgt/patches/patch-comgt_h b/package/comgt/patches/patch-comgt_h
new file mode 100644
index 000000000..fe715df4f
--- /dev/null
+++ b/package/comgt/patches/patch-comgt_h
@@ -0,0 +1,14 @@
+$Id$
+--- comgt.0.32.orig/comgt.h 2006-10-20 16:49:46.000000000 +0200
++++ comgt.0.32/comgt.h 2006-12-06 13:10:54.000000000 +0100
+@@ -470,8 +470,8 @@ char _SETAPN_code[]=
+ if a=0 goto apnerror\n\
+ if a>32 goto apnerror\n\
+ :enterapn\n\
+- send \"AT+CGDCONT=1,\\\"IP\\\",\\\"\n\
+- send $c\n\
++ send \"AT+CGDCONT=1,\\\"IP\\\",\\\"\"\n\
++ send $x\n\
+ send \"\\\"^m\"\n\
+ waitfor 20 \"OK\",\"ERR\"\n\
+ if % = -1 goto timeerror\n\