[pkg-fso-commits] [SCM] Various useful tools for an FSO installation branch, master, updated. debian/0.git20080812.2-32-gb5a13bb

Michael 'Mickey' Lauer mickey at vanille-media.de
Sun Sep 27 16:11:47 UTC 2009


The following commit has been merged in the master branch:
commit f15ff7c58946a2fd6ba767628b2fe5d6f46ff9bb
Author: Michael 'Mickey' Lauer <mickey at vanille-media.de>
Date:   Sat Apr 18 14:50:37 2009 +0200

    mickeyterm: if called without arguments, look for fso-abyss first, then fallback to gsm0710muxd

diff --git a/mickeyterm/TODO b/mickeyterm/TODO
index bc7710f..0ff2b24 100644
--- a/mickeyterm/TODO
+++ b/mickeyterm/TODO
@@ -3,11 +3,11 @@ for version 2.9.7:
 
 for version 2.9.8:
  - gracefully exit
- - if a port disappears, try to reopen it
+ - if a port disappears, try to reopen it (once)
 
 for version 2.9.9:
  - remove threads in favour of G mainloop?
- - rewrite in Vala?
+ - rewrite in Vala
 
 for version 3.1:
  - ncurses mode
diff --git a/mickeyterm/mickeyterm b/mickeyterm/mickeyterm
index 4707bc2..6a87613 100755
--- a/mickeyterm/mickeyterm
+++ b/mickeyterm/mickeyterm
@@ -13,7 +13,7 @@ Additional Features:
 GPLv2 or later
 """
 
-__version__ = "2.9.3"
+__version__ = "2.9.4"
 
 import sys, os, serial, threading, termios
 
@@ -453,7 +453,7 @@ class Terminal( object ):
         self.r.setDaemon( True )
         self.r.start()
         # optional
-        self.serial.write( "AT+CMEE=2;+CRC=1\r\n" )
+        # self.serial.write( "AT+CMEE=2;+CRC=1\r\n" )
         self.writer()
         self.banner( False )
         self.serial.close()
@@ -656,20 +656,30 @@ Mickey's Terminal Program.""")
         if args:
             parser.error("too many arguments")
     else:
+
         if port is "MUX":
-            # try to get portname from old-style MUXer
             import dbus
             bus = dbus.SystemBus()
-            oMuxer = bus.get_object( "org.pyneo.muxer", "/org/pyneo/Muxer" )
-            iMuxer = dbus.Interface( oMuxer, "org.freesmartphone.GSM.MUX" )
-            port = iMuxer.AllocChannel( "mickeyterm.%d" % os.getpid() )
-            assert port, "could not get path from gsm0710muxd. need to supply explicit portname"
+
+            useAbyss = ( "org.freesmartphone.omuxerd" in bus.list_names() )
+            if useAbyss:
+                oMuxer = bus.get_object( "org.freesmartphone.omuxerd", "/org/freesmartphone/GSM/Muxer" )
+                iMuxer = dbus.Interface( oMuxer, "org.freesmartphone.GSM.MUX" )
+                port, channel = iMuxer.AllocChannel( "mickeyterm.%d" % os.getpid(), 0 ) # grab next free one
+                assert port, "could not get path from fso-abyss. need to supply explicit portname"
+            else:
+                oMuxer = bus.get_object( "org.pyneo.muxer", "/org/pyneo/Muxer" )
+                iMuxer = dbus.Interface( oMuxer, "org.freesmartphone.GSM.MUX" )
+                port = iMuxer.AllocChannel( "mickeyterm.%d" % os.getpid() )
+                assert port, "could not get path from gsm0710muxd. need to supply explicit portname"
 
         elif port.startswith( "fso" ):
-            fso, channel = port.split( ':', 1 )
-            number = int( channel )
             import dbus
             bus = dbus.SystemBus()
+
+            fso, channel = port.split( ':', 1 )
+            number = int( channel )
+
             oMuxer = bus.get_object( "org.freesmartphone.omuxerd", "/org/freesmartphone/GSM/Muxer" )
             iMuxer = dbus.Interface( oMuxer, "org.freesmartphone.GSM.MUX" )
             port, channel = iMuxer.AllocChannel( "mickeyterm.%d" % os.getpid(), number )

-- 
Various useful tools for an FSO installation



More information about the pkg-fso-commits mailing list