Raspberry Pi和Mac上的USB轉TTL串行電纜


2

我已在Raspberry Pi and the USB to TTL Serial Cable on Mac (unfinished)上記錄了我的所有進度。

screen /dev/cu.PL2303-000013FA 115200

這是我遇到的錯誤

  1. 它只是掛在一個空的終端屏幕上。
  2. 它出錯/閃爍Cannot open line '/dev/cu.PL2303-000013FA' for R/W: Resource busy,然後降落在Sorry, could not find a PTY. 上,然後返回帶有打印的[screen is terminating]語句的命令行。
  3. 如果我使用sudo(即sudo screen /dev/cu.PL2303-000013FA 115200)運行它,則會得到完全不同的錯誤/dev/cu.PL2303-000013FA: ioctl TIOCEXCL failed: Resource busy,然後出現空白終端屏幕。

如何解決這些問題,並使樹莓派在OSX上使用USB至TTL串行電纜工作?

1

I came up with the same issue and I tried a lot of different solutions with no avail. Three different drivers, different versions of OS X and different terminal programs.

In the end the problem proved to be much more easily solved than I thought. Double check your cabling. Make sure you've not plugged the RX and TX cables inversely. As soon as figured out that my USB-to-Serial cable had the colours green and white swapped, going agains the documentation, all was solved.

I hope it is as simple as that to you too.


0

In reply to question #3, read https://stackoverflow.com/questions/8632586/macos-whats-the-difference-between-dev-tty-and-dev-cu

If you want to test your uart connector by itself, connect tx to rx. Then open your screen command. Every key you type should appear back (echod back). (note that it will only appear once, not twice). When you remove the wire, characters will stop appearing.

My final advice is to checkout the CP2102. For instance: http://www.amazon.com/KEDSUM%C2%AE-CP2102-Module-Download-Converter/dp/B009T2ZR6W