From: Felix Fietkau Date: Sat, 4 Nov 2006 00:21:54 +0000 (+0000) Subject: move comgt to trunk and add network scripts for umts compatible with the wrt54g3g X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=ff638aa896246d396b6516b3a9af6e0a95e88e05 move comgt to trunk and add network scripts for umts compatible with the wrt54g3g SVN-Revision: 5433 --- diff --git a/utils/comgt/Makefile b/utils/comgt/Makefile deleted file mode 100644 index e9a189c3eb..0000000000 --- a/utils/comgt/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# -# Copyright (C) 2006 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=comgt -PKG_VERSION:=0.3 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)$(PKG_VERSION).tgz -PKG_SOURCE_URL:=http://www.pharscape.org/3G/comgt -PKG_MD5SUM:=cd32663025ed94a0ee623a689989f3c3 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_UNPACK:=zcat $(DL_DIR)/$(PKG_SOURCE) | $(TAR) -C $(PKG_BUILD_DIR) $(TAR_OPTIONS) - -include $(INCLUDE_DIR)/package.mk - -define Package/comgt - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Option/Vodafone 3G/GPRS control tool - DESCRIPTION:=\ - comgt is a scripting language interpreter useful for establishing communications \\\ - on serial lines and through PCMCIA modems as well as GPRS and 3G datacards. - URL:= http://www.pharscape.org/content/view/46/70/ -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - gcom -endef - -define Package/comgt/install - install -d -m0755 $(1)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/gcom $(1)/usr/bin/ - install -d -m0755 $(1)/etc/gcom - install -m0644 ./files/setpin.gcom $(1)/etc/gcom/setpin.gcom - install -m0644 ./files/setmode.gcom $(1)/etc/gcom/setmode.gcom - install -m0644 ./files/getcardinfo.gcom $(1)/etc/gcom/getcardinfo.gcom - install -m0644 ./files/getstrength.gcom $(1)/etc/gcom/getstrength.gcom -endef - -$(eval $(call BuildPackage,comgt)) diff --git a/utils/comgt/files/getcardinfo.gcom b/utils/comgt/files/getcardinfo.gcom deleted file mode 100644 index 5c69a64604..0000000000 --- a/utils/comgt/files/getcardinfo.gcom +++ /dev/null @@ -1,14 +0,0 @@ -opengt - set com 115200n81 - set comecho off - set senddelay 0.02 - waitquiet 0.2 0.2 - flash 0.1 - -:start - send "ATI^m" - get 1 "" $s - print $s - -:continue - exit 0 diff --git a/utils/comgt/files/getstrength.gcom b/utils/comgt/files/getstrength.gcom deleted file mode 100644 index 2886285971..0000000000 --- a/utils/comgt/files/getstrength.gcom +++ /dev/null @@ -1,14 +0,0 @@ -opengt - set com 115200n81 - set comecho off - set senddelay 0.02 - waitquiet 0.2 0.2 - flash 0.1 - -:start - send "AT+CSQ^m" - get 1 "" $s - print $s - -:continue - exit 0 diff --git a/utils/comgt/files/setmode.gcom b/utils/comgt/files/setmode.gcom deleted file mode 100644 index 4ce0b5fa78..0000000000 --- a/utils/comgt/files/setmode.gcom +++ /dev/null @@ -1,26 +0,0 @@ -# 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/utils/comgt/files/setpin.gcom b/utils/comgt/files/setpin.gcom deleted file mode 100644 index 66350fe20b..0000000000 --- a/utils/comgt/files/setpin.gcom +++ /dev/null @@ -1,55 +0,0 @@ -# set pin code from evnironment "$PINCODE" -opengt - set com 115200n81 - set senddelay 0.05 - waitquiet 3 0.5 - flash 0.1 - - let c=0 -:start - send "AT+CPIN?^m" - waitfor 15 "SIM PUK","SIM PIN","READY","ERROR","ERR" - if % = -1 goto timeout - if % = 0 goto ready - if % = 1 goto setpin - if % = 2 goto ready - if % = 3 goto checkrepeat - if % = 4 goto checkrepeat - -:checkrepeat - inc c - if c>3 goto pinerror - waitquiet 12 0.5 - goto start - -:timeout - print "timeout checking for PIN." - exit 1 - -:ready - print "SIM ready\n" - goto continue - exit 0 - -:setpin - # check if output was "SIM PIN2", that's ok. - waitfor 1 "2" - if % = 0 goto ready - - print "Trying to set PIN\n" - send "AT+CPIN=\"" - send $env("PINCODE") - send "\"^m" - - waitfor 20 "OK","ERR" - if % = -1 goto pinerror - if % = 0 goto continue - if % = 1 goto pinerror - -:pinerror - print "Error setting PIN, check card manually\n" - exit 1 - -:continue - print "PIN set successfully\n" - exit 0 diff --git a/utils/comgt/patches/001-Makefile.patch b/utils/comgt/patches/001-Makefile.patch deleted file mode 100644 index 28ea2ecf27..0000000000 --- a/utils/comgt/patches/001-Makefile.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- gcom-0.3.x/Makefile 2006-01-04 17:05:28.000000000 +0200 -+++ gcom-0.3/Makefile 2006-02-26 13:02:07.000000000 +0200 -@@ -20,8 +20,6 @@ - # - # $Id$ - # --LIB = -L/usr/local/lib --INC = -I/usr/local/include - EXE = /usr/local/bin - MAN = /usr/share/man/man1 - CPROG = gcom -@@ -29,9 +27,6 @@ - BIN = $(CPROG) $(SCRIPT) - MANP = gcom.1 sigmon.1 - --CFLAGS = -c --LDFLAGS = -- - all: $(BIN) - - install: -@@ -53,8 +48,8 @@ - - - gcom: gcom.o -- cc gcom.o $(LDFLAGS) -o gcom -+ $(CC) gcom.o $(LDFLAGS) -o gcom - - gcom.o: gcom.c gcom.h -- cc gcom.c $(CFLAGS) -+ $(CC) -c $(CFLAGS) gcom.c -