diff --git a/ethertools/sitter3.py b/ethertools/sitter3.py index 273d032..159612b 100755 --- a/ethertools/sitter3.py +++ b/ethertools/sitter3.py @@ -144,20 +144,25 @@ class DAC(object): self.firmware_string = "-" self.got_broadcast(bp) - try: - t1 = time.time() - self.connect(self.last_broadcast.ip[0]) - t = time.time() - t1 - self.conn_status = "ok (%d ms)" % (t * 500) + #try: + t1 = time.time() + self.connect(self.last_broadcast.ip[0]) + t = time.time() - t1 + self.conn_status = "ok (%d ms)" % (t * 500) + if self.last_broadcast.sw_rev < 2: + self.firmware_string = "(old)" - if self.last_broadcast.sw_rev < 2: - self.firmware_string = "(old)" - else: - self.conn.sendall('v') - self.firmware_string = self.read(32).replace("\x00", " ").strip() - except (Exception, e): + else: + self.conn.sendall(b'v') + self.firmware_string = self.read(32).replace("\x00", " ").strip() + + + print('firmware string : ',self.firmware_string) + ''' + except Exception as e: print(e) self.conn_status = str(e) + ''' def connect(self, host, port = 7765): """Connect to the DAC over TCP."""