Category Archives: Ubuntu

Checking arduino port on ubuntu

Sometime in processing, you will need to listen to the serial port that arduino attached to. Finding out the portIndex is easy on windows by simply checking in Control Panel -> Device Manager. However when you are in linux (ubuntu), you will need to use command to do it.
  1. First plugin your arduino to usb
  2. type lsusb to see list of attached usb devices
  3. type dmesg | tail and it show you which serial port your usb device bind to. In my case, it is something like: [3486.xxxxxx] usb 2-2: FTDI USB Serial Device Converter now attached to ttyUSB0
  4. or, you may also type dmesg | grep tty
  5. Then you need to figure out the index of this ttyUSB0. Ubuntu reserved ttyS0 to terminal and 1 until 31. normally ttyUSB0 means 32.

Arduino Clone vs FTDI

FTDI has been acting very unprofessional by pushed out a new driver with Windows Update that bricks counterfeit/clone/incompatible FTDI chips by setting the Product ID to “0000”. Here is the process that worked for me to return the FTDI chip back to its original VID:PID of 0403:6001 from a Linux (Ubuntu) computer.
  1. Plug in your bricked device.  If you run “lsusb” it should show a device at “0403:0000″.
  2. Download ft232r_prog from ft232r_prog (v1.24) and extract to a folder
  3. Install the build dependencies by running “sudo apt-get install make gcc libftdi-dev"
  4. Change directory into the folder cd /ft232r_prog
  5. Type “make” to build the program
  6. Now run “sudo ./ft232r_prog --old-pid 0x0000 --new-pid 0x6001
  7. You are done.  Unplug and re-insert your USB device and run “lsusb” again.  It should show an id of 0403:6001
However, if you just wanto use the chip on windows, you may follow this video tutorial: or
if somehow your USB Serial Port show a warning icon after you done all these, you may wanto follow this tutorial to set the PID from 0000 back to default 0001.
  1. Downlaod
  2. Install and run FT_Prog
  3. Click the magnificent glass and you see Product ID is 0x6000
  1. Click USB Device Descriptor
  2. On the right panel, select FTDI Default
  3. Click the lightning icon to Program Devices
  4. Click Program button and it will be alright.

Installing processing on Ubuntu Desktop

I am using Ubuntu 14.04 To run Processing, you need to have JAVA. By default, ubuntu do not come with JAVA pre-installed due to licensing issue (DAMN! These biz ppl is blocking the earth turning again). There are 2 type of java runtime you can install, one from openJDK and another one from Oracle. Processing2 at this time of writing only work with the later one. Follow this tutorial on how to install Oracle Java to your ubuntu machine. The process can take up to 3 hours if you have a slow Internet line. After successfully installed, you may proceed to download processing. I like to place my processing under /opt.