Labels

Linux (6) OpenCV (4) Deep Learning (3) MATLAB (3) Mac OS X (3) Windows (2) C# (1) Node JS (1)

2014年9月14日 星期日

Sending Data through UART USB dongle on Mac OS X

The Universal Asynchronous Receiver/Transmitter (UART) is a hardware that enables data transmission between parallel and serial form. Common UART communication protocols include RS-232RS-422 or RS-485.  I believe engineers who have lived in PC-era have used this cable before:




Today's computer no longer has RS-232 port. Fortunately, UART still exist in our life, just in different form:
This is USB-UART dongle made by FTDI chip. The chip on the board emulates a UART port so we can still use old technology to communicate with new chip, such as TI's Bluetooth Low Energy (BLE) chip CC2540.

So how can we connect to USB-UART? Actually Mac OS X has a command  "Screen". Just open an terminal and follow the steps below:

1. list the USB-UART device:
  $ ls /dev/cu.*                                                              
    /dev/cu.Bluetooth-Modem         /dev/cu.usbserial  
    This command will list the connected devices on your Mac. Our target is usbserial

2. Connect to the device, simple type the "screen" and baud rate:
  $ screen /dev/cu.usbserial 115200  
    The number 115200 is the baud rate used to communicate between two devices

3. To leave the screen, type CTRL-A then CTRL-\ 

Also there are many GUI tool can be used. I recommend using CoolTerm:

A good Coolterm tutorial can be found here:


CoolTerm is written in VB and can also be run on multiple platforms (Windows & Linux), which is a very convenient feature.

沒有留言:

張貼留言