V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
bullettrain1433
V2EX  ›  macOS

请问 osx 下有虚拟串口工具么

  •  
  •   bullettrain1433 · Feb 6, 2015 · 6371 views
    This topic created in 4102 days ago, the information mentioned may be changed or developed.
    类似于windows下面的Virtual Serial Port,有v友知道么或者用过推荐下,感激不尽
    3 replies    2020-11-02 20:15:25 +08:00
    ryd994
        1
    ryd994  
       Feb 6, 2015 via Android
    cu?这个应该是Unix系通用
    kamil
        2
    kamil  
       Feb 6, 2015
    简单点,终端screen /dev/tty.usbserial-XXXX
    或者pySerial
    import serial
    ser = serial.Serial(port='/dev/tty.usbserial-XXXX')
    print('Using port: '+ser.portstr)
    print(ser.baudrate)
    print(ser.isOpen())
    ser.write("ATI\r\n")
    time.sleep(0.5)
    print('ser.inWaiting():', ser.inWaiting())
    while True:
    ch = ser.read()
    if ch == '':
    break
    print(ch)
    ser.close()
    magoolau
        3
    magoolau  
       Nov 2, 2020
    老哥,找到这个工具没有
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2692 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 47ms · UTC 13:20 · PVG 21:20 · LAX 06:20 · JFK 09:20
    ♥ Do have faith in what you're doing.