updated command line 802.15.4 checksum calculator and added serClose to GoodFET to...
[goodfet] / client / GoodFET.py
index e60c31a..d8e4ac5 100755 (executable)
@@ -90,6 +90,10 @@ class GoodFET:
             glob_list = glob.glob("/dev/ttyUSB*");
             if len(glob_list) > 0:
                 port = glob_list[0];
+        if port is None:
+            glob_list = glob.glob("/dev/ttyU0");
+            if len(glob_list) > 0:
+                port = glob_list[0];
         if os.name=='nt':
             from scanwin32 import winScan;
             scan=winScan();
@@ -153,6 +157,8 @@ class GoodFET:
         if self.verbose: print "Connected after %02i attempts." % attempts;
         self.mon_connected();
         self.serialport.setTimeout(12);
+    def serClose(self):
+        self.serialport.close();
     def telosSetSCL(self, level):
         self.serialport.setRTS(not level)
     def telosSetSDA(self, level):