python icon indicating copy to clipboard operation
python copied to clipboard

meshtastic CLI hangs on MAC

Open shivharis opened this issue 3 years ago • 0 comments

The following code on MAC Catalina 10.15.7 hangs in open. Not sure why an open() would hang - it should either open the device or return with error. Hang is not expected!

    if platform.system() != 'Windows':
        with open(self.devPath, encoding='utf8') as f:
            attrs = termios.tcgetattr(f)
            attrs[2] = attrs[2] & ~termios.HUPCL
            termios.tcsetattr(f, termios.TCSAFLUSH, attrs)
            f.close()
        time.sleep(0.1)

(BTW: platform.system() return 'Darwin' for Catalina 10.15.7) Discovered hang using debug log print statements.

shivharis avatar May 05 '22 15:05 shivharis