1

I am trying find out how and with which program for OSX (10.5.8) I can configure serial ports? I am trying to establish a wireless connection between two Xbee´s (RF modules) and cannot figure out how to use ZTerm nor screen under Terminal. The setup I am using is: an Arduino+Xbeeshield+Xbee with external power supply, and an xbee on the xbee explorer connected to the Computer via USB. I am trying to gather information on this through various forums, but most of them cover the configuration issue for PC using X-CTU (which I tried with CrossOver but it doesn´t recognize ny of my ports). According to one source, using screen under Terminal should show me all my serial ports, particularly /dev/tty.KeySerial1 - but it doesn´t show, even though I´ve plugged in both my arduino+xbee shield and the xbee on the explorer.

4

2 回答 2

1

/dev/tty.KeySerial1 不正确。

第一步是安装 FTDI USB 驱动程序(如果尚未安装)。确定是否安装的最快方法是连接 XBee Explorer 板。然后在 /dev 中查找名为 tty.usbserial-XXXXXXXX 的设备(Xs 将是唯一的十六进制 ID)。如果您看到多个这样的设备,那么您可能也插入了 Arduino,您需要断开它以确定 XBee Explorer 板的设备名称。

一旦您知道设备名称,您需要做的就是命令“screen /dev/tty.usbserial-XXXXXXXXX 9600”。那应该为你做。

于 2011-04-01T18:33:34.960 回答
0

您可以使用 stty 配置 tty 设备本身。请务必从您要配置的终端重定向输入,因为 stty 对其输入进行操作。例如,要将串行端口设置为 9600、无奇偶校验、8 个数据位和 1 个停止位,在 Windows 中也称为“9600N81”,请尝试:

stty 9600 cs8 -cstopb -parenb < /dev/tty.usbserial-xxxxxxxx

以编程方式,您可以通过打开串行端口并在设备上使用 termios(4) ioctl 来执行此操作。有关更多帮助,请参见 termios(4) 手册页。

于 2013-06-28T17:38:35.790 回答