When I tried to plug my development board, I saw serial port as ttyUSB0, but unfortunately it disappeared / disconnected. After googling I found the reason behind this is brltty (used for blinds) refer this. So, I decided to remove it

$ sudo apt-get remove brltty

After removing,

$ dmesg

[ 4876.621231] usb 7-1: FTDI USB Serial Device converter now attached to ttyUSB0

yes my development board is connected with development system at /dev/ttyUSB0.

$ ls -l /dev/ttyUSB0

crw-rw—- 1 root dialout 188, 0 Apr 25 11:51 /dev/ttyUSB0

I need to add my user to group “dialout” to access the serial port (ttyUSB0),

$ sudo adduser audhil dialout

Next problem is, when I  try to connect it with picocom(terminal emulation program) for serial communication.

$  picocom -b 115200 /dev/ttyUSB0 

where as baud rate is 115200, and my board is at /dev/ttyUSB0 port.

picocom v1.4

port is : /dev/ttyUSB0
flowcontrol : none
baudrate is : 115200
parity is : none
databits are : 8
escape is : C-a
noinit is : no
noreset is : no
nolock is : no
send_cmd is : ascii_xfr -s -v -l10
receive_cmd is : rz -vv

FATAL: cannot open /dev/ttyUSB0: Device or resource busy

To resolve this, I found the process which is using my serial port as,

$ sudo lsof /dev/ttyUSB0

COMMAND    PID    USER    FD    TYPE    DEVICE    SIZE/OFF    NODE    NAME

modem-man  1069    root      29u   CHR      188,0            0t0         484165    /dev/ttyUSB0

I need to edit /lib/udev/rules.d/77-mm-usb-device-blacklist.rules (for info) and add my new blocklist rule for my device.

$ sudo vim /lib/udev/rules.d/77-mm-usb-device-blacklist.rules

and add the line as below,

# Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
ATTRS{idVendor}==”0403″, ATTRS{idProduct}==”6001″, ENV{ID_MM_DEVICE_IGNORE}=”1″

You can get info of chip for writing the rule as above, from

$  lsusb | grep FT232

Bus 007 Device 011: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

Again trying to connect with picocom

$picocom -b 115200 /dev/ttyUSB0

picocom v1.4

port is : /dev/ttyUSB0
flowcontrol : none
baudrate is : 115200
parity is : none
databits are : 8
escape is : C-a
noinit is : no
noreset is : no
nolock is : no
send_cmd is : ascii_xfr -s -v -l10
receive_cmd is : rz -vv

Terminal ready

uboot>

press ctrl+a followed by ctrl+x to exit picocom

This time I succeded, my board is communicating with my development workstation.

Enjoy…!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s