瀏覽代碼

adding check for pl2303

* The ttyPIU symbolic link now also looks for pl2303
clementinecomputing 6 年之前
父節點
當前提交
e6ef293f14
共有 1 個文件被更改,包括 11 次插入1 次删除
  1. 11 1
      busunit/scripts/setup-serial-fona.py

+ 11 - 1
busunit/scripts/setup-serial-fona.py

@@ -61,7 +61,17 @@ for devfn in ttyfn:
       print "found rs232 device, assuming PIU"
     src_tty = join(DEVDIR,devfn)
     dst_tty = join(DEVDIR,"ttyPIU")
-    system("ln -s " + src_tty + " " + dst_tty)
+    system("ln -sf " + src_tty + " " + dst_tty)
+    continue
+
+  m = re.search(r'ID_MODEL_ID=2303', info)
+  if m:
+
+    if VERBOSE:
+      print "found pl2303 device, assuming PIU"
+    src_tty = join(DEVDIR,devfn)
+    dst_tty = join(DEVDIR,"ttyPIU")
+    system("ln -sf " + src_tty + " " + dst_tty)
     continue
 
   m = re.search(r'SimTech_SIM5320', info)