Hello community,
here is the log from the commit of package umtsmon
checked in at Fri Jan 18 01:15:59 CET 2008.
--------
--- umtsmon/umtsmon.changes 2008-01-10 18:28:15.000000000 +0100
+++ /mounts/work_src_done/STABLE/umtsmon/umtsmon.changes 2008-01-16 15:37:11.000000000 +0100
@@ -1,0 +2,15 @@
+Wed Jan 16 15:36:51 CET 2008 - seife@suse.de
+
+- Add a fix for single-serial-port cards (e.g. XU870)
+
+-------------------------------------------------------------------
+Tue Jan 15 15:41:49 CET 2008 - seife@suse.de
+
+- update to current CVS
+ - fixes for USB connected phones (ttyACM)
+ - noCCP profile option to switch off CCP header compression
+ - show total traffic per month
+ - human readable numbers for traffic accounting
+- add an extra switch for selecting pppd verbosity
+
+-------------------------------------------------------------------
Old:
----
umtsmon-0.7.90.20080110.tar.bz2
umtsmon-include-typeinfo.diff
New:
----
umtsmon-0.7.90.20080115-singleserialportcardfix.diff
umtsmon-0.7.90.20080115.tar.bz2
umtsmon-0.7.90-pppverbosity.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ umtsmon.spec ++++++
--- /var/tmp/diff_new_pack.r28386/_old 2008-01-18 01:12:28.000000000 +0100
+++ /var/tmp/diff_new_pack.r28386/_new 2008-01-18 01:12:28.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package umtsmon (Version 0.7.90.20080110)
+# spec file for package umtsmon (Version 0.7.90.20080115)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,7 +11,7 @@
Name: umtsmon
BuildRequires: libusb-devel qt3-devel
-Version: 0.7.90.20080110
+Version: 0.7.90.20080115
Release: 1
Summary: Control/monitor your UMTS card
License: GPL v2 or later
@@ -20,7 +20,8 @@
Url: http://sourceforge.net/projects/umtsmon/
AutoReqProv: on
Source0: %name-%version.tar.bz2
-Patch0: umtsmon-include-typeinfo.diff
+Patch0: umtsmon-0.7.90-pppverbosity.diff
+Patch1: umtsmon-0.7.90.20080115-singleserialportcardfix.diff
%description
A program to control your UMTS (and GPRS/EDGE) card: enter SIM PIN
@@ -36,6 +37,7 @@
%prep
%setup0 -n umtsmon
%patch0 -p0
+%patch1 -p0
%build
qmake
@@ -54,74 +56,83 @@
rm -rf %{buildroot}
%changelog
-* Thu Jan 10 2008 - seife@suse.de
+* Wed Jan 16 2008 seife@suse.de
+- Add a fix for single-serial-port cards (e.g. XU870)
+* Tue Jan 15 2008 seife@suse.de
+- update to current CVS
+ - fixes for USB connected phones (ttyACM)
+ - noCCP profile option to switch off CCP header compression
+ - show total traffic per month
+ - human readable numbers for traffic accounting
+- add an extra switch for selecting pppd verbosity
+* Thu Jan 10 2008 seife@suse.de
- update to current CVS, featuring (among others):
- translations
- traffic meters for every profile
- code reorganization
- many bugfixes
-* Fri Dec 07 2007 - agruen@suse.de
+* Fri Dec 07 2007 agruen@suse.de
- Version 0.7 includes the patches we had in this package and a
few more fixes.
-* Mon Sep 17 2007 - seife@suse.de
+* Mon Sep 17 2007 seife@suse.de
- Fix abort if the SIM interface on Novatel XU870 is still busy
-* Sat Sep 15 2007 - seife@suse.de
+* Sat Sep 15 2007 seife@suse.de
- Add 3 UI fixes (kindly provided by Gerald Pfeifer)
-* Mon Sep 10 2007 - seife@suse.de
+* Mon Sep 10 2007 seife@suse.de
- update to current "0.6.9beta" release:
- fix various crashes and annoyances (e.g. novell bug #308881)
- move "Radio Preferences" to its own dialog
- no longer crash in "Manage Profiles"
- fix a rpmlint warning about BUILD_ROOT usage in %%build
-* Tue Aug 28 2007 - seife@suse.de
+* Tue Aug 28 2007 seife@suse.de
- update to current upstream CVS version (0.6.9)
- reorganization of the source code
- various bugfixes (fixes for many non-Option cards)
- support more cards
-* Thu Aug 02 2007 - fseidel@suse.de
+* Thu Aug 02 2007 fseidel@suse.de
- fix for bug #290207 (suspend hangs with nozomi driver)
-* Wed Jun 20 2007 - seife@suse.de
+* Wed Jun 20 2007 seife@suse.de
- do not require pccardctl in the binary
-* Thu May 31 2007 - seife@suse.de
+* Thu May 31 2007 seife@suse.de
- update to version 0.6
no real code changes, just restructuring of the GUI files and
some work on the unit test code
-* Thu May 10 2007 - seife@suse.de
+* Thu May 10 2007 seife@suse.de
- update to current CVS (==0.6RC2)
- support more cards
- ppp stuff is more robust now
- various GUI fixes and usability improvements
- more robust error handling
-* Thu Mar 29 2007 - seife@suse.de
+* Thu Mar 29 2007 seife@suse.de
- update to current CVS
- various changes in the GUI code
- new "LCD-Display"-design
- rework of the internal workflow and classes
- stricter abstraction of the serial port classes
- reworked pppd interface classes
-* Tue Feb 06 2007 - seife@suse.de
+* Tue Feb 06 2007 seife@suse.de
- changed version no. to 0.5
-* Mon Jan 22 2007 - seife@suse.de
+* Mon Jan 22 2007 seife@suse.de
- update to current CVS
- fix pppd termination
- fix transfer statistics overflow
- our patches incorporated upstream
-* Tue Jan 16 2007 - seife@suse.de
+* Tue Jan 16 2007 seife@suse.de
- update to current CVS (0.5 RC)
- GUI restructured
- ppp support improved
- lots of smaller fixes
-* Wed Nov 01 2006 - seife@suse.de
+* Wed Nov 01 2006 seife@suse.de
- update to current CVS
- add PUK support
- separate the progress dialog code
- add support for Huawei E612 card
- remove the "received SMS" - NOT YET IMPLEMENTED tab
-* Wed Sep 27 2006 - seife@suse.de
+* Wed Sep 27 2006 seife@suse.de
- update to current CVS which (among others) fixes the detection
of cards that are not in the first PCMCIA slot and handles
alternate nozomi drivers gracefully. An assert triggered by
scanning for networks, but then discarding the result is also
fixed.
-* Thu Aug 31 2006 - seife@suse.de
+* Thu Aug 31 2006 seife@suse.de
- initial package submission
++++++ umtsmon-0.7.90.20080115-singleserialportcardfix.diff ++++++
diff -rup ../umtsmon-smpppd-HEAD//src/base/SerialPort.cpp ./src/base/SerialPort.cpp
--- ../umtsmon-smpppd-HEAD//src/base/SerialPort.cpp 2007-11-23 16:36:14.000000000 +0100
+++ ./src/base/SerialPort.cpp 2008-01-16 15:32:39.000000000 +0100
@@ -29,11 +29,13 @@
SerialPort::~SerialPort()
{
+ DEBUG3("SerialPort::~SerialPort()\n");
closeDev();
}
bool SerialPort::closeDev()
{
+ DEBUG3("SerialPort::closeDev() for FD %d\n", theComFD);
if (theComFD != -1)
close(theComFD);
theComFD=-1;
@@ -57,6 +59,22 @@ void SerialPort::doSmallSleep(unsigned l
}
}
+bool SerialPort::resetDev(void)
+{
+ if (closeDev()==false)
+ return false;
+ sleep(1);
+ if (openDev(theDevName, thePortSpeed, theSleepTime)==false)
+ return false;
+ int ch=1;
+ while (ch > 0)
+ {
+ ch = getOneByte();
+ DEBUG6("read after reset: '%c' %d\n", ch, ch);
+ }
+ return true;
+}
+
bool SerialPort::openDev(const QString& aDeviceName, int aSpeed, long aSleepTime)
{
if ((theComFD = open(aDeviceName.ascii(),
@@ -68,6 +86,8 @@ bool SerialPort::openDev(const QString&
}
theSleepTime = aSleepTime;
+ thePortSpeed = aSpeed;
+ theDevName = aDeviceName;
// for security:
// let's check first if this is actually a character device node.
@@ -143,7 +163,7 @@ bool SerialPort::writeDev(const QString&
int j=0;
for (; j < MAXWRITERETRY; j++)
{
- DEBUG4("write failed for the %d time, myResult = %d\n", j+1, myResult);
+ DEBUG4("write '%c' failed for the %d time, myResult = %d\n", ch, j+1, myResult);
int myResult = write(theComFD, &ch, 1);
if(myResult == 1)
break;
Only in ./src/base: SerialPort.cpp.orig
diff -rup ../umtsmon-smpppd-HEAD//src/base/SerialPort.h ./src/base/SerialPort.h
--- ../umtsmon-smpppd-HEAD//src/base/SerialPort.h 2007-07-02 07:26:00.000000000 +0200
+++ ./src/base/SerialPort.h 2008-01-16 15:32:39.000000000 +0100
@@ -58,6 +58,12 @@ public:
*/
virtual bool closeDev();
+ /** resets the serial port device
+ * needed for single port serial devices after
+ * pppd has closed its connection
+ */
+ virtual bool resetDev(void);
+
/** Write a string to the device
* @param aString string to send to device, nothing will be added.
* @returns true if successful
@@ -79,6 +85,9 @@ private:
/// time to wait before deciding no more characters are forthcoming
long theSleepTime;
+
+ int thePortSpeed;
+ QString theDevName;
};
diff -rup ../umtsmon-smpppd-HEAD//src/controller/TheDeviceManagerSingleton.h ./src/controller/TheDeviceManagerSingleton.h
--- ../umtsmon-smpppd-HEAD//src/controller/TheDeviceManagerSingleton.h 2007-11-14 13:00:37.000000000 +0100
+++ ./src/controller/TheDeviceManagerSingleton.h 2008-01-16 15:32:46.000000000 +0100
@@ -60,7 +60,13 @@ public:
/// always use this member to get access to the ConnectionInfo - never cache
static ConnectionInfo* getConnectionInfoPtr(void)
{ return getDeviceRef().getConnectionInfoPtr(); };
-
+
+ /** resets (i.e. close+reopen) the Device's AT Serial Port.
+ * one better ensures that no Queries will be during this...
+ * @returns true if successful
+ */
+ static bool resetDevice()
+ { return getDeviceRef().resetATSerial(); };
/// the main entry member to the Singleton
static TheDeviceManagerSingleton& me(void);
diff -rup ../umtsmon-smpppd-HEAD//src/model/Device.cpp ./src/model/Device.cpp
--- ../umtsmon-smpppd-HEAD//src/model/Device.cpp 2008-01-10 17:16:13.000000000 +0100
+++ ./src/model/Device.cpp 2008-01-16 15:32:39.000000000 +0100
@@ -40,7 +40,14 @@ Device::closeATSerial(void)
}
}
-
+bool
+Device::resetATSerial()
+{
+ assert(theATSerialPortPtr != NULL);
+ if (theATSerialPortPtr == NULL)
+ return false;
+ return theATSerialPortPtr->resetDev();
+}
Device*
Device::createDeviceInstance(CardType aCardType)
@@ -135,6 +142,7 @@ Device::probePortForAT( const QString& a
not_good:
// restore the original serial (whether it's NULL or not)
Query::setSerial(theATSerialPortPtr);
+ delete mySerialPortPtr;
// and exit with returncode true or false
DEBUG3("Device: probing port '%s' %s\n", aPortName.ascii(),
(myResult == Query::OK)?"successful":"failed");
diff -rup ../umtsmon-smpppd-HEAD//src/model/Device.h ./src/model/Device.h
--- ../umtsmon-smpppd-HEAD//src/model/Device.h 2008-01-14 08:50:39.000000000 +0100
+++ ./src/model/Device.h 2008-01-16 15:32:39.000000000 +0100
@@ -70,6 +70,14 @@ public:
/// closes and deletes theATSerialPortName
void closeATSerial(void);
+ /** resets (i.e. close+open) the Device's AT Serial Port.
+ * one better ensures that no Queries will be run after this...
+ * typically only called by TheDeviceManagerSingleton
+ * @returns true if successful
+ */
+ bool resetATSerial();
+
+
/** setupPPPPort will set the port to be used to setup PPP connections
* if this is not done before calling startPPP, this will result in trouble
* @param aSerialPort device name of the serial port to use for PPP commands
diff -rup ../umtsmon-smpppd-HEAD//src/model/MonthlyTraffic.cpp ./src/model/MonthlyTraffic.cpp
--- ../umtsmon-smpppd-HEAD//src/model/MonthlyTraffic.cpp 2008-01-10 02:32:41.000000000 +0100
+++ ./src/model/MonthlyTraffic.cpp 2008-01-16 14:02:43.000000000 +0100
@@ -144,6 +144,7 @@ MonthlyTraffic::update(unsigned long aCo
myDate.addMonths(1);
if (QDate::currentDate() >= myDate)
{
+printf("theDate: %d %d %d mydate: %d, %d, %d, currenDate: %d, %d, %d\n",theDate.year(),theDate.month(),theDate.day(), myDate.year(),myDate.month(), myDate.day(), QDate::currentDate().year(),QDate::currentDate().month(),QDate::currentDate().day());
DEBUG1("MonthlyTraffic::update detected rollover to new month!\n");
// the problem is that pppd doesn't care - it keeps counting
// we can't fix that, but we can tell the user to close the
diff -rup ../umtsmon-smpppd-HEAD//src/model/PPPConnection.cpp ./src/model/PPPConnection.cpp
--- ../umtsmon-smpppd-HEAD//src/model/PPPConnection.cpp 2008-01-14 08:50:39.000000000 +0100
+++ ./src/model/PPPConnection.cpp 2008-01-16 15:32:39.000000000 +0100
@@ -227,6 +227,7 @@ PPPConnection::isPPPConnected(void)
{
if (theCIInhibitorPtr!=NULL)
{
+ TheDeviceManagerSingleton::resetDevice();
delete theCIInhibitorPtr;
theCIInhibitorPtr=NULL;
}
++++++ umtsmon-0.7.90.20080110.tar.bz2 -> umtsmon-0.7.90.20080115.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/umtsmon/AUTHORS new/umtsmon/AUTHORS
--- old/umtsmon/AUTHORS 2008-01-10 17:33:07.000000000 +0100
+++ new/umtsmon/AUTHORS 2008-01-15 15:39:19.000000000 +0100
@@ -66,9 +66,12 @@
Huawei E220 fixes by Norbert Preining (norbusan)
11)
-translation work into German by Lubomir Schmidt and Philipp Kießler.
+Lubomir Schmidt did translation into German and lots of testing.
12)
+additional translation into German by Philipp Kießler.
+
+13)
translation work into Portugese (pt_PT) by Pedro Algarvio.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/umtsmon/mainwindow.ui.h new/umtsmon/mainwindow.ui.h
--- old/umtsmon/mainwindow.ui.h 2008-01-10 17:33:07.000000000 +0100
+++ new/umtsmon/mainwindow.ui.h 2008-01-15 15:39:19.000000000 +0100
@@ -294,7 +294,7 @@
theMonthlyTraffic = MonthlyTraffic(myCIPtr->isRoaming());
unsigned long mySent = thePPPConnection.getCounterBytesSent();
unsigned long myRecvd= thePPPConnection.getCounterBytesReceived();
- unsigned long myTotal;
+ unsigned long myTotal = 0;
try { myTotal = theMonthlyTraffic.update(mySent,myRecvd);}
catch (MonthRolloverException)
{
@@ -309,8 +309,8 @@
{
DEBUG5("umtsmon minimized - change titlebar\n");
QString myRT = myCIPtr->getRadiotype();
- QString myTotal = APPNAME " " + myRT + " " + myCIPtr->getSignalQualityString();
- setCaption( myTotal );
+ QString myTotalName = APPNAME " " + myRT + " " + myCIPtr->getSignalQualityString();
+ setCaption( myTotalName );
}
else
{
@@ -320,8 +320,9 @@
theLCDDisplay->setOperatorName( myCIPtr->getOperatorName(), false);
theLCDDisplay->setRadioType( myCIPtr->getRadiotype(), false );
- theLCDDisplay->setUpload(QString::number(mySent,10));
- theLCDDisplay->setDownload(QString::number(myRecvd,10));
+ theLCDDisplay->setUpload(mySent);
+ theLCDDisplay->setDownload(myRecvd);
+ theLCDDisplay->setTotalTraffic(myTotal);
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/umtsmon/src/controller/AutoDetect.cpp new/umtsmon/src/controller/AutoDetect.cpp
--- old/umtsmon/src/controller/AutoDetect.cpp 2008-01-10 17:33:07.000000000 +0100
+++ new/umtsmon/src/controller/AutoDetect.cpp 2008-01-15 15:39:19.000000000 +0100
@@ -203,7 +203,7 @@
{ 0x1410, 0x1410, "Novatel U740", Device::NOVATEL_2PORT, },
{ 0x1410, 0x1430, "Novatel XU870 HSDPA", Device::NOVATEL_2PORT, },
{ 0x8118, 0x143c, "Dell Wireless 5510 (=Novatel XU870)", Device::NOVATEL_2PORT, },
- { 0x413c, 0x8116, "??? (=Novatel ###)", Device::NOVATEL_2PORT, },
+ { 0x413c, 0x8116, "Dell/Novatel Wireless HSDPA", Device::NOVATEL_2PORT, },
// catch-all Novatel, keep last:
{ 0x1410, 0, "Unknown Novatel", Device::NOVATEL_2PORT, },
@@ -223,6 +223,11 @@
//////////////////// 4G SYSTEMS
{ 0x1955, 0x4e44, "4GSystems USB Box", Device::UNKNOWN, },
{ 0x11f5, 0, "4GSystems USB Box", Device::GENERIC_USER_SERIAL, },
+
+ //////////////////// PANTECH
+ // also known as Verizon PC5750, doesn't work with umtsmon
+ { 0x106c, 0x3702, "PANTECH/Verizon PC5750", Device::UNKNOWN, },
+
// keep this one last
{ 0, 0, "", Device::UNKNOWN },
};
@@ -243,6 +248,12 @@
// if we get here, we're cool
theDeviceID = theArgsTable[i].theDeviceID;
sendLog(GOOD, "A '" + theArgsTable[i].theGOODString + "' modem detected");
+
+ if (theDeviceID == Device::UNKNOWN)
+ {
+ sendLog(KILLING, "However, this device is not supported");
+ return NOTHING_FOUND;
+ }
return DEVICE_DETECTED;
}
}
@@ -274,7 +285,8 @@
if (myUSBPortList.empty())
{
// suggestModprobe() will already run this member again
- return suggestModprobe();
+// return suggestModprobe();
+ myUSBPortList.push_back("/dev/ttyACM0");
}
sendLog(INFO, "There are " + QString::number(myUSBPortList.count()) + " USB Serial ports available");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/umtsmon/src/controller/SIMHandler.h new/umtsmon/src/controller/SIMHandler.h
--- old/umtsmon/src/controller/SIMHandler.h 2008-01-10 17:33:07.000000000 +0100
+++ new/umtsmon/src/controller/SIMHandler.h 2008-01-15 15:39:19.000000000 +0100
@@ -62,7 +62,7 @@
PIN_PH_SP_PUK,
PIN_CORP,
PIN_CORP_PUK,
- // from here the codes are *not* ETSI defined:
+ // from here the codes are *not* ETSI/3GPP defined, but added by Klaas:
ERROR_BEYOND_LAST,
ERROR_SIMINTERFACE_NOT_STARTED_YET = 200,
ERROR_ERROR,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/umtsmon/src/controller/TheDeviceManagerSingleton.cpp new/umtsmon/src/controller/TheDeviceManagerSingleton.cpp
--- old/umtsmon/src/controller/TheDeviceManagerSingleton.cpp 2008-01-10 17:33:07.000000000 +0100
+++ new/umtsmon/src/controller/TheDeviceManagerSingleton.cpp 2008-01-15 15:39:19.000000000 +0100
@@ -23,7 +23,9 @@
#include "TheSettingsSingleton.h"
#include "Popup.h"
#include "Runner.h"
+#include "FileStuff.h"
+#include <typeinfo>
#include
static TheDeviceManagerSingleton* theDeviceMgrSingletonInstancePtr = NULL;
@@ -127,6 +129,7 @@
// the config file - will instantiate the Device immediately
// without going through the autodetectors
DEBUG3("Start iterating through all AutoDetectors\n\n");
+ DEBUG4("Kernel: '%s'\n", FileStuff::getFileFirstLine("/proc/version").ascii());
AutoDetectList::iterator myDetector = theAutoDetectList.begin();
while (myDetector != theAutoDetectList.end())
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/umtsmon/src/model/ConnectionInfo.cpp new/umtsmon/src/model/ConnectionInfo.cpp
--- old/umtsmon/src/model/ConnectionInfo.cpp 2008-01-10 17:33:07.000000000 +0100
+++ new/umtsmon/src/model/ConnectionInfo.cpp 2008-01-15 15:39:19.000000000 +0100
@@ -41,13 +41,13 @@
if (isInhibited())
return;
- refreshSignalQuality();
-
theRegistrationValue = refreshCGREG();
// if not successful, retry with AT+CREG
if (theRegistrationValue == REGISTRATION_UNKNOWN)
theRegistrationValue = refreshCREG();
+ refreshSignalQuality();
+
if (isDeviceRegistered())
refreshOperator();
else
@@ -235,3 +235,24 @@
else
return REGISTRATION_UNKNOWN;
}
+
+
+
+void ConnectionInfo_ACM::refresh(void)
+{
+ // if we're allowed to use CGREG/CREG, let's immediately do that
+ if (isCGREGUsed)
+ {
+ ConnectionInfo::refresh();
+ return;
+ }
+
+ // oh. we don't have a means to figure out registration info.
+ theRegistrationValue = REGISTERED_HOME;
+
+ // only send Queries if allowed
+ if (isInhibited())
+ return;
+
+ refreshSignalQuality();
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/umtsmon/src/model/ConnectionInfo.h new/umtsmon/src/model/ConnectionInfo.h
--- old/umtsmon/src/model/ConnectionInfo.h 2008-01-10 17:33:07.000000000 +0100
+++ new/umtsmon/src/model/ConnectionInfo.h 2008-01-15 15:39:19.000000000 +0100
@@ -35,7 +35,7 @@
virtual ~ConnectionInfo() {};
/// refreshes the connection information
- void refresh(void);
+ virtual void refresh(void);
/** returns the signal quality.
* the value should (according to 3GPP TS 27.007 V7.0.0 (2006-03) - chapter 8.5)
@@ -80,7 +80,7 @@
{ return (theRegistrationValue==TRYING_TO_REGISTER); };
-private:
+protected:
/** the following are the return values of AT+CGREG
* 3GPP TS 27.007 V7.0.0 (2006-03) - chapter 10.1.19
*/
@@ -100,15 +100,16 @@
QString theOperatorName;
void refreshSignalQuality(void);
- void refreshOperator(void);
- Registration refreshCGREG(void);
- Registration refreshCREG(void);
-
/** returns true if ConnectionInfo should be prevented from
* from sending AT commands
*/
bool isInhibited(void);
-
+
+private:
+ void refreshOperator(void);
+ Registration refreshCGREG(void);
+ Registration refreshCREG(void);
+
/** this variable acts like a counting semaphore,
* increased and decreased by friend class ConnectionInfoInhibitor
*/
@@ -121,6 +122,22 @@
friend class ConnectionInfoInhibitor;
};
+/** specialised ConnectionInfo class to work around AT limitations in most
+ * USB Modem implementations (mostly USB connected mobile phones)
+ */
+class ConnectionInfo_ACM : public ConnectionInfo
+{
+public:
+ ConnectionInfo_ACM() : ConnectionInfo(),isCGREGUsed(false) {};
+ virtual ~ConnectionInfo_ACM() {};
+ virtual void refresh();
+
+ void setUseOfCGREG(bool aBool)
+ { isCGREGUsed = aBool; };
+
+private:
+ bool isCGREGUsed;
+};
/** This is a helper class to ConnectionInfo.
* Creating an instance of this class will prevent ConnectionInfo from
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/umtsmon/src/model/Device.h new/umtsmon/src/model/Device.h
--- old/umtsmon/src/model/Device.h 2008-01-10 17:33:07.000000000 +0100
+++ new/umtsmon/src/model/Device.h 2008-01-15 15:39:19.000000000 +0100
@@ -368,6 +368,11 @@
*/
bool setupATPort(const QString& aSerialPort);
+ Device_ACM() : Device_Single_Serial()
+ {
+ theConnectionInfoPtr = new ConnectionInfo_ACM();
+ };
+
protected:
/// returns the port speed (as a termios number, e.g. B115200) of the single serial port
int getPortSpeed(void) {return (B115200);};
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/umtsmon/src/model/PPPConnection.cpp new/umtsmon/src/model/PPPConnection.cpp
--- old/umtsmon/src/model/PPPConnection.cpp 2008-01-10 17:33:07.000000000 +0100
+++ new/umtsmon/src/model/PPPConnection.cpp 2008-01-15 15:39:19.000000000 +0100
@@ -390,6 +390,8 @@
myPPPArguments.push_back("noipx");
if (aProfile.getNoCompression())
myPPPArguments.push_back("novj");
+ if (aProfile.getNoCCP())
+ myPPPArguments.push_back("noccp");
// routing related stuff
if (aProfile.getIsDefaultRoute())
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/umtsmon/src/model/Profile.cpp new/umtsmon/src/model/Profile.cpp
--- old/umtsmon/src/model/Profile.cpp 2008-01-10 17:33:07.000000000 +0100
+++ new/umtsmon/src/model/Profile.cpp 2008-01-15 15:39:19.000000000 +0100
@@ -34,6 +34,7 @@
static const char* theReplaceDefaultRouteStr = "replaceDefaultRoute";
static const char* theUsePeerDnsStr = "usePeerDns";
static const char* theNoCompressionStr = "noCompression";
+static const char* theNoCCPStr = "noCCP";
static const char* theNoAuthStr = "noAuth";
static const char* theWarnOnDataThresholdStr = "doWarnOnThreshold";
static const char* theThresholdPercentageStr = "thresholdPercentage";
@@ -127,6 +128,12 @@
}
bool
+Profile::getNoCCP(void) const
+{
+ return TheSettingsSingleton::getQSRef().readBoolEntry(getKeyPathName(theNoCCPStr), false);
+}
+
+bool
Profile::getNoAuth(void) const
{
return TheSettingsSingleton::getQSRef().readBoolEntry(getKeyPathName(theNoAuthStr), false);
@@ -217,6 +224,13 @@
}
bool
+Profile::setNoCCP(bool aNoCCP)
+{
+ assert(!theProfileName.isEmpty());
+ return TheSettingsSingleton::getQSRef().writeEntry(getKeyPathName(theNoCCPStr), aNoCCP );
+}
+
+bool
Profile::setNoAuth(bool aNoAuth)
{
assert(!theProfileName.isEmpty());
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/umtsmon/src/model/Profile.h new/umtsmon/src/model/Profile.h
--- old/umtsmon/src/model/Profile.h 2008-01-10 17:33:07.000000000 +0100
+++ new/umtsmon/src/model/Profile.h 2008-01-15 15:39:19.000000000 +0100
@@ -71,12 +71,17 @@
bool getUsePeerDns(void) const;
bool setUsePeerDns(bool anUserPeerDns);
- // true: doesn't compress the packets of the ppp-connection
- // FIXME: This needs to be adapted as there's several compression options
- // most of them are HEADER compression anyway.
+ // true: doesn't apply VJ compression to the packets of the ppp-connection
bool getNoCompression(void) const;
bool setNoCompression(bool aNoCompression);
+ /** config for "no CCP" (Control Compression Protocol)
+ * note that this should only be enabled if the peer (i.e. the operator)
+ * has buggy systems
+ */
+ bool getNoCCP(void) const;
+ bool setNoCCP(bool aNoCCP);
+
/// true: enable the 'noauth' option
bool getNoAuth(void) const;
bool setNoAuth(bool aNoAuth);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/umtsmon/src/view/LCDDisplay.cpp new/umtsmon/src/view/LCDDisplay.cpp
--- old/umtsmon/src/view/LCDDisplay.cpp 2008-01-10 17:33:07.000000000 +0100
+++ new/umtsmon/src/view/LCDDisplay.cpp 2008-01-15 15:39:19.000000000 +0100
@@ -1,5 +1,5 @@
/* umtsmon - a program to control/monitor your UMTS card
- * Copyright (C) 2007 Klaas van Gend
+ * Copyright (C) 2007,2008 Klaas van Gend
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -82,23 +82,26 @@
p->drawText(181,57, tr("Network:"));
if (!theProfile.isEmpty())
p->drawText(181,74, tr("Profile:"));
- p->drawText( 15,57, tr("Upload:"));
- p->drawText( 15,74, tr("Download:"));
+ p->drawText( 15,57, tr("Up:"));
+ p->drawText( 15,74, tr("Down:"));
+ p->drawText(103,57, tr("Total traffic:"));
p->setFont(the10Font);
p->drawText(181,25, tr("Operator:"));
// and draw the 10-size shadows & blacks of the other data
- p->drawText(70,57, theUpload);
- p->drawText(70,75, theDownload);
+ p->drawText( 48,57, theUpload);
+ p->drawText( 48,75, theDownload);
p->drawText(235,58, theRadioType);
+ p->drawText(108,74, theTotal);
if (!theProfile.isEmpty())
p->drawText(235,75, theProfile);
p->setPen(theBlack);
- p->drawText(69,56, theUpload);
- p->drawText(69,74, theDownload);
+ p->drawText( 47,56, theUpload);
+ p->drawText( 47,74, theDownload);
p->drawText(234,57, theRadioType);
+ p->drawText(107,74, theTotal);
if (!theProfile.isEmpty())
p->drawText(234,74, theProfile);
@@ -111,3 +114,49 @@
}
+
+QString
+LCDDisplay::number2HumanString(unsigned long aNumber) const
+{
+ QString theUnit = "B";
+ double myNumber = aNumber;
+
+ if (myNumber < 1024.)
+ {
+ return QString::number(aNumber) + " " + theUnit;
+ }
+
+ // reduce the order of the number
+ while ((myNumber/999.9) >= 1.)
+ {
+ myNumber /= 1024;
+ switch(theUnit[0].latin1())
+ {
+ case 'B':
+ theUnit = "KiB";
+ break;
+ case 'K':
+ theUnit = "MiB";
+ break;
+ case 'M':
+ theUnit = "GiB";
+ break;
+ case 'G':
+ theUnit = "TiB";
+ break;
+ }
+ }
+
+ // let's differentiate between '3.14', '31.4' and '314.'
+ if (myNumber >= 100.)
+ {
+ return QString::number(myNumber, 'f', 0) + " " + theUnit;
+ }
+ if (myNumber >= 10.)
+ {
+ return QString::number(myNumber, 'f', 1) + " " + theUnit;
+ }
+ return QString::number(myNumber, 'f', 2) + " " + theUnit;
+}
+
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/umtsmon/src/view/LCDDisplay.h new/umtsmon/src/view/LCDDisplay.h
--- old/umtsmon/src/view/LCDDisplay.h 2008-01-10 17:33:07.000000000 +0100
+++ new/umtsmon/src/view/LCDDisplay.h 2008-01-15 15:39:19.000000000 +0100
@@ -1,5 +1,5 @@
/* umtsmon - a program to control/monitor your UMTS card
- * Copyright (C) 2007 Klaas van Gend
+ * Copyright (C) 2007,2008 Klaas van Gend
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -44,11 +44,16 @@
{setStringAndUpdate(theProfile, aName, needsUpdate);};
/// sets the upload string and updates the GUI
- void setUpload(const QString& aName, bool needsUpdate=true)
- {setStringAndUpdate(theUpload, aName, needsUpdate);};
+ void setUpload(unsigned long aNumber, bool needsUpdate=true)
+ {setStringAndUpdate(theUpload, number2HumanString(aNumber), needsUpdate);};
/// sets the download string and updates the GUI
- void setDownload(const QString& aName, bool needsUpdate=true)
- {setStringAndUpdate(theDownload, aName, needsUpdate);};
+ void setDownload(unsigned long aNumber, bool needsUpdate=true)
+ {setStringAndUpdate(theDownload, number2HumanString(aNumber), needsUpdate);};
+
+ /// sets the monthly total traffic and update the GUI
+ void setTotalTraffic(unsigned long aNumber, bool needsUpdate=true)
+ {setStringAndUpdate(theTotal, number2HumanString(aNumber), needsUpdate);};
+
/** sets the signal strength of the radio (result of AT+CSQ)
* @param aNewStrength values of 0-31 and 99 are allowed
@@ -68,6 +73,15 @@
void setStringAndUpdate(QString& aString, const QString& aName, bool needsUpdate)
{ aString = aName.left(17); if (needsUpdate) {this->update();}; };
+ /** converts an ulong into a human readable number string.
+ * i.e. 31 will become 31 B
+ * 3141 will become 3.07 KiB
+ * 314156 will become 307 KiB
+ * 31415654 will become 30.0 MiB
+ * @param aNumber the number to convert
+ * @returns the converted and human readable string
+ */
+ QString number2HumanString(unsigned long aNumber) const;
QPixmap theGaugePixmap;
@@ -82,6 +96,7 @@
QString theUpload;
QString theDownload;
+ QString theTotal;
// three font sizes to cache
QFont the14Font;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/umtsmon/src/view/profiledialog.ui new/umtsmon/src/view/profiledialog.ui
--- old/umtsmon/src/view/profiledialog.ui 2008-01-10 17:33:07.000000000 +0100
+++ new/umtsmon/src/view/profiledialog.ui 2008-01-15 15:39:19.000000000 +0100
@@ -147,21 +147,35 @@
<string>Do not require the remote server to authenticate itself. This option is privileged. Usually disabled.</string>
</property>
</widget>
- <widget class="QCheckBox" row="0" column="1">
+ <widget class="QCheckBox" row="1" column="0">
<property name="name">
- <cstring>connection_noCompression</cstring>
+ <cstring>connection_routing_noipdefault</cstring>
</property>
<property name="text">
- <string>no header compression</string>
+ <string>no ip default</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>If enabled, the remote server must supply you an IP Address. Usually disabled.</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="0">
+ <property name="name">
+ <cstring>connection_routing_replaceDefaultRoute</cstring>
+ </property>
+ <property name="text">
+ <string>replace default route</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="toolTip" stdset="0">
- <string>Header Compression saves a few byte per data packet by skipping information that is already known by the peer. Usually enabled because most cards don't understand it.</string>
+ <string>Use the connection for all network traffic when connected. Usually enabled.</string>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="1">
+ <widget class="QCheckBox" row="2" column="1">
<property name="name">
<cstring>connection_routing_defaultroute</cstring>
</property>
@@ -175,46 +189,43 @@
<string>Add a default route to the remote server if connected. Usually enabled.</string>
</property>
</widget>
- <widget class="QCheckBox" row="2" column="1">
+ <widget class="QCheckBox" row="0" column="1">
<property name="name">
- <cstring>connection_routing_usepeerdns</cstring>
+ <cstring>connection_noCompression</cstring>
</property>
<property name="text">
- <string>use peer DNS</string>
+ <string>no header compression</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="toolTip" stdset="0">
- <string>Receive DNS-settings from your Provider. Usually enabled.</string>
+ <string>Header Compression saves a few byte per data packet by skipping information that is already known by the peer. Usually enabled because most cards don't understand it.</string>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="0">
+ <widget class="QCheckBox" row="1" column="1">
<property name="name">
- <cstring>connection_routing_noipdefault</cstring>
+ <cstring>connection_noCCP</cstring>
</property>
<property name="text">
- <string>no ip default</string>
- </property>
- <property name="checked">
- <bool>false</bool>
+ <string>no CCP</string>
</property>
<property name="toolTip" stdset="0">
- <string>If enabled, the remote server must supply you an IP Address. Usually disabled.</string>
+ <string>Do not negotiate the Compression Control Protocol. Usually disabled - only needed for buggy operators.</string>
</property>
</widget>
- <widget class="QCheckBox" row="2" column="0">
+ <widget class="QCheckBox" row="3" column="1">
<property name="name">
- <cstring>connection_routing_replaceDefaultRoute</cstring>
+ <cstring>connection_routing_usepeerdns</cstring>
</property>
<property name="text">
- <string>replace default route</string>
+ <string>use peer DNS</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="toolTip" stdset="0">
- <string>Use the connection for all network traffic when connected. Usually enabled.</string>
+ <string>Receive DNS-settings from your Provider. Usually enabled.</string>
</property>
</widget>
</grid>
@@ -507,7 +518,7 @@
</size>
</property>
<property name="text">
- <string>0</string>
+ <string></string>
</property>
<property name="alignment">
<set>AlignRight</set>
@@ -538,7 +549,7 @@
</size>
</property>
<property name="text">
- <string>1</string>
+ <string></string>
</property>
<property name="alignment">
<set>AlignRight</set>
@@ -721,6 +732,12 @@
<receiver>profiledialog</receiver>
<slot>dataChanged()</slot>
</connection>
+ <connection>
+ <sender>connection_noCCP</sender>
+ <signal>stateChanged(int)</signal>
+ <receiver>profiledialog</receiver>
+ <slot>dataChanged()</slot>
+ </connection>
</connections>
<includes>
<include location="local" impldecl="in declaration">Profile.h</include>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/umtsmon/src/view/profiledialog.ui.h new/umtsmon/src/view/profiledialog.ui.h
--- old/umtsmon/src/view/profiledialog.ui.h 2008-01-10 17:33:07.000000000 +0100
+++ new/umtsmon/src/view/profiledialog.ui.h 2008-01-15 15:39:19.000000000 +0100
@@ -61,6 +61,7 @@
theProfile.setReplaceDefaultRoute(connection_routing_replaceDefaultRoute->isChecked());
theProfile.setUsePeerDns(connection_routing_usepeerdns->isChecked());
theProfile.setNoCompression(connection_noCompression->isChecked());
+ theProfile.setNoCCP(connection_noCCP->isChecked());
theProfile.setNoAuth(connection_noAuth->isChecked());
theProfile.setWarnOnDataThreshold(checkBox_warn_data_threshold->isChecked());
@@ -109,6 +110,7 @@
connection_routing_noipdefault->setChecked(theProfile.getNoIpDefault());
connection_routing_defaultroute->setChecked(theProfile.getIsDefaultRoute());
connection_noCompression->setChecked(theProfile.getNoCompression());
+ connection_noCCP->setChecked(theProfile.getNoCCP());
connection_noAuth->setChecked(theProfile.getNoAuth());
connection_routing_replaceDefaultRoute->setChecked(theProfile.getReplaceDefaultRoute());
connection_routing_usepeerdns->setChecked(theProfile.getUsePeerDns());
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/umtsmon/TODO new/umtsmon/TODO
--- old/umtsmon/TODO 2008-01-10 17:33:07.000000000 +0100
+++ new/umtsmon/TODO 2008-01-15 15:39:19.000000000 +0100
@@ -151,11 +151,12 @@
/ maintain statistics and an alarm if you hit a percentage of bandwith per month
X add settings to Profile Dialog
X store traffic data in config file
- * show sum & status in display
+ / show sum & status in display
* throw warning if threshold hit
* move testersettings stuff from the various *_main.cpp files to TestFrame.cpp
- * solve the CGREG/CREG issue for ACM devices that don't answer that query well
+ X solve the CGREG/CREG issue for ACM devices that don't answer that query well
(bug 1865927)
+ X add new advanced ppp option: No Compression Control Protocol negotiation
--------------------------------------------------------------------------
For "FUTURE RELEASES":
@@ -210,4 +211,7 @@
* iconify
* integration with address books
* installers
+ * (See Bug 1856802) for some device/operator, the MTU changes between GPRS and
+ UMTS operation. The only workaround is currently to set a fixed MTU in
+ the file /etc/ppp/options, which then is used for both radio modes.
++++++ umtsmon-0.7.90-pppverbosity.diff ++++++
Index: main.cpp
===================================================================
RCS file: /cvsroot/umtsmon/umtsmon/main.cpp,v
retrieving revision 1.44
diff -u -p -r1.44 main.cpp
--- main.cpp 14 Dec 2007 20:28:01 -0000 1.44
+++ main.cpp 15 Jan 2008 14:50:23 -0000
@@ -60,6 +60,8 @@ static bool help( __attribute__ ((unused
printf(" --force-autodetect force autodetection (don't use info from config file)\n");
printf(" --serial <at>[,ppp] will prevent autodetection of devices and use serial port <at>[,<ppp>]\n");
printf(" -s <at>[,<ppp>] will prevent autodetection of devices and use serial port <at>[,<ppp>]\n");
+ printf(" --ppp-verbose [level] set pppd verbosity, 0=normal (default), 2=all\n");
+ printf(" -p [level] set pppd verbosity, 0=normal (default), 2=all\n");
printf(" --verbose [level] set verbosity, 1=little (default), %d=all\n", MAX_VERBOSITY);
printf(" -v [level] set verbosity\n");
printf("\n");
@@ -105,6 +107,7 @@ static bool setserial(char* anArgument)
// oops global variable declared here...
int theVerbosity = 1;
+int thePPPVerbosity = 0;
static bool setVerbosity(char* anArgument)
{
@@ -123,11 +126,28 @@ static bool setVerbosity(char* anArgumen
return true;
}
+static bool setPPPVerbosity(char* anArgument)
+{
+ DEBUG5("setPPPVerbosity: '%s'\n", anArgument);
+
+ int myNumber = atoi(anArgument);
+ if (myNumber < 0 || myNumber > 2)
+ {
+ printf("ERROR: PPP verbosity argument should be between 0 and 2\n");
+ return false;
+ }
+ thePPPVerbosity = myNumber;
+ DEBUG2("set PPP verbosity level to %d\n", thePPPVerbosity);
+
+ return true;
+}
+
static struct s_args theArgsTable[] =
{
{ "--help", "-h", false, help, },
{ "--serial", "-s", true, setserial, },
{ "--verbosity", "-v", true, setVerbosity, },
+ { "--ppp-verbosity", "-p", true, setPPPVerbosity, },
{ "--force-autodetect", "", false, setForceAutodetection, },
// keep this one last
{ "\0", "\0", false, NULL, },
Index: umtsmon_global.h
===================================================================
RCS file: /cvsroot/umtsmon/umtsmon/umtsmon_global.h,v
retrieving revision 1.22
diff -u -p -r1.22 umtsmon_global.h
--- umtsmon_global.h 11 Oct 2007 17:05:48 -0000 1.22
+++ umtsmon_global.h 15 Jan 2008 14:50:23 -0000
@@ -33,6 +33,7 @@
*/
#include
extern int theVerbosity; // actually defined in main.cpp
+extern int thePPPVerbosity;
#define MAX_VERBOSITY 6
// note: the below is actually GCC-specific, see "info:/gcc/Variadic Macros"
#define DEBUG1(format, ...) {if (theVerbosity>=1) printf("##P1 t=%03ld: " format, time(NULL)%1000, ## __VA_ARGS__);}
Index: src/model/PPPConnection.cpp
===================================================================
RCS file: /cvsroot/umtsmon/umtsmon/src/model/PPPConnection.cpp,v
retrieving revision 1.10
diff -u -p -r1.10 PPPConnection.cpp
--- src/model/PPPConnection.cpp 12 Jan 2008 20:08:48 -0000 1.10
+++ src/model/PPPConnection.cpp 15 Jan 2008 14:50:23 -0000
@@ -166,7 +166,7 @@ PPPConnection::isPPPConnected(void)
theRunningPPPDPID=-1;
thePPPDStdOut = thePPPThreadPtr->getStdOut();
thePPPDStdErr = thePPPThreadPtr->getStdErr();
- if(theVerbosity>4)
+ if(thePPPVerbosity > 1)
{
QStringList::Iterator it;
DEBUG4("*****output of PPP to stdout\n");
@@ -371,7 +371,7 @@ QStringList PPPConnection::assembleArgum
// PPP related stuff
// we only ask PPP to detach if connection is successfully up
myPPPArguments.push_back("updetach");
- if (theVerbosity > 2)
+ if (thePPPVerbosity > 0)
{
myPPPArguments.push_back("dump");
myPPPArguments.push_back("debug");
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org