Index: trunk/Arduino/GSM/doms/doms.ino
===================================================================
--- trunk/Arduino/GSM/doms/doms.ino	(revision 17970)
+++ trunk/Arduino/GSM/doms/doms.ino	(revision 17971)
@@ -27,8 +27,8 @@
 
 
-#define USE_WIRE
+//#define USE_WIRE
 #define USE_ETH
 //#define USE_LSM
-//#define USE_GSM
+#define USE_GSM
 
 #include <SPI.h>
@@ -69,4 +69,5 @@
     GSM_SMS sms;
     byte gsmStatus = -1; // -1 : unknown
+    bool use_gsm = false;
 #endif
 
@@ -134,10 +135,24 @@
 {
 #ifdef USE_GSM
-    if( gsmStatus==GSM_READY )
+    if (use_gsm && gsmStatus==GSM_READY)
+    {
+        // user wants us to use GSM, and GSM seems to be okay.
         checkForSms();
-    else
-    {
-        // try to connect to DSM network again.
+    } else if (use_gsm && gsmStatus!=GSM_READY)
+    {
+        // user wants us to use GSM, but it's not yet okay,
+        // so we try to connect to GSM network.
         gsmStatus = gsmAccess.begin(PINNUMBER);
+    } else if (!use_gsm && gsmStatus!=-1)
+    {
+        // user does NOT want us to use GSM, but we seem to be connected, 
+        // so let's shut it down.
+        gsmAccess.shutdown();
+        // since there is no dedicated 'GSM_SHUTDOWN' status, we simply use -1.
+        gsmStatus = -1;
+    } else 
+    {
+        // user does NOT want us to use GSM and GSM seems to be down .. 
+        // so we don't do anything.
     }
 #else 
@@ -183,4 +198,13 @@
                 client.println(message);
                 break;
+            case 'g':
+                use_gsm = true;
+                break;
+            case 'G':
+                use_gsm = false;
+                break;
+            case 's':
+                printStatus(client, true);
+                break;
           //case 'p':
               //digitalWrite(9, HIGH);
@@ -204,4 +228,6 @@
     c.println("h help");
     c.println("q quit");
+    c.println("g/G en-/disable GSM");
+    c.println("s status");
     c.println();
     c.println("d direction");
@@ -210,4 +236,23 @@
 #endif
 }
+
+void printStatus(
+#ifdef USE_ETH
+    EthernetClient &c,
+#endif
+    bool print_via_serial
+    )
+{
+#ifdef USE_ETH
+    c.print("use_gsm:   ");     c.println(use_gsm);
+    c.print("gsmStatus: ");     c.println(gsmStatus);
+#endif
+    if (print_via_serial)
+    {
+        Serial.print("use_gsm:   ");     Serial.println(use_gsm);
+        Serial.print("gsmStatus: ");     Serial.println(gsmStatus);
+    }
+}
+
 
 void checkForSms()
