Communicate with your board from a Linux Host (Basics)
From ArmadeusWiki
Revision as of 09:24, 31 March 2008 by FredericB (Talk | contribs) (Adding USB <-> Serial converter troubleshooting section (for the issue with ttybrl))
Contents
RS232 configuration
We suggest you to use Kermit as Terminal emulator for RS232 connection. Minicom was sadly reported to have problems when communicating with U-Boot (ZModem data transfer). If you just need a simple serial console and not to transfer data then GTKTerm is the perfect choice ! (package gtkterm in Ubuntu)
Kermit installation
- On *Ubuntu / Debian:
# apt-get install ckermit
or use Synaptic graphical package manager.
- On Fedora:
# rpm -q ckermit
Kermit configuration
- Edit/Create .kermrc file in your $HOME directory and put in it:
set line /dev/ttyS0 set speed 115200 set carrier-watch off set handshake none set flow-control none robust set file type bin set file name lit set rec pack 1000 set send pack 1000 set window 5 set transmit linefeed on
- In this example, we assume that your serial port is ttyS0 (first serial port). Change this to correct value if necessary.
- If you use an USB <-> Serial converter then serial port would surely be named like that: ttyUSB0
- If USB <-> Serial converter doesn't seem to work, run the demsg command. You should read this thread if you see some disconnection data like this :
[ 2445.568000] usb 1-1.4: new full speed USB device using uhci_hcd and address 22 ... [ 2446.964000] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0 [ 2446.964000] ftdi_sio 1-1.4:1.0: device disconnected
- If you get an error message such:
$ kermit -c /dev/ttyS0 ?SET SPEED has no effect without prior SET LINE
check that you have read/write rights on /dev/ttyS0 (ie your serial port)
Kermit usage
- To launch it:
$ kermit -c
- To switch from terminal mode to command mode:
CTRL + \ then c
- To switch from command mode to terminal mode:
C-Kermit>c then ENTER
TFTP server
In order to send your image files (U-Boot, Linux, RootFS or Firmware) with higher speed to your Armadeus board, you can use the Ethernet link and a TFTP server. Once the server started, the files located in the server shared directory (/tftpboot by default) will be accessible from the U-Boot TFTP client.
TFTP server installation
- On *Ubuntu / Debian:
# sudo apt-get install tftpd xinetd
or use Synaptic
- On Fedora:
# rpm -q tftpd xinetd
- Then create the directory that will contain all the files that the server will export (you have to be root to do that):
# mkdir /tftpboot # chmod 777 /tftpboot
Server configuration
- Edit or create the configuration file /etc/xinetd.d/tftp and modify/add it the following lines:
# default: off # description: The tftp server serves files using the trivial file transfer # protocol. The tftp protocol is often used to boot diskless # workstations, download configuration files to network-aware printers, # and to start the installation process for some operating systems. service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /tftpboot # disable = yes }
- Restart xinetd service:
# killall -HUP xinetd
- Put some files in /tftpboot