mirror of https://github.com/OpenIPC/composer.git
Move comgt and jsonfilter packages to firmware repo
parent
87ea460d41
commit
128db5d586
|
@ -9,7 +9,7 @@
|
||||||
git clone https://github.com/OpenIPC/composer.git && cd composer && ./stapler t31_vixand
|
git clone https://github.com/OpenIPC/composer.git && cd composer && ./stapler t31_vixand
|
||||||
```
|
```
|
||||||
|
|
||||||
## GitHub repo
|
## More info and examples at GitHub repo
|
||||||
|
|
||||||
[https://github.com/OpenIPC/composer](https://github.com/OpenIPC/composer)
|
[https://github.com/OpenIPC/composer](https://github.com/OpenIPC/composer)
|
||||||
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
config BR2_PACKAGE_COMGT
|
|
||||||
bool "comgt"
|
|
||||||
default n
|
|
||||||
help
|
|
||||||
Comgt is a command line tool for controlling, configuring
|
|
||||||
and interacting with Option Wireless 3G and 2G ( HSDPA, UMTS,
|
|
||||||
EDGE, GPRS, GSM) data devices within the Linux environment.
|
|
||||||
|
|
||||||
https://sourceforge.net/projects/comgt/
|
|
|
@ -1,23 +0,0 @@
|
||||||
################################################################################
|
|
||||||
#
|
|
||||||
# comgt | updated 2022.09.13
|
|
||||||
#
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
COMGT_LICENSE = GPL
|
|
||||||
COMGT_LICENSE_FILES = LICENSE
|
|
||||||
|
|
||||||
define COMGT_EXTRACT_CMDS
|
|
||||||
cp -a ../general/package/comgt/* $(@D)/
|
|
||||||
endef
|
|
||||||
|
|
||||||
define COMGT_BUILD_CMDS
|
|
||||||
$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/src
|
|
||||||
endef
|
|
||||||
|
|
||||||
define COMGT_INSTALL_TARGET_CMDS
|
|
||||||
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/sbin
|
|
||||||
install -m 0755 -D $(@D)/src/comgt $(TARGET_DIR)/usr/sbin/comgt
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(generic-package))
|
|
|
@ -1,14 +0,0 @@
|
||||||
|
|
||||||
microcom -s 115200 /dev/ttyUSB2
|
|
||||||
|
|
||||||
AT^CURC=0 - disable diagnostic messages
|
|
||||||
AT+CMGF=1 - set text mode (not binary)
|
|
||||||
AT+CMGL - list of new messages
|
|
||||||
AT+CMGL=? - list of all messages numbers
|
|
||||||
AT+CMGR=1 - read message number 1
|
|
||||||
AT+CMGD=1 - delete message number 1
|
|
||||||
|
|
||||||
Links
|
|
||||||
https://www.diafaan.com/sms-tutorials/gsm-modem-tutorial/online-sms-pdu-decoder/
|
|
||||||
http://www.developershome.com/sms/resultCodes2.asp#16.2.1.1.Table
|
|
||||||
https://github.com/pkot/gnokii.git
|
|
|
@ -1,18 +0,0 @@
|
||||||
####################################################
|
|
||||||
#
|
|
||||||
# comgt script files
|
|
||||||
# To be placed in /etc/comgt
|
|
||||||
#
|
|
||||||
# Copyright (C) 2006 Paul Hardwick <paul@peck.org>
|
|
||||||
#
|
|
||||||
###################################################
|
|
||||||
This directory contains scripts for execution by the comgt utility
|
|
||||||
`man comgt` for more info on the syntax.
|
|
||||||
|
|
||||||
The scripts provided:
|
|
||||||
|
|
||||||
command.scr - Provides an interactive session to let the user send AT commands manually
|
|
||||||
dump.scr - Prints the result of AT&V to the console - useful for debugging device configurations
|
|
||||||
operator.scr - Gets a list of operators and allows the user to do a manual selection - useful for roaming abroad.
|
|
||||||
#
|
|
||||||
sigmon.sh - Continuosly monitors the signal strength - `man sigmon` for more info
|
|
|
@ -1,32 +0,0 @@
|
||||||
####################################################
|
|
||||||
#
|
|
||||||
# command - comgt script for command interaction
|
|
||||||
#
|
|
||||||
# Copyright (C) 2006 Paul Hardwick <paul@peck.org>
|
|
||||||
#
|
|
||||||
###################################################
|
|
||||||
print "\nType command at prompt.\n"
|
|
||||||
print "Empty input terminates.\n"
|
|
||||||
print "#################\n"
|
|
||||||
opengt
|
|
||||||
set com 115200n81
|
|
||||||
set senddelay 0.05
|
|
||||||
waitquiet 1 0.2
|
|
||||||
|
|
||||||
:loop1
|
|
||||||
print "Command: "
|
|
||||||
input $x
|
|
||||||
let c=len($x)
|
|
||||||
if c=1 goto end
|
|
||||||
let c=c-1
|
|
||||||
let $c=$left($x,c)
|
|
||||||
send $x
|
|
||||||
send "^m"
|
|
||||||
:loop2
|
|
||||||
print $a
|
|
||||||
get 1 "^m" $a
|
|
||||||
let a=len($a)
|
|
||||||
if a > 0 goto loop2
|
|
||||||
goto loop1
|
|
||||||
:end
|
|
||||||
print "#################\n"
|
|
|
@ -1,22 +0,0 @@
|
||||||
####################################################
|
|
||||||
#
|
|
||||||
# dump - comgt script to dump modem settings
|
|
||||||
#
|
|
||||||
# Copyright (C) 2006 Paul Hardwick <paul@peck.org>
|
|
||||||
#
|
|
||||||
###################################################
|
|
||||||
print "\nDumping Modem Settings\n\n"
|
|
||||||
print "#################\n"
|
|
||||||
opengt
|
|
||||||
set com 115200n81
|
|
||||||
set senddelay 0.05
|
|
||||||
waitquiet 1 0.2
|
|
||||||
send "AT&VE1^m"
|
|
||||||
|
|
||||||
get 1 "^m" $a
|
|
||||||
:loop
|
|
||||||
print $a
|
|
||||||
get 1 "^m" $a
|
|
||||||
let a=len($a)
|
|
||||||
if a > 0 goto loop
|
|
||||||
print "#################\n"
|
|
|
@ -1,32 +0,0 @@
|
||||||
opengt
|
|
||||||
:init
|
|
||||||
set com 115200n81
|
|
||||||
set senddelay 0.05
|
|
||||||
send "AT+CFUN=1^m"
|
|
||||||
waitquiet 1 0.2
|
|
||||||
print "Start time is ",$time(),"\n"
|
|
||||||
:receive_number
|
|
||||||
send "AT+CLIP=1^m"
|
|
||||||
waitquiet 1 0.2
|
|
||||||
:wait_first_ring
|
|
||||||
print "Wait first ring\n"
|
|
||||||
waitfor 10 "RING"
|
|
||||||
if % = -1 goto wait_first_ring
|
|
||||||
if % = 0 goto get_ring_number
|
|
||||||
:get_ring_number
|
|
||||||
print "Get ring number\n"
|
|
||||||
waitfor 2 "+CLIP:"
|
|
||||||
get 1 "," $s
|
|
||||||
if % = -1 goto wait_first_ring
|
|
||||||
if % = 0 goto wait_second_ring
|
|
||||||
:wait_second_ring
|
|
||||||
print "Wait second ring\n"
|
|
||||||
waitfor 10 "RING"
|
|
||||||
if % = -1 goto wait_first_ring
|
|
||||||
if % = 0 goto hangup_modem
|
|
||||||
:hangup_modem
|
|
||||||
print "Hangup modem\n"
|
|
||||||
send "AT+CHUP^m"
|
|
||||||
waitquiet 1 0.2
|
|
||||||
exec "logger -r ring"+$s
|
|
||||||
goto wait_first_ring
|
|
|
@ -1,31 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# Telegram Sender v.0.1
|
|
||||||
#
|
|
||||||
# 2017.09.15 | Simple text sender realisation
|
|
||||||
# 2017.09.16 | Nagios test done
|
|
||||||
|
|
||||||
|
|
||||||
TOKEN="4938561407:AAGcMIK1zBFW40AT5436vPvEUsFP6BmxhI"
|
|
||||||
RUPOR="-10013071148102"
|
|
||||||
SDATE=$(date "+%Y-%m-%d %H:%M:%S")
|
|
||||||
ALARM=`echo -e "\xE2\x98\x8E K-Telecom"`
|
|
||||||
STAMP=$(date -u +%s)
|
|
||||||
NOMER=$(echo $1 | tr -d '+')
|
|
||||||
|
|
||||||
|
|
||||||
send() {
|
|
||||||
#
|
|
||||||
if [ -z "${NOMER}" ] ; then
|
|
||||||
NOMER="anonymouse"
|
|
||||||
fi
|
|
||||||
#
|
|
||||||
curl -k -o - --connect-timeout 30 --max-time 30 -X POST \
|
|
||||||
https://api.telegram.org/bot${TOKEN}/sendMessage -d chat_id="${RUPOR}" -d disable_notification="true" -d text="${ALARM} ${NOMER} | ${SDATE}" >/dev/null 2>&1
|
|
||||||
#
|
|
||||||
logger -t ringer "${STAMP} Received ring from: ${NOMER} - ${MYWIFI}"
|
|
||||||
#
|
|
||||||
}
|
|
||||||
|
|
||||||
send
|
|
||||||
|
|
|
@ -1,90 +0,0 @@
|
||||||
############################################################################
|
|
||||||
# operator - a comgt script for viewing and selecting networks
|
|
||||||
#
|
|
||||||
# An example of how you might do operator selection when travelling
|
|
||||||
# in a foreign country.
|
|
||||||
# Big ToDo - improve the interface!!!
|
|
||||||
#
|
|
||||||
# Copyright (C) 2003 Paul Hardwick <paul@peck.org>
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
#
|
|
||||||
###########################################################################
|
|
||||||
|
|
||||||
############################################################################
|
|
||||||
# $Id: operator,v 1.1 2006/10/20 14:19:54 pharscape Exp $
|
|
||||||
# $Log: operator,v $
|
|
||||||
# Revision 1.1 2006/10/20 14:19:54 pharscape
|
|
||||||
# Added scripts directory - expected operational location will /etc/comgt/
|
|
||||||
#
|
|
||||||
# Revision 1.1.1.1 2006/08/16 21:21:31 pharscape
|
|
||||||
# intial CVS import
|
|
||||||
#
|
|
||||||
############################################################################
|
|
||||||
opengt
|
|
||||||
set com 115200n81
|
|
||||||
set senddelay 0.05
|
|
||||||
waitquiet 2 0.5
|
|
||||||
:operator
|
|
||||||
send "AT+COPS=?^m"
|
|
||||||
waitfor 20 "+COPS=?","Error"
|
|
||||||
if % = -1 goto timeout
|
|
||||||
if % = 0 goto getlist
|
|
||||||
print "Error response from device\n"
|
|
||||||
exit 1
|
|
||||||
:getlist
|
|
||||||
let c=0
|
|
||||||
print "Getting Operator list: "
|
|
||||||
:waiting
|
|
||||||
print "."
|
|
||||||
get 2 "^m" $s
|
|
||||||
if % = -1 goto stillwaiting
|
|
||||||
waitquiet 1 0.2
|
|
||||||
print "\n"
|
|
||||||
print $s,"\n\n==============================================================\n"
|
|
||||||
print "Format: (Access,Long Name, Short Name, Network ID [,Technology])\n"
|
|
||||||
print "Access: 2 - Registered, 1 - Available, 3 - Forbidden\n"
|
|
||||||
print "Technology: 0 - GSM/GPRS, 2 - UMTS (Not available on all cards)\n"
|
|
||||||
print "\nEnter the Network ID to attempt manual registration\n [blank = automatic selection]:"
|
|
||||||
input $a
|
|
||||||
let a=len($a)
|
|
||||||
dec a
|
|
||||||
let $a=$left($a,a)
|
|
||||||
if $a = "" goto automatic
|
|
||||||
let $b="AT+COPS=1,2,\""+$a
|
|
||||||
let $b=$b+"\"^m"
|
|
||||||
send $b
|
|
||||||
goto waitresult
|
|
||||||
:automatic
|
|
||||||
let $b="AT+COPS=0^m"
|
|
||||||
send $b
|
|
||||||
:waitresult
|
|
||||||
waitfor 60 "OK","ERR"
|
|
||||||
if % = -1 goto timeout
|
|
||||||
if % = 2 goto failedreg
|
|
||||||
print "Registration request accepted\n"
|
|
||||||
print "Command was: ",$b,"\n"
|
|
||||||
exit 0
|
|
||||||
:failedreg
|
|
||||||
print "Registration request refused\n"
|
|
||||||
print "Command was: ",$b,"\n"
|
|
||||||
exit 1
|
|
||||||
:stillwaiting
|
|
||||||
if c > 60 goto timeout
|
|
||||||
let c=c+1
|
|
||||||
goto waiting
|
|
||||||
:timeout
|
|
||||||
print "Network Search Timeout\n"
|
|
||||||
exit 1
|
|
|
@ -1,30 +0,0 @@
|
||||||
# send using this command:
|
|
||||||
# gcom -d /dev/ttyUSB0 -v -e -s sendsms.comgt
|
|
||||||
|
|
||||||
# Ensure you fill in your phone number below or it wont send!
|
|
||||||
|
|
||||||
opengt
|
|
||||||
# set the terminal settings
|
|
||||||
set com 115200n81
|
|
||||||
# echo commands
|
|
||||||
set comecho on
|
|
||||||
# use a tiny delay between each keypress
|
|
||||||
set senddelay 0.02
|
|
||||||
# wait for things to be silent on the serial port
|
|
||||||
waitquiet 1 0.2
|
|
||||||
# reset things a bit
|
|
||||||
flash 0.1
|
|
||||||
# set it to textmode
|
|
||||||
send "AT+CMGF=1^m"
|
|
||||||
# wait for OK
|
|
||||||
waitfor 1 "OK"
|
|
||||||
# tell it we want to send a SMS and to what number
|
|
||||||
send "AT+CMGS=\"003538XXXXXXXX\"^m"
|
|
||||||
# the modem will present a > and wait for you to input your message
|
|
||||||
waitfor 1 ">"
|
|
||||||
send $env("SMS_MSG")
|
|
||||||
# and expect you to end your message with ^Z
|
|
||||||
send "^Z"
|
|
||||||
# wait for it to send
|
|
||||||
waitfor 5 "OK"
|
|
||||||
exit 0
|
|
|
@ -1,21 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
MODEM=/dev/ttyUSB2
|
|
||||||
DESTNUM="+7978XXXXXX"
|
|
||||||
MESSAGE="Hi, there"
|
|
||||||
|
|
||||||
|
|
||||||
# We need to put sleep 1 to slow down commands for modem to process
|
|
||||||
#
|
|
||||||
echo -e "ATZ\r" >${MODEM}
|
|
||||||
sleep 1
|
|
||||||
#
|
|
||||||
echo -e "AT+CMGF=1\r" >${MODEM}
|
|
||||||
sleep 1
|
|
||||||
#
|
|
||||||
echo -e "AT+CMGS=\"$DESTNUM\"\r" >${MODEM}
|
|
||||||
sleep 1
|
|
||||||
#
|
|
||||||
echo -e "${MESSAGE}\x1A" >${MODEM}
|
|
||||||
sleep 1
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
#Set GPRS only mode
|
|
||||||
# $Id: gprs.txt,v 1.1.1.1 2006/08/16 21:21:31 pharscape Exp $
|
|
||||||
set com 115200n81
|
|
||||||
set senddelay 0.05
|
|
||||||
waitquiet 1 0.2
|
|
||||||
send "AT_OPSYS=0^m"
|
|
||||||
print "Setting GPRS only mode\n"
|
|
||||||
get 2 "^m" $s
|
|
||||||
get 2 "^m" $s
|
|
||||||
print $s
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
#Set UMTS only mode
|
|
||||||
# $Id: umts.txt,v 1.1.1.1 2006/08/16 21:21:31 pharscape Exp $
|
|
||||||
|
|
||||||
set com 115200n81
|
|
||||||
set senddelay 0.05
|
|
||||||
waitquiet 1 0.2
|
|
||||||
send "AT_OPSYS=1^m"
|
|
||||||
print "Setting UMTS only mode\n"
|
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
#
|
|
||||||
# sigmon - 3G/GPRS datacard signal strength monitor
|
|
||||||
#
|
|
||||||
# $Id: sigmon,v 1.1 2006/10/20 14:19:54 pharscape Exp $
|
|
||||||
#
|
|
||||||
|
|
||||||
if [ $# -eq 1 ]
|
|
||||||
then
|
|
||||||
if [ "$1" == '-?' ]
|
|
||||||
then
|
|
||||||
echo "Syntax: sigmon"
|
|
||||||
echo "Function: 3G/GPRS datacard signal strength monitor"
|
|
||||||
echo "Options: none"
|
|
||||||
else
|
|
||||||
echo "Invalid option - $1"
|
|
||||||
fi
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
if [ $# -gt 1 ]
|
|
||||||
then
|
|
||||||
echo "Error: only one option permitted"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Use Ctrl/C to terminate monitoring"
|
|
||||||
|
|
||||||
while true
|
|
||||||
do
|
|
||||||
comgt -d /dev/ttyUSB2 sig
|
|
||||||
sleep 5
|
|
||||||
done
|
|
||||||
#
|
|
||||||
# sigmon - use comgt to continuously monitor signal strength
|
|
||||||
# Copyright (C) 2005 Martin Gregorie
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
#
|
|
||||||
# martin@gregorie.org
|
|
||||||
#
|
|
||||||
|
|
|
@ -1,103 +0,0 @@
|
||||||
Change log $Id: CHANGELOG,v 1.3 2006/10/20 14:30:19 pharscape Exp $
|
|
||||||
==========
|
|
||||||
Changes to comgt
|
|
||||||
================
|
|
||||||
Fri Oct. 20th 2006 Paul Hardwick
|
|
||||||
- Scripts distributed with package are now located in scripts sub-directory
|
|
||||||
- Install now copies scripts to /etc/comgt see scripts/README for list of scripts
|
|
||||||
- comgt now implements search priority order for scripts - 1)internal, 2)working directory, 3)/etc/comgt
|
|
||||||
- Added search path for device - /dev/noz2, /dev/ttyUSB2, /dev/modem so -d option is not needed in most cases
|
|
||||||
- Added APN and PIN scripts which use environment variables to set these values - see man page
|
|
||||||
|
|
||||||
Wed Aug 16 2006 Paul Hardwick
|
|
||||||
- For copyright reasons Project and Application now called comgt
|
|
||||||
- Adding CVS version control keywords in preparation for initial Sourceforge import
|
|
||||||
- Added -V version command and moved version info into header.
|
|
||||||
- Initial 0.31 Sourceforge tar.
|
|
||||||
|
|
||||||
Changes to gcom
|
|
||||||
===============
|
|
||||||
Tues Jan 03 2006 Paul Hardwick
|
|
||||||
- Updated gcom for GT EDGE support and added many new built-in scripts
|
|
||||||
- Re-wrote the header file to make it easier to maintain
|
|
||||||
- Updated man-pages
|
|
||||||
- Put it under version control since this utility will now be maintained.
|
|
||||||
- http://peck.gotdns.com/svn/gcom
|
|
||||||
|
|
||||||
Mon Jan 24 2005 Martin Gregorie
|
|
||||||
- changed option handler to avoid reporting a NULL option when no
|
|
||||||
arguments were supplied or when an invalid option was given.
|
|
||||||
- changed the help display to fit neatly on a 25 x 80 telnet or
|
|
||||||
ssh screen.
|
|
||||||
- created the man page from dcon and previous gcom documentation.
|
|
||||||
- created the COMPILING, CHANGELOG, MANIFEST and TODO files from
|
|
||||||
pre-existing documentation.
|
|
||||||
|
|
||||||
October 2003 Paul Hardwick
|
|
||||||
0 Minor changes to make dcon compile with current gcc without
|
|
||||||
errors or warnings.
|
|
||||||
1 Added gcom.h which provides "built-in" scripts and a support
|
|
||||||
routine of specific use to (Option) gsm type modems.
|
|
||||||
2 Modified script loading so that by default every script is
|
|
||||||
pre-pended with an internal "default" script that opens the
|
|
||||||
serial port correctly, checks if a PIN is required (prompting
|
|
||||||
the user if needed) then checks registration status and signal
|
|
||||||
strength. If you call the other built-in scripts then this
|
|
||||||
default is not executed.
|
|
||||||
3 Added "-s" option to skip the internal default script. If this
|
|
||||||
option is used then the user must manually open the serial port
|
|
||||||
with the right baud rate.
|
|
||||||
|
|
||||||
Changes to dcon, all done by Daniel.Chouinard
|
|
||||||
---------------
|
|
||||||
Wed Jan 1 15:32:04 EST 1997
|
|
||||||
- Made it case independent.
|
|
||||||
- Happy new year!
|
|
||||||
- Indexed labels, major speed improvement.
|
|
||||||
|
|
||||||
Mon Dec 30 21:10:46 EST 1996 not distributed
|
|
||||||
- Fixed select() on comfd so that `pppd connect 'dcon script'` works again.
|
|
||||||
|
|
||||||
|
|
||||||
Mon Dec 23 16:10:24 EST 1996 not distributed
|
|
||||||
22 hour session!
|
|
||||||
- Added $right(), $left(), $dirname(), $basename(), $hex(), $hexu(), $oct(),
|
|
||||||
$script(), $tolower(), $toupper(), and verbose() functions.
|
|
||||||
- Added abort, flash, and dump commands.
|
|
||||||
- Fixed #!/usr/local/bin/dcon support.
|
|
||||||
- Fixed re-entrant getstring() bug.
|
|
||||||
- Normalized gettoken() and getstring()
|
|
||||||
- Used getopt() instead of if...else if...else if...
|
|
||||||
- Added 0xffff (hex), 07777 (octal), 0%1111 (binary) notations.
|
|
||||||
- Added [$]a0-z9 variable ranges and managed (Woohee!) to keep it
|
|
||||||
compatible with old syntax.
|
|
||||||
- Only allocate strings as needed.
|
|
||||||
- Much better error reporting and exit code handling.
|
|
||||||
- Pulled a groin muscle while sitting crooked. Go figure.
|
|
||||||
- Created makescript.
|
|
||||||
- Added automatic xterm call in ppp-ex.scr when in X.
|
|
||||||
- Doc: Contents, syntax, error reporting, added new functions, etc...
|
|
||||||
|
|
||||||
Wed Dec 11 18:30:42 EST 1996
|
|
||||||
- Changed my E-mail address in doc.
|
|
||||||
- Added a fix to dogoto() so that the label gets printed in log
|
|
||||||
(less confusing to see if a goto or gosub in test executed or not.)
|
|
||||||
- Had lasagna for supper.
|
|
||||||
|
|
||||||
Sometime a while ago before I moved (August 1996, I think)
|
|
||||||
- Ansified code and Makefile, contributed by John Gotts.
|
|
||||||
(You guys out there are such purists! :)
|
|
||||||
|
|
||||||
Sat Jul 20 08:19:13 EDT 1996 V: 0.96
|
|
||||||
- Better error reporting.
|
|
||||||
|
|
||||||
Fri Jul 19 22:29:37 EDT 1996
|
|
||||||
- Got a bug report from Glen Thigpen that dcon-0.91 reports "Token too long"
|
|
||||||
errors. Found that dcon didn't deal with non-terminated last lines
|
|
||||||
properly. Fixed.
|
|
||||||
|
|
||||||
Mon Apr 29 21:38:04 EDT 1996 V: 0.95
|
|
||||||
- Got a bug report from J. Van Koll reporting that the included
|
|
||||||
ppp-ex.scr had two lines that were truncated. Modified ppp-ex.scr
|
|
||||||
|
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
Building comgt
|
|
||||||
=============
|
|
||||||
Switch to the directory where files from comgt.xxxx.tgz were unpacked. Run:
|
|
||||||
|
|
||||||
make all
|
|
||||||
|
|
||||||
You can run comgt immediately if your datacard is plugged in and you have the appropriate permissions to access the device.
|
|
||||||
|
|
||||||
To install comgt, sigmon and their documentation, become root,
|
|
||||||
make sure you're in the directory where comgt was compiled and run:
|
|
||||||
|
|
||||||
make install
|
|
||||||
|
|
||||||
This will install comgt and sigmon in /usr/local/bin and their manpages
|
|
||||||
in /usr/local/man/man1. If this doesn't match your installation or you
|
|
||||||
want to install the executables and manpages somewhere else, simply
|
|
||||||
edit the EXE and MAN macro definitions on lines 3 and 4 of Makefile.
|
|
||||||
|
|
||||||
To remove the executables and manpages, become root, make sure you're
|
|
||||||
in the directory where comgt was compiled and run:
|
|
||||||
|
|
||||||
make uninstall
|
|
||||||
|
|
||||||
To tidy to after installing comgt, make sure you're logged in as the
|
|
||||||
user who compiled comgt and in the directory where comgt was compiled.
|
|
||||||
Then run:
|
|
||||||
|
|
||||||
make clean
|
|
||||||
|
|
||||||
The example scripts included in the distribution are left in the
|
|
||||||
build directory.
|
|
||||||
|
|
||||||
$Id: COMPILING,v 1.1.1.1 2006/08/16 21:21:31 pharscape Exp $
|
|
|
@ -1,340 +0,0 @@
|
||||||
GNU GENERAL PUBLIC LICENSE
|
|
||||||
Version 2, June 1991
|
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
|
||||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
|
||||||
License is intended to guarantee your freedom to share and change free
|
|
||||||
software--to make sure the software is free for all its users. This
|
|
||||||
General Public License applies to most of the Free Software
|
|
||||||
Foundation's software and to any other program whose authors commit to
|
|
||||||
using it. (Some other Free Software Foundation software is covered by
|
|
||||||
the GNU Library General Public License instead.) You can apply it to
|
|
||||||
your programs, too.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
|
||||||
have the freedom to distribute copies of free software (and charge for
|
|
||||||
this service if you wish), that you receive source code or can get it
|
|
||||||
if you want it, that you can change the software or use pieces of it
|
|
||||||
in new free programs; and that you know you can do these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to make restrictions that forbid
|
|
||||||
anyone to deny you these rights or to ask you to surrender the rights.
|
|
||||||
These restrictions translate to certain responsibilities for you if you
|
|
||||||
distribute copies of the software, or if you modify it.
|
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
|
||||||
gratis or for a fee, you must give the recipients all the rights that
|
|
||||||
you have. You must make sure that they, too, receive or can get the
|
|
||||||
source code. And you must show them these terms so they know their
|
|
||||||
rights.
|
|
||||||
|
|
||||||
We protect your rights with two steps: (1) copyright the software, and
|
|
||||||
(2) offer you this license which gives you legal permission to copy,
|
|
||||||
distribute and/or modify the software.
|
|
||||||
|
|
||||||
Also, for each author's protection and ours, we want to make certain
|
|
||||||
that everyone understands that there is no warranty for this free
|
|
||||||
software. If the software is modified by someone else and passed on, we
|
|
||||||
want its recipients to know that what they have is not the original, so
|
|
||||||
that any problems introduced by others will not reflect on the original
|
|
||||||
authors' reputations.
|
|
||||||
|
|
||||||
Finally, any free program is threatened constantly by software
|
|
||||||
patents. We wish to avoid the danger that redistributors of a free
|
|
||||||
program will individually obtain patent licenses, in effect making the
|
|
||||||
program proprietary. To prevent this, we have made it clear that any
|
|
||||||
patent must be licensed for everyone's free use or not licensed at all.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
|
|
||||||
GNU GENERAL PUBLIC LICENSE
|
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
||||||
|
|
||||||
0. This License applies to any program or other work which contains
|
|
||||||
a notice placed by the copyright holder saying it may be distributed
|
|
||||||
under the terms of this General Public License. The "Program", below,
|
|
||||||
refers to any such program or work, and a "work based on the Program"
|
|
||||||
means either the Program or any derivative work under copyright law:
|
|
||||||
that is to say, a work containing the Program or a portion of it,
|
|
||||||
either verbatim or with modifications and/or translated into another
|
|
||||||
language. (Hereinafter, translation is included without limitation in
|
|
||||||
the term "modification".) Each licensee is addressed as "you".
|
|
||||||
|
|
||||||
Activities other than copying, distribution and modification are not
|
|
||||||
covered by this License; they are outside its scope. The act of
|
|
||||||
running the Program is not restricted, and the output from the Program
|
|
||||||
is covered only if its contents constitute a work based on the
|
|
||||||
Program (independent of having been made by running the Program).
|
|
||||||
Whether that is true depends on what the Program does.
|
|
||||||
|
|
||||||
1. You may copy and distribute verbatim copies of the Program's
|
|
||||||
source code as you receive it, in any medium, provided that you
|
|
||||||
conspicuously and appropriately publish on each copy an appropriate
|
|
||||||
copyright notice and disclaimer of warranty; keep intact all the
|
|
||||||
notices that refer to this License and to the absence of any warranty;
|
|
||||||
and give any other recipients of the Program a copy of this License
|
|
||||||
along with the Program.
|
|
||||||
|
|
||||||
You may charge a fee for the physical act of transferring a copy, and
|
|
||||||
you may at your option offer warranty protection in exchange for a fee.
|
|
||||||
|
|
||||||
2. You may modify your copy or copies of the Program or any portion
|
|
||||||
of it, thus forming a work based on the Program, and copy and
|
|
||||||
distribute such modifications or work under the terms of Section 1
|
|
||||||
above, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) You must cause the modified files to carry prominent notices
|
|
||||||
stating that you changed the files and the date of any change.
|
|
||||||
|
|
||||||
b) You must cause any work that you distribute or publish, that in
|
|
||||||
whole or in part contains or is derived from the Program or any
|
|
||||||
part thereof, to be licensed as a whole at no charge to all third
|
|
||||||
parties under the terms of this License.
|
|
||||||
|
|
||||||
c) If the modified program normally reads commands interactively
|
|
||||||
when run, you must cause it, when started running for such
|
|
||||||
interactive use in the most ordinary way, to print or display an
|
|
||||||
announcement including an appropriate copyright notice and a
|
|
||||||
notice that there is no warranty (or else, saying that you provide
|
|
||||||
a warranty) and that users may redistribute the program under
|
|
||||||
these conditions, and telling the user how to view a copy of this
|
|
||||||
License. (Exception: if the Program itself is interactive but
|
|
||||||
does not normally print such an announcement, your work based on
|
|
||||||
the Program is not required to print an announcement.)
|
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
|
||||||
identifiable sections of that work are not derived from the Program,
|
|
||||||
and can be reasonably considered independent and separate works in
|
|
||||||
themselves, then this License, and its terms, do not apply to those
|
|
||||||
sections when you distribute them as separate works. But when you
|
|
||||||
distribute the same sections as part of a whole which is a work based
|
|
||||||
on the Program, the distribution of the whole must be on the terms of
|
|
||||||
this License, whose permissions for other licensees extend to the
|
|
||||||
entire whole, and thus to each and every part regardless of who wrote it.
|
|
||||||
|
|
||||||
Thus, it is not the intent of this section to claim rights or contest
|
|
||||||
your rights to work written entirely by you; rather, the intent is to
|
|
||||||
exercise the right to control the distribution of derivative or
|
|
||||||
collective works based on the Program.
|
|
||||||
|
|
||||||
In addition, mere aggregation of another work not based on the Program
|
|
||||||
with the Program (or with a work based on the Program) on a volume of
|
|
||||||
a storage or distribution medium does not bring the other work under
|
|
||||||
the scope of this License.
|
|
||||||
|
|
||||||
3. You may copy and distribute the Program (or a work based on it,
|
|
||||||
under Section 2) in object code or executable form under the terms of
|
|
||||||
Sections 1 and 2 above provided that you also do one of the following:
|
|
||||||
|
|
||||||
a) Accompany it with the complete corresponding machine-readable
|
|
||||||
source code, which must be distributed under the terms of Sections
|
|
||||||
1 and 2 above on a medium customarily used for software interchange; or,
|
|
||||||
|
|
||||||
b) Accompany it with a written offer, valid for at least three
|
|
||||||
years, to give any third party, for a charge no more than your
|
|
||||||
cost of physically performing source distribution, a complete
|
|
||||||
machine-readable copy of the corresponding source code, to be
|
|
||||||
distributed under the terms of Sections 1 and 2 above on a medium
|
|
||||||
customarily used for software interchange; or,
|
|
||||||
|
|
||||||
c) Accompany it with the information you received as to the offer
|
|
||||||
to distribute corresponding source code. (This alternative is
|
|
||||||
allowed only for noncommercial distribution and only if you
|
|
||||||
received the program in object code or executable form with such
|
|
||||||
an offer, in accord with Subsection b above.)
|
|
||||||
|
|
||||||
The source code for a work means the preferred form of the work for
|
|
||||||
making modifications to it. For an executable work, complete source
|
|
||||||
code means all the source code for all modules it contains, plus any
|
|
||||||
associated interface definition files, plus the scripts used to
|
|
||||||
control compilation and installation of the executable. However, as a
|
|
||||||
special exception, the source code distributed need not include
|
|
||||||
anything that is normally distributed (in either source or binary
|
|
||||||
form) with the major components (compiler, kernel, and so on) of the
|
|
||||||
operating system on which the executable runs, unless that component
|
|
||||||
itself accompanies the executable.
|
|
||||||
|
|
||||||
If distribution of executable or object code is made by offering
|
|
||||||
access to copy from a designated place, then offering equivalent
|
|
||||||
access to copy the source code from the same place counts as
|
|
||||||
distribution of the source code, even though third parties are not
|
|
||||||
compelled to copy the source along with the object code.
|
|
||||||
|
|
||||||
4. You may not copy, modify, sublicense, or distribute the Program
|
|
||||||
except as expressly provided under this License. Any attempt
|
|
||||||
otherwise to copy, modify, sublicense or distribute the Program is
|
|
||||||
void, and will automatically terminate your rights under this License.
|
|
||||||
However, parties who have received copies, or rights, from you under
|
|
||||||
this License will not have their licenses terminated so long as such
|
|
||||||
parties remain in full compliance.
|
|
||||||
|
|
||||||
5. You are not required to accept this License, since you have not
|
|
||||||
signed it. However, nothing else grants you permission to modify or
|
|
||||||
distribute the Program or its derivative works. These actions are
|
|
||||||
prohibited by law if you do not accept this License. Therefore, by
|
|
||||||
modifying or distributing the Program (or any work based on the
|
|
||||||
Program), you indicate your acceptance of this License to do so, and
|
|
||||||
all its terms and conditions for copying, distributing or modifying
|
|
||||||
the Program or works based on it.
|
|
||||||
|
|
||||||
6. Each time you redistribute the Program (or any work based on the
|
|
||||||
Program), the recipient automatically receives a license from the
|
|
||||||
original licensor to copy, distribute or modify the Program subject to
|
|
||||||
these terms and conditions. You may not impose any further
|
|
||||||
restrictions on the recipients' exercise of the rights granted herein.
|
|
||||||
You are not responsible for enforcing compliance by third parties to
|
|
||||||
this License.
|
|
||||||
|
|
||||||
7. If, as a consequence of a court judgment or allegation of patent
|
|
||||||
infringement or for any other reason (not limited to patent issues),
|
|
||||||
conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot
|
|
||||||
distribute so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you
|
|
||||||
may not distribute the Program at all. For example, if a patent
|
|
||||||
license would not permit royalty-free redistribution of the Program by
|
|
||||||
all those who receive copies directly or indirectly through you, then
|
|
||||||
the only way you could satisfy both it and this License would be to
|
|
||||||
refrain entirely from distribution of the Program.
|
|
||||||
|
|
||||||
If any portion of this section is held invalid or unenforceable under
|
|
||||||
any particular circumstance, the balance of the section is intended to
|
|
||||||
apply and the section as a whole is intended to apply in other
|
|
||||||
circumstances.
|
|
||||||
|
|
||||||
It is not the purpose of this section to induce you to infringe any
|
|
||||||
patents or other property right claims or to contest validity of any
|
|
||||||
such claims; this section has the sole purpose of protecting the
|
|
||||||
integrity of the free software distribution system, which is
|
|
||||||
implemented by public license practices. Many people have made
|
|
||||||
generous contributions to the wide range of software distributed
|
|
||||||
through that system in reliance on consistent application of that
|
|
||||||
system; it is up to the author/donor to decide if he or she is willing
|
|
||||||
to distribute software through any other system and a licensee cannot
|
|
||||||
impose that choice.
|
|
||||||
|
|
||||||
This section is intended to make thoroughly clear what is believed to
|
|
||||||
be a consequence of the rest of this License.
|
|
||||||
|
|
||||||
8. If the distribution and/or use of the Program is restricted in
|
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
|
||||||
original copyright holder who places the Program under this License
|
|
||||||
may add an explicit geographical distribution limitation excluding
|
|
||||||
those countries, so that distribution is permitted only in or among
|
|
||||||
countries not thus excluded. In such case, this License incorporates
|
|
||||||
the limitation as if written in the body of this License.
|
|
||||||
|
|
||||||
9. The Free Software Foundation may publish revised and/or new versions
|
|
||||||
of the General Public License from time to time. Such new versions will
|
|
||||||
be similar in spirit to the present version, but may differ in detail to
|
|
||||||
address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the Program
|
|
||||||
specifies a version number of this License which applies to it and "any
|
|
||||||
later version", you have the option of following the terms and conditions
|
|
||||||
either of that version or of any later version published by the Free
|
|
||||||
Software Foundation. If the Program does not specify a version number of
|
|
||||||
this License, you may choose any version ever published by the Free Software
|
|
||||||
Foundation.
|
|
||||||
|
|
||||||
10. If you wish to incorporate parts of the Program into other free
|
|
||||||
programs whose distribution conditions are different, write to the author
|
|
||||||
to ask for permission. For software which is copyrighted by the Free
|
|
||||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
|
||||||
make exceptions for this. Our decision will be guided by the two goals
|
|
||||||
of preserving the free status of all derivatives of our free software and
|
|
||||||
of promoting the sharing and reuse of software generally.
|
|
||||||
|
|
||||||
NO WARRANTY
|
|
||||||
|
|
||||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
|
||||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
|
||||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
|
||||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
|
||||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
|
||||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
|
||||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
|
||||||
REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
|
||||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
|
||||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
|
||||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
|
||||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
|
||||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
|
||||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
|
||||||
POSSIBILITY OF SUCH DAMAGES.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
|
||||||
possible use to the public, the best way to achieve this is to make it
|
|
||||||
free software which everyone can redistribute and change under these terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
|
||||||
to attach them to the start of each source file to most effectively
|
|
||||||
convey the exclusion of warranty; and each file should have at least
|
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If the program is interactive, make it output a short notice like this
|
|
||||||
when it starts in an interactive mode:
|
|
||||||
|
|
||||||
Gnomovision version 69, Copyright (C) year name of author
|
|
||||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
|
||||||
This is free software, and you are welcome to redistribute it
|
|
||||||
under certain conditions; type `show c' for details.
|
|
||||||
|
|
||||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
|
||||||
parts of the General Public License. Of course, the commands you use may
|
|
||||||
be called something other than `show w' and `show c'; they could even be
|
|
||||||
mouse-clicks or menu items--whatever suits your program.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or your
|
|
||||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
|
||||||
necessary. Here is a sample; alter the names:
|
|
||||||
|
|
||||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
|
||||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
|
||||||
|
|
||||||
<signature of Ty Coon>, 1 April 1989
|
|
||||||
Ty Coon, President of Vice
|
|
||||||
|
|
||||||
This General Public License does not permit incorporating your program into
|
|
||||||
proprietary programs. If your program is a subroutine library, you may
|
|
||||||
consider it more useful to permit linking proprietary applications with the
|
|
||||||
library. If this is what you want to do, use the GNU Library General
|
|
||||||
Public License instead of this License.
|
|
|
@ -1,25 +0,0 @@
|
||||||
#
|
|
||||||
# Makefile - build and install the comgt package
|
|
||||||
#
|
|
||||||
# Copyright (C) 2005 Martin Gregorie, martin@gregorie.org
|
|
||||||
# Copyright (C) 2006 Paul Hardwick, paul@peck.org.uk
|
|
||||||
# Copyright (C) 2022 Igor Zalatov, flyrouter@gmail.com
|
|
||||||
#
|
|
||||||
|
|
||||||
all: comgt
|
|
||||||
|
|
||||||
install:
|
|
||||||
chmod a+x $(BIN)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
-rm *.o comgt
|
|
||||||
|
|
||||||
comgt: comgt.o
|
|
||||||
cc comgt.o $(LDFLAGS) -o comgt
|
|
||||||
|
|
||||||
comgt.o: comgt.c comgt.h
|
|
||||||
cc comgt.c $(CFLAGS)
|
|
||||||
|
|
||||||
comgt: comgt.c comgt.h
|
|
||||||
$(CC) $(CFLAGS) -o comgt $< $(LDFLAGS)
|
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
To Do
|
|
||||||
=====
|
|
||||||
Better error handling for built-in scripts. (non-existent at the moment)
|
|
||||||
|
|
||||||
Old - unlikely to be addressed:
|
|
||||||
Option: locking (uucp? What's the standard?) (Who cares?)
|
|
||||||
|
|
||||||
Better testkey (Change stdin mode to raw, update input, system, exec & exit)
|
|
||||||
|
|
||||||
getcomchar() (Get one byte from com so a dumb term could be written in a
|
|
||||||
script. Should be done only after testkey)
|
|
||||||
|
|
||||||
Polling sucks. Could this be (major) changed to be interrupt-driven?
|
|
||||||
(Do people still use non-16550s out there?)
|
|
||||||
|
|
||||||
Error reporting doesn't display the line containing the error.
|
|
||||||
|
|
||||||
$Id: TODO,v 1.1 2006/08/20 23:53:19 pharscape Exp $
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,548 +0,0 @@
|
||||||
/***************************************************************************
|
|
||||||
* comgt.h - 3G/GPRS datacard management utility header file
|
|
||||||
*
|
|
||||||
* Copyright (C) 2003 Paul Hardwick <paul@peck.org>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
/***************************************************************************
|
|
||||||
* $Id: comgt.h,v 1.4 2006/10/20 14:30:19 pharscape Exp $
|
|
||||||
****************************************************************************/
|
|
||||||
#define COMGT_VERSION "0.32"
|
|
||||||
#define YEARS "2005,2006"
|
|
||||||
|
|
||||||
char _default_code[] =
|
|
||||||
"opengt\n\
|
|
||||||
set com 115200n81\n\
|
|
||||||
set senddelay 0.05\n\
|
|
||||||
send \"AT+CFUN=1^m\"\n\
|
|
||||||
waitquiet 1 0.2\n\
|
|
||||||
:start\n\
|
|
||||||
flash 0.1\n\
|
|
||||||
send \"AT+CPIN?^m\"\n\
|
|
||||||
waitfor 30 \"SIM PUK\",\"SIM PIN\",\"READY\",\"ERROR\",\"ERR\"\n\
|
|
||||||
if % = -1 goto error\n\
|
|
||||||
if % = 0 goto ready\n\
|
|
||||||
if % = 1 goto getpin\n\
|
|
||||||
if % = 2 goto ready\n\
|
|
||||||
if % = 3 goto error\n\
|
|
||||||
if % = 4 goto error\n\
|
|
||||||
:error\n\
|
|
||||||
print $s,\" ***SIM ERROR***\n\"\n\
|
|
||||||
print \"Check device port configuration.\nCheck SIM is inserted\nTest SIM in a mobile phone?\n\"\n\
|
|
||||||
exit 1\n\
|
|
||||||
:getpin\n\
|
|
||||||
#handle case where original Vodafone 3G generates wrong response\n\
|
|
||||||
waitfor 1 \"2\"\n\
|
|
||||||
if % = 0 goto ready\n\
|
|
||||||
print \"\nEnter PIN number: \"\n\
|
|
||||||
input $x\n\
|
|
||||||
let a=len($x)\n\
|
|
||||||
if a<>5 goto getpin\n\
|
|
||||||
let c=0\n\
|
|
||||||
:test\n\
|
|
||||||
let $c=$mid($x,c,1)\n\
|
|
||||||
if $c<\"0\" goto getpin\n\
|
|
||||||
if $c>\"9\" goto getpin\n\
|
|
||||||
inc c\n\
|
|
||||||
if c<4 goto test\n\
|
|
||||||
let a=val($x)\n\
|
|
||||||
if a<0 goto getpin\n\
|
|
||||||
if a>9999 goto getpin\n\
|
|
||||||
let $c=$left($x,4)\n\
|
|
||||||
:enterpin\n\
|
|
||||||
send \"AT+CPIN=\\\"\"\n\
|
|
||||||
send $c\n\
|
|
||||||
send \"\\\"^m\"\n\
|
|
||||||
waitfor 20 \"OK\",\"ERR\"\n\
|
|
||||||
if % = -1 goto timeerror\n\
|
|
||||||
if % = 0 goto cont\n\
|
|
||||||
if % = 1 goto pinerror\n\
|
|
||||||
:pinerror\n\
|
|
||||||
:timeerror\n\
|
|
||||||
print \"ERROR entering PIN code\n\"\n\
|
|
||||||
print \"Caution! - entering the wrong PIN code three times will lock the SIM\n\"\n\
|
|
||||||
exit 1\n\
|
|
||||||
:ready\n\
|
|
||||||
print \"SIM ready\n\"\n\
|
|
||||||
:cont\n\
|
|
||||||
print \"Waiting for Registration..(120 sec max)\"\n\
|
|
||||||
let c = 0\n\
|
|
||||||
:waitreg\n\
|
|
||||||
send \"AT+CREG?^m\"\n\
|
|
||||||
waitfor 2 \"+CREG: 0,1\",\"+CREG: 0,5\"\n\
|
|
||||||
if % = -1 goto regagain\n\
|
|
||||||
if % = 0 goto homereg\n\
|
|
||||||
if % = 1 goto roamreg\n\
|
|
||||||
:regagain\n\
|
|
||||||
if c > 120 goto regtimeout\n\
|
|
||||||
let c=c+2\n\
|
|
||||||
print \".\"\n\
|
|
||||||
goto waitreg\n\
|
|
||||||
:regtimeout\n\
|
|
||||||
print \"\nFailed to register\n\"\n\
|
|
||||||
exit 1\n\
|
|
||||||
:homereg\n\
|
|
||||||
print \"\nRegistered on Home network: \"\n\
|
|
||||||
goto registered\n\
|
|
||||||
:roamreg\n\
|
|
||||||
print \"\nRegistered on Roaming network: \"\n\
|
|
||||||
goto registered\n\
|
|
||||||
:registered\n\
|
|
||||||
waitquiet 1 0.1\n\
|
|
||||||
send \"AT+COPS?^m\"\n\
|
|
||||||
get 2 \"^m\" $s\n\
|
|
||||||
get 2 \"^m\" $s\n\
|
|
||||||
let a=len($s)\n\
|
|
||||||
let b=a-12\n\
|
|
||||||
if b < 1 goto regtimeout\n\
|
|
||||||
let $c=$right($s,b)\n\
|
|
||||||
print $c,\"\n\"\n\
|
|
||||||
let c=0\n\
|
|
||||||
:signal\n\
|
|
||||||
waitquiet 1 0.1\n\
|
|
||||||
send \"AT+CSQ^m\"\n\
|
|
||||||
get 2 \"^m\" $s\n\
|
|
||||||
get 2 \"^m\" $s\n\
|
|
||||||
let a=len($s)\n\
|
|
||||||
let a=a-6\n\
|
|
||||||
let $s=$right($s,a)\n\
|
|
||||||
if $s <> \"0,0\" goto sigcont\n\
|
|
||||||
if c > 3 goto sigexit\n\
|
|
||||||
let c=c+1\n\
|
|
||||||
pause 1\n\
|
|
||||||
goto signal\n\
|
|
||||||
:sigexit\n\
|
|
||||||
print \"Signal strength measure 0,0 too low!\"\n\
|
|
||||||
exit 1\n\
|
|
||||||
:sigcont\n\
|
|
||||||
print \"Signal Quality:\",$s,\"\\n\"\n\
|
|
||||||
waitquiet 1 0.1\n";
|
|
||||||
|
|
||||||
char _info_code[] =
|
|
||||||
"print \"##### Wireless WAN Modem Configuration #####\\n\"\n\
|
|
||||||
opengt\n\
|
|
||||||
set com 115200n81\n\
|
|
||||||
set senddelay 0.05\n\
|
|
||||||
waitquiet 2 0.5\n\
|
|
||||||
:name\n\
|
|
||||||
print \"Product text:\n====\n\"\n\
|
|
||||||
send \"ATi^m\"\n\
|
|
||||||
get 1 \" ^m\" $s\n\
|
|
||||||
:more\n\
|
|
||||||
get 1 \"^m\" $s\n\
|
|
||||||
let x=len($s)\n\
|
|
||||||
if $s=\"OK\n\" goto manf\n\
|
|
||||||
#dump\n\
|
|
||||||
if x<1 goto manf\n\
|
|
||||||
if $s=\"\n\" goto more\n\
|
|
||||||
print $s\n\
|
|
||||||
goto more\n\
|
|
||||||
:manf\n\
|
|
||||||
print \"\n====\n\"\n\
|
|
||||||
waitquiet 2 0.1\n\
|
|
||||||
print \"Manufacturer: \"\n\
|
|
||||||
send \"AT+cgmi^m\"\n\
|
|
||||||
get 1 \"^m\" $s\n\
|
|
||||||
get 1 \"^m\" $s\n\
|
|
||||||
let x=len($s)\n\
|
|
||||||
if x<1 goto imei_serial\n\
|
|
||||||
dec x\n\
|
|
||||||
let $s=$right($s,x)\n\
|
|
||||||
print $s,\"\\n\"\n\
|
|
||||||
:imei_serial\n\
|
|
||||||
waitquiet 5 0.1\n\
|
|
||||||
print \"IMEI and Serial Number: \"\n\
|
|
||||||
send \"AT+GSN^m\"\n\
|
|
||||||
get 2 \"^m\" $s\n\
|
|
||||||
get 2 \"^m\" $s\n\
|
|
||||||
let x=len($s)\n\
|
|
||||||
dec x\n\
|
|
||||||
let $s=$right($s,x)\n\
|
|
||||||
print ,$s,\"\\n\"\n\
|
|
||||||
:firmware\n\
|
|
||||||
waitquiet 5 0.1\n\
|
|
||||||
print \"Manufacturer\'s Revision: \"\n\
|
|
||||||
send \"AT+GMR^m\"\n\
|
|
||||||
get 2 \"^m\" $s\n\
|
|
||||||
get 2 \"^m\" $s\n\
|
|
||||||
let x=len($s)\n\
|
|
||||||
dec x\n\
|
|
||||||
dec x\n\
|
|
||||||
let $s=$left($s,x)\n\
|
|
||||||
print $s,\"\\n\"\n\
|
|
||||||
:hardware\n\
|
|
||||||
waitquiet 5 0.1\n\
|
|
||||||
print \"Hardware Revision: \"\n\
|
|
||||||
send \"AT_OHWV^m\"\n\
|
|
||||||
get 2 \" ^m\" $s\n\
|
|
||||||
get 2 \" ^m\" $s\n\
|
|
||||||
get 2 \" ^m\" $s\n\
|
|
||||||
print $s,\"\\n\"\n\
|
|
||||||
:networklock\n\
|
|
||||||
waitquiet 5 0.1\n\
|
|
||||||
print \"Network Locked: \"\n\
|
|
||||||
send \"AT+clck=\\\"PN\\\",2^m\"\n\
|
|
||||||
get 2 \" ^m\" $s\n\
|
|
||||||
get 2 \" ^m\" $s\n\
|
|
||||||
get 2 \" ^m\" $s\n\
|
|
||||||
print $s,\"\\n\"\n\
|
|
||||||
waitquiet 5 0.1\n\
|
|
||||||
:customized\n\
|
|
||||||
print \"Customisation: \"\n\
|
|
||||||
send \"AT_ocst^m\"\n\
|
|
||||||
get 2 \" ^m\" $s\n\
|
|
||||||
get 2 \" ^m\" $s\n\
|
|
||||||
get 2 \",^m\" $s\n\
|
|
||||||
print $s,\"\\n\"\n\
|
|
||||||
:bandsettings\n\
|
|
||||||
waitquiet 5 0.1\n\
|
|
||||||
print \"Band settings: \"\n\
|
|
||||||
send \"AT_OSBM?^m\"\n\
|
|
||||||
get 2 \" ^m\" $s\n\
|
|
||||||
get 2 \" ^m\" $s\n\
|
|
||||||
get 2 \" ^m\" $s\n\
|
|
||||||
if $s=\"4\" print \"Europe 900/1800MHz \"\n\
|
|
||||||
if $s=\"5\" print \"USA 900/1900MHz \"\n\
|
|
||||||
print \"(\",$s,\")\\n\" \n\
|
|
||||||
:apn\n\
|
|
||||||
waitquiet 5 0.1\n\
|
|
||||||
print \"APN: \"\n\
|
|
||||||
send \"AT+CGDCONT?^m\"\n\
|
|
||||||
get 2 \" ^m\" $s\n\
|
|
||||||
get 2 \" ^m\" $s\n\
|
|
||||||
get 2 \" ^m\" $s\n\
|
|
||||||
print $s,\"\\n\" \n\
|
|
||||||
waitquiet 5 0.1 \n\
|
|
||||||
print \"##### END #####\\n\"" ;
|
|
||||||
|
|
||||||
|
|
||||||
char _USA_code[]=
|
|
||||||
"print \"##### Band Change to USA operation #####\\n\"\n\
|
|
||||||
opengt\n\
|
|
||||||
set com 115200n81\n\
|
|
||||||
set senddelay 0.05\n\
|
|
||||||
waitquiet 2 0.5\n\
|
|
||||||
send \"AT_OSBM=5^m\"\n\
|
|
||||||
waitfor 10 \"OK\",\"ERR\"\n\
|
|
||||||
if % = -1 goto timeout\n\
|
|
||||||
if % = 0 goto cont\n\
|
|
||||||
if % = 1 goto error\n\
|
|
||||||
:timeout\n\
|
|
||||||
print \"Timeout Error communicating with device.\n\"\n\
|
|
||||||
exit 1\n\
|
|
||||||
:error\n\
|
|
||||||
print \"Error response from device.\n\"\n\
|
|
||||||
exit 1\n\
|
|
||||||
:cont\n\
|
|
||||||
print \"Complete\\n\"\n";
|
|
||||||
|
|
||||||
char _Europe_code[] =
|
|
||||||
"print \"##### Band Change to European operation #####\\n\"\n\
|
|
||||||
opengt\n\
|
|
||||||
set com 115200n81\n\
|
|
||||||
set senddelay 0.05\n\
|
|
||||||
waitquiet 2 0.5\n\
|
|
||||||
send \"AT_OSBM=4^m\"\n\
|
|
||||||
waitfor 10 \"OK\",\"ERR\"\n\
|
|
||||||
if % = -1 goto timeout\n\
|
|
||||||
if % = 0 goto cont\n\
|
|
||||||
if % = 1 goto error\n\
|
|
||||||
:timeout\n\
|
|
||||||
print \"Timeout Error communicating with device.\n\"\n\
|
|
||||||
exit 1\n\
|
|
||||||
:error\n\
|
|
||||||
print \"Error response from device.\n\"\n\
|
|
||||||
exit 1\n\
|
|
||||||
:cont\n\
|
|
||||||
print \"Complete\\n\"\n";
|
|
||||||
|
|
||||||
char _sig_code[] =
|
|
||||||
"opengt\n\
|
|
||||||
set com 115200n81\n\
|
|
||||||
set senddelay 0.05\n\
|
|
||||||
waitquiet 2 0.5\n\
|
|
||||||
let c=0\n\
|
|
||||||
:signal\n\
|
|
||||||
waitquiet 1 0.1\n\
|
|
||||||
send \"AT+CSQ^m\"\n\
|
|
||||||
get 2 \"^m\" $s\n\
|
|
||||||
get 2 \"^m\" $s\n\
|
|
||||||
let a=len($s)\n\
|
|
||||||
let a=a-6\n\
|
|
||||||
let $s=$right($s,a)\n\
|
|
||||||
if $s <> \"0,0\" goto sigcont\n\
|
|
||||||
if c > 3 goto sigexit\n\
|
|
||||||
let c=c+1\n\
|
|
||||||
pause 1\n\
|
|
||||||
goto signal\n\
|
|
||||||
:sigexit\n\
|
|
||||||
print \"Signal strength measure 0,0 too low!\"\n\
|
|
||||||
exit 1\n\
|
|
||||||
:sigcont\n\
|
|
||||||
print \"Signal Quality:\",$s,\"\\n\"\n\
|
|
||||||
waitquiet 1 0.1\n\
|
|
||||||
exit 0\n";
|
|
||||||
|
|
||||||
char _reg_code[] =
|
|
||||||
"opengt\n\
|
|
||||||
set com 115200n81\n\
|
|
||||||
set senddelay 0.05\n\
|
|
||||||
waitquiet 2 0.5\n\
|
|
||||||
print \"Waiting for Registration\"\n\
|
|
||||||
let c = 0\n\
|
|
||||||
:waitreg\n\
|
|
||||||
send \"AT+CREG?^m\"\n\
|
|
||||||
waitfor 2 \"+CREG: 0,1\",\"+CREG: 0,5\"\n\
|
|
||||||
if % = -1 goto regagain\n\
|
|
||||||
if % = 0 goto homereg\n\
|
|
||||||
if % = 1 goto roamreg\n\
|
|
||||||
:regagain\n\
|
|
||||||
if c > 120 goto regtimeout\n\
|
|
||||||
let c=c+2\n\
|
|
||||||
print \".\"\n\
|
|
||||||
goto waitreg\n\
|
|
||||||
:regtimeout\n\
|
|
||||||
print \"\nFailed to register\n\"\n\
|
|
||||||
exit 1\n\
|
|
||||||
:homereg\n\
|
|
||||||
print \"\nRegistered on Home network: \"\n\
|
|
||||||
goto registered\n\
|
|
||||||
:roamreg\n\
|
|
||||||
print \"\nRegistered on Roaming network: \"\n\
|
|
||||||
goto registered\n\
|
|
||||||
:registered\n\
|
|
||||||
waitquiet 1 0.1\n\
|
|
||||||
send \"AT+COPS?^m\"\n\
|
|
||||||
get 2 \"^m\" $s\n\
|
|
||||||
get 2 \"^m\" $s\n\
|
|
||||||
let a=len($s)\n\
|
|
||||||
let b=a-12\n\
|
|
||||||
if b < 1 goto regtimeout\n\
|
|
||||||
let $c=$right($s,b)\n\
|
|
||||||
print $c,\"\n\"\n";
|
|
||||||
|
|
||||||
char _3G2G_mode_code[] =
|
|
||||||
"opengt\n\
|
|
||||||
set com 115200n81\n\
|
|
||||||
set senddelay 0.05\n\
|
|
||||||
waitquiet 1 0.2\n\
|
|
||||||
send \"AT_OPSYS=3^m\"\n\
|
|
||||||
waitfor 10 \"OK\",\"ERR\"\n\
|
|
||||||
if % = -1 goto timeout\n\
|
|
||||||
if % = 0 goto cont\n\
|
|
||||||
if % = 1 goto error\n\
|
|
||||||
:timeout\n\
|
|
||||||
print \"Timeout Error communicating with device.\n\"\n\
|
|
||||||
exit 1\n\
|
|
||||||
:error\n\
|
|
||||||
print \"Error response from device.\n\"\n\
|
|
||||||
exit 1\n\
|
|
||||||
:cont\n\
|
|
||||||
print \"Set 3G preferred mode\\n\"\n";
|
|
||||||
|
|
||||||
|
|
||||||
char _3G_mode_code[] =
|
|
||||||
"opengt\n\
|
|
||||||
set com 115200n81\n\
|
|
||||||
set senddelay 0.05\n\
|
|
||||||
waitquiet 1 0.2\n\
|
|
||||||
send \"AT_OPSYS=1^m\"\n\
|
|
||||||
waitfor 10 \"OK\",\"ERR\"\n\
|
|
||||||
if % = -1 goto timeout\n\
|
|
||||||
if % = 0 goto cont\n\
|
|
||||||
if % = 1 goto error\n\
|
|
||||||
:timeout\n\
|
|
||||||
print \"Timeout Error communicating with device.\n\"\n\
|
|
||||||
exit 1\n\
|
|
||||||
:error\n\
|
|
||||||
print \"Error response from device.\n\"\n\
|
|
||||||
exit 1\n\
|
|
||||||
:cont\n\
|
|
||||||
print \"Set 3G only mode\\n\"\n";
|
|
||||||
|
|
||||||
char _2G_mode_code[] =
|
|
||||||
"opengt\n\
|
|
||||||
set com 115200n81\n\
|
|
||||||
set senddelay 0.05\n\
|
|
||||||
waitquiet 1 0.2\n\
|
|
||||||
send \"AT_OPSYS=0^m\"\n\
|
|
||||||
waitfor 10 \"OK\",\"ERR\"\n\
|
|
||||||
if % = -1 goto timeout\n\
|
|
||||||
if % = 0 goto cont\n\
|
|
||||||
if % = 1 goto error\n\
|
|
||||||
:timeout\n\
|
|
||||||
print \"Timeout Error communicating with device.\n\"\n\
|
|
||||||
exit 1\n\
|
|
||||||
:error\n\
|
|
||||||
print \"Error response from device.\n\"\n\
|
|
||||||
exit 1\n\
|
|
||||||
:cont\n\
|
|
||||||
print \"Set 2G only mode\\n\"\n";
|
|
||||||
|
|
||||||
char _GTEDGE_code[] =
|
|
||||||
"opengt\n\
|
|
||||||
set com 57600n81\n\
|
|
||||||
send \"AT+CFUN=1^m\"\n\
|
|
||||||
waitquiet 5 0.2";
|
|
||||||
|
|
||||||
char _SETPIN_code[]=
|
|
||||||
"opengt\n\
|
|
||||||
set com 115200n81\n\
|
|
||||||
set senddelay 0.05\n\
|
|
||||||
waitquiet 1 0.2\n\
|
|
||||||
:start\n\
|
|
||||||
flash 0.1\n\
|
|
||||||
send \"AT+CPIN?^m\"\n\
|
|
||||||
waitfor 30 \"SIM PUK\",\"SIM PIN\",\"READY\",\"ERROR\",\"ERR\"\n\
|
|
||||||
if % = -1 goto error\n\
|
|
||||||
if % = 0 goto ready\n\
|
|
||||||
if % = 1 goto getpin\n\
|
|
||||||
if % = 2 goto ready\n\
|
|
||||||
if % = 3 goto error\n\
|
|
||||||
if % = 4 goto error\n\
|
|
||||||
:error\n\
|
|
||||||
print $s,\" ***SIM ERROR***\n\"\n\
|
|
||||||
print \"Check device port configuration.\nCheck SIM is inserted\nTest SIM in a mobile phone?\n\"\n\
|
|
||||||
exit 1\n\
|
|
||||||
:getpin\n\
|
|
||||||
#handle case where original Vodafone 3G generates wrong response\n\
|
|
||||||
let $x=$env(\"COMGTPIN\")\n\
|
|
||||||
let a=len($x)\n\
|
|
||||||
if a=0 goto pinenverr\n\
|
|
||||||
if a<>4 goto pinerror\n\
|
|
||||||
let c=0\n\
|
|
||||||
:test\n\
|
|
||||||
let $c=$mid($x,c,1)\n\
|
|
||||||
if $c<\"0\" goto pinerror\n\
|
|
||||||
if $c>\"9\" goto pinerror\n\
|
|
||||||
inc c\n\
|
|
||||||
if c<4 goto test\n\
|
|
||||||
let a=val($x)\n\
|
|
||||||
if a<0 goto pinerror\n\
|
|
||||||
if a>9999 goto pinerror\n\
|
|
||||||
let $c=$left($x,4)\n\
|
|
||||||
:enterpin\n\
|
|
||||||
send \"AT+CPIN=\\\"\"\n\
|
|
||||||
send $c\n\
|
|
||||||
send \"\\\"^m\"\n\
|
|
||||||
waitfor 20 \"OK\",\"ERR\"\n\
|
|
||||||
if % = -1 goto timeerror\n\
|
|
||||||
if % = 0 goto ready\n\
|
|
||||||
if % = 1 goto pinerror\n\
|
|
||||||
:pinenverr\n\
|
|
||||||
print \"ERROR: The COMGTPIN env variable is not set\n\"\n\
|
|
||||||
exit 1\n\
|
|
||||||
:pinerror\n\
|
|
||||||
print \"ERROR: PIN code must be 4 decimal digits only\n\"\n\
|
|
||||||
print \"Caution! - entering the wrong PIN code three times will lock the SIM\n\"\n\
|
|
||||||
exit 1\n\
|
|
||||||
:timeerror\n\
|
|
||||||
print \"ERROR: timeout, device did not respond to PIN command entry.\n\"\n\
|
|
||||||
exit 1\n\
|
|
||||||
:ready\n\
|
|
||||||
print \"SIM ready\n\"\n";
|
|
||||||
|
|
||||||
char _SETAPN_code[]=
|
|
||||||
"opengt\n\
|
|
||||||
set com 115200n81\n\
|
|
||||||
set senddelay 0.05\n\
|
|
||||||
waitquiet 1 0.2\n\
|
|
||||||
:start\n\
|
|
||||||
flash 0.1\n\
|
|
||||||
:getapn\n\
|
|
||||||
let $x=$env(\"COMGTAPN\")\n\
|
|
||||||
let a=len($x)\n\
|
|
||||||
if a=0 goto apnerror\n\
|
|
||||||
if a>32 goto apnerror\n\
|
|
||||||
:enterapn\n\
|
|
||||||
send \"AT+CGDCONT=1,\\\"IP\\\",\\\"\n\
|
|
||||||
send $c\n\
|
|
||||||
send \"\\\"^m\"\n\
|
|
||||||
waitfor 20 \"OK\",\"ERR\"\n\
|
|
||||||
if % = -1 goto timeerror\n\
|
|
||||||
if % = 0 goto OK\n\
|
|
||||||
if % = 1 goto apnerror\n\
|
|
||||||
:apnerror\n\
|
|
||||||
print \"ERROR entering APN\n\"\n\
|
|
||||||
print \"The COMGTAPN env variable is not set\n\"\n\
|
|
||||||
exit 1\n\
|
|
||||||
:timeerror\n\
|
|
||||||
print \"ERROR entering APN\n\"\n\
|
|
||||||
print \"The device timeout.\n\"\n\
|
|
||||||
exit 1\n\
|
|
||||||
:OK\n\
|
|
||||||
exit 0\n";
|
|
||||||
|
|
||||||
|
|
||||||
char _help_code[] =\
|
|
||||||
"print \"comgt Usage: \"\n\
|
|
||||||
print \"comgt [options] [built in script]'|[external script]\n\n\"\n\
|
|
||||||
print \"Built in scripts -\n\"\n\
|
|
||||||
print \" comgt [default] Checks SIM status (requests PIN if required),\n\"\n\
|
|
||||||
print \" registration and signal strength reported by\n\"\n\
|
|
||||||
print \" datacard.\n\"\n\
|
|
||||||
print \" comgt info Display configuration of datacard.\n\"\n\
|
|
||||||
print \" comgt sig Report Signal strength.\n\"\n\
|
|
||||||
print \" comgt reg Report Registration status.\n\"\n\
|
|
||||||
print \" comgt PIN Set PIN using COMGTPIN env variable.\n\"\n\
|
|
||||||
print \" comgt APN Set APN using COMGTAPN env variable.\n\"\n\
|
|
||||||
print \"\n Valid for GlobeTrotter GPRS only:\n\"\n\
|
|
||||||
print \" comgt USA Switch to 900/1900 MHz band for USA operation.\n\"\n\
|
|
||||||
print \" comgt Europe Switch to 900/1800 MHz band for Europen operation.\n\"\n\
|
|
||||||
print \"\n Valid for GlobeTrotter EDGE and Combo EDGE only:\n\"\n\
|
|
||||||
print \" comgt GTEDGE Switch on radio interface.\n\"\n\
|
|
||||||
print \"\n Valid for Vodafone 3G, GlobeTrotter Fusion, GT Max :\n\"\n\
|
|
||||||
print \" comgt 2G 2G networks only.\n\"\n\
|
|
||||||
print \" comgt 3G 3G networks only\n\"\n\
|
|
||||||
print \" comgt 3G2G 3G network preferred\n\"\n\
|
|
||||||
print \"\nCommand line options (must be before script name) - \\n\"\n\
|
|
||||||
print \" -d device Use alternative device. e.g -d /dev/ttyUSB0\n\"\n\
|
|
||||||
print \" -e Turn on communication echo.\n\"\n\
|
|
||||||
print \" -h Help.\n\"\n\
|
|
||||||
print \" -V Version.\n\"\n\
|
|
||||||
print \" -s Don't run internal 'default' script before running\n\"\n\
|
|
||||||
print \" external script.\n\"\n\
|
|
||||||
print \" -t=\"\\n\" Set alternative line terminator (default=\"\\n\").\n\"\n\
|
|
||||||
print \" -v Verbose mode. Print lots of trace info.\n\"\n\
|
|
||||||
print \" -x Speed exchange. 115200 replaced by 57600.\n\"\n\
|
|
||||||
print \" ***used for GlobeTrotter EDGE and Combo EDGE***\n\"\n\
|
|
||||||
print \"NOTES:\ncomgt assumes that the GlobeTrotter device is /dev/modem (create a logical link\n\"\n\
|
|
||||||
print \"to actual device or use -d switch). Unless you use the '-s' switch comgt will\n\"\n\
|
|
||||||
print \"run the internal 'default' script first before running an external script file.\n\"\n" ;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
char *get_code(char* name){
|
|
||||||
if(strlen(name)==0) return(_default_code);
|
|
||||||
if (strcmp(name,"default")==0) return (_default_code);
|
|
||||||
if (strcmp(name,"help")==0) return (_help_code);
|
|
||||||
if (strcmp(name,"info")==0) return (_info_code);
|
|
||||||
if (strcmp(name,"USA")==0) return (_USA_code);
|
|
||||||
if (strcmp(name,"Europe")==0) return (_Europe_code);
|
|
||||||
if (strcmp(name,"sig")==0) return (_sig_code);
|
|
||||||
if (strcmp(name,"reg")==0) return (_reg_code);
|
|
||||||
if (strcmp(name,"GTEDGE")==0) return (_GTEDGE_code);
|
|
||||||
if (strcmp(name,"2G")==0) return (_2G_mode_code);
|
|
||||||
if (strcmp(name,"3G")==0) return (_3G_mode_code);
|
|
||||||
if (strcmp(name,"3G2G")==0) return (_3G2G_mode_code);
|
|
||||||
if (strcmp(name,"PIN")==0) return (_SETPIN_code);
|
|
||||||
if (strcmp(name,"APN")==0) return (_SETAPN_code);
|
|
||||||
return(NULL);
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,40 +0,0 @@
|
||||||
.\" Paul Hardwick
|
|
||||||
.\" paul@peck.org.uk
|
|
||||||
.TH sigmon 1 "22 January, 2005"
|
|
||||||
.LO 1
|
|
||||||
.SH NAME
|
|
||||||
sigmon \- Vodafone 3G/GPRS datacard signal strength monitor
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.B sigmon -?
|
|
||||||
|
|
||||||
.SH OPTIONS
|
|
||||||
.in +5
|
|
||||||
.B \-?
|
|
||||||
.in +10
|
|
||||||
gives brief usage details
|
|
||||||
.in -10
|
|
||||||
|
|
||||||
.SH DESCRIPTION
|
|
||||||
.B sigmon
|
|
||||||
is a command line tool for monitoring the signal strength seen by a Vodafone
|
|
||||||
3G/GPRS datacard. Once started, it queries the datacard for the signal
|
|
||||||
strength and displays it every 5 seconds. Use
|
|
||||||
.I Ctrl/C
|
|
||||||
to stop the signal strength display and exit from
|
|
||||||
.B sigmon
|
|
||||||
|
|
||||||
.SH BUGS
|
|
||||||
.B sigmon
|
|
||||||
is a simple script that assumes that the third port of the datacard is
|
|
||||||
/dev/ttyUSB2. If the datacard is not the first USB device registered the
|
|
||||||
script must be modified to correct the port name. Read /var/log/messages
|
|
||||||
to find the correct port name.
|
|
||||||
|
|
||||||
.SH DEPENDENCIES
|
|
||||||
.B sigmon
|
|
||||||
requires
|
|
||||||
.I comgt
|
|
||||||
to be installed so that it appears in the current search path when
|
|
||||||
.B sigmon
|
|
||||||
is run.
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
config BR2_PACKAGE_JSONFILTER
|
|
||||||
bool "jsonfilter"
|
|
||||||
select BR2_PACKAGE_JSON_C
|
|
||||||
select BR2_PACKAGE_LIBUBOX
|
|
||||||
help
|
|
||||||
jsonfilter - simple JSON parser
|
|
||||||
|
|
||||||
https://lxr.openwrt.org/source/jsonpath/
|
|
|
@ -1,20 +0,0 @@
|
||||||
################################################################################
|
|
||||||
#
|
|
||||||
# jsonfilter | updated 2022.09.27
|
|
||||||
#
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
# JSONFILTER_VERSION = cdc760c58077f44fc40adbbe41e1556a67c1b9a9
|
|
||||||
JSONFILTER_VERSION = c7e938d6582a436dddc938539e72dd1320625c54
|
|
||||||
JSONFILTER_SITE = git://git.openwrt.org/project/jsonpath.git
|
|
||||||
JSONFILTER_LICENSE = ISC, BSD-3-Clause
|
|
||||||
|
|
||||||
JSONFILTER_DEPENDENCIES = \
|
|
||||||
$(if $(BR2_PACKAGE_JSON_C),json-c) \
|
|
||||||
$(if $(BR2_PACKAGE_LIBUBOX),libubox)
|
|
||||||
|
|
||||||
define JSONFILTER_INSTALL_TARGET_CMDS
|
|
||||||
install -m 0755 -D $(@D)/jsonpath $(TARGET_DIR)/usr/bin/jsonfilter
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(cmake-package))
|
|
|
@ -1 +0,0 @@
|
||||||
../../general/package/comgt
|
|
|
@ -1 +0,0 @@
|
||||||
../../general/package/jsonfilter
|
|
|
@ -1 +0,0 @@
|
||||||
../../general/package/comgt
|
|
|
@ -1 +0,0 @@
|
||||||
../../general/package/jsonfilter
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
|
||||||
|
### Allwinner
|
||||||
|
|
||||||
|
We are launching a new direction to support devices based on Allwinner processors
|
||||||
|
|
||||||
|
* https://linux-sunxi.org/Allwinner_SoC_Family
|
||||||
|
|
Loading…
Reference in New Issue