Template:A-Series/Serial Ports

From ZaberWiki
Jump to navigation Jump to search

Appendix A - Available Communications Ports

Finding Installed Serial Ports

Windows

  1. Open Search or Run from the Start Menu or Taskbar, type "Device Manager" and press enter.
    Win-serport-1.png
  2. Expand the Ports (COM & LPT) category.
    Win-serport-2.png
    • In this example there are two serial ports available (COM1 and COM15), which are both USB adaptors.

Linux

  1. Finding devices
    • Open a terminal and execute the following command:
    dmesg | grep -E ttyU\?S↵
    • The response will be similar to the following:
      [ 2.029214] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
      [ 2.432572] 00:07: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
      [ 2.468149] 0000:00:03.3: ttyS4 at I/O 0xec98 (irq = 17) is a 16550A
      [ 13.514432] usb 7-2: FTDI USB Serial Device converter now attached to ttyUSB0
    • This shows that there are 3 serial ports available: ttyS0, ttyS4 and ttyUSB0 (a USB adaptor)
  2. Checking port permissions
    • Using the ports found above, execute the following command
    ls -l /dev/tty{S0, S4, USB0}↵
    • The permissions, given below, show that a user has to be root or a member of the dialout group to be able to access these devices
      crw-rw---- 1 root dialout 4, 64 Oct 31 06:44 /dev/ttyS0
      crw-rw---- 1 root dialout 4, 68 Oct 31 06:45 /dev/ttyS4
      crw-rw---- 1 root dialout 188, 0 Oct 31 07:58 /dev/ttyUSB0
  3. Checking group membership
    groups↵
    • The output will be similar to the following:
      adm cdrom sudo dip plugdev users lpadmin sambashare
      Notice that dialout is not in the list
    • A user can be added to the dialout group with the following command
    sudo adduser $USER dialout↵
    • Group membership will not take effect until the next logon.

OSX

  1. Finding devices
    • Open a terminal and execute the following command:
    ls /dev/cu.*serial*
    • The response will be similar to the following:
      /dev/cu.usbserial-FTB3QAET
      /dev/cu.usbserial-FTEJJ1YW
    • This shows that there are two serial ports available, both of which happen to be USB adaptors.
    • There may be other devices that match this query, such as keyboards or some web cameras. To determine which one corresponds to your USB serial cable, try repeating the command with and without the cable connected to the computer, to see which one appears and disappears.