Hi
Some documentation on configuring a Host for serial console usb driver
Serial console is for following boot process and also if no network access exist
+ RTFM
It's done in 2 steps
- Get serial working with any device, name /dev/ttyUSB1
- Get serial working with a uniq specic device name /dev/ttySP<xxx> here 879 is used as an example
This works for Fedora 9,10 with SheevaPlug console is on ttyUSB1
As root or sudo do
Load USB serial driver
modprobe ftdi_sio vendor=0x9e88 product=0x9e8f
Connect miniUSB to SheevaPlug
Note Product and SerialNumber from syslog (/var/log/messages)
Nov 19 11:41:12 dax kernel: usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Nov 19 11:41:12 dax kernel: usb 1-1.1: Product: SheevaPlug JTAGKey FT2232D B
Nov 19 11:41:12 dax kernel: usb 1-1.1: Manufacturer: FTDI
Nov 19 11:41:12 dax kernel: usb 1-1.1: SerialNumber: FTSFBVPM
Nov 19 11:48:31 dax kernel: usb 1-1.1: USB disconnect, address 33
Nov 19 11:48:31 dax kernel: ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
Nov 19 11:48:31 dax kernel: ftdi_sio 1-1.1:1.0: device disconnected
Nov 19 11:48:31 dax kernel: ftdi_sio ttyUSB1: FTDI USB Serial Device converter now disconnected from ttyUSB1
With USB connected: Check with udevinfo to verify name/value of ATTRS{serial}
udevinfo -a -p $(udevinfo -q path -n /dev/ttyUSB1)|grep serial
Inspired from
http://plugcomputer.org/plugforum/index.php?topic=84.0For this example SerialNumer, ATTRS{serial} is "FTSFBVPM"
Use udev modprobe and to create a link to the proper ttyUSB
cat >>/etc/udev/rules.d/97-sheeva-serial.rules<<EOF
SYSFS{idProduct}=="9e8f",SYSFS{idVendor}=="9e88",ATTRS{serial}=="FTSFBVPM",ACTION=="add",RUN+="/sbin/modprobe -q ftdi-sio product=0x9e8f vendor=0x9e88",SYMLINK+="ttySP879"
SYSFS{idProduct}=="9e8f",SYSFS{idVendor}=="9e88",ATTRS{serial}=="Serialyyy",ACTION=="add",RUN+="/sbin/modprobe -q ftdi-sio product=0x9e8f vendor=0x9e88",SYMLINK+="ttySPyyy"
SYSFS{idProduct}=="9e8f",SYSFS{idVendor}=="9e88",ACTION=="add",RUN+="/sbin/modprobe -q ftdi-sio product=0x9e8f vendor=0x9e88",SYMLINK+"USB[0-1]"
EOF
Update Serial, xxx, yyy to reflect your units.
I use a name of ttySP<xxx> where '<xxx>' is the last 3 digits of serial number of the unit.
sp<xxx> also as the hostname and for dhcp.
I use xxx=879 in this example, please update to reflect actual number
Add as many as you have Sheeva Plug devices
What you get is a sym link to the proper device, and you also get ownership of device if you are logged in att the console
Ownership can also be set in the udev rules
Restart udev
Console permissions, anybody logged in at host console will get these
cat >>/etc/security/console.perms.d/51-SheevaPlug.perms <<EOF
# device classes -- these are shell-style globs
<sheeva>=/dev/ttyUSB1 /dev/ttySP879
# permission definitions
<console> 0600 <sheeva> 0660 root.uucp
EOF
Create Minicom rc file -- please update to your name and file location of minirc
cat >>/etc/minirc.Sheeva <<EOF
# Machine-generated file - use "minicom -s" to change parameters.
pu port /dev/ttySP879
pu baudrate 115200
pu bits 8
pu parity N
pu stopbits 1
pu minit
pu mreset
pu mhangup
pu backspace DEL
pu rtscts No
pu xonxoff No
EOF
Amend minicom setup to reflect the ttySP<xxx> name
as a user start minicom Sheeva to get a serial console to SheevaPlug
minicom SP879
It's possible to start minicom by watching the link creation in the /dev
Install inotify-tools - command-line programs providing a simple interface to inotify
Use inotify and when the USB serial is started a minicom session is started
The 'ls -l' is a delay to allow console.perms to run
inotifywait -e create /dev && ls -l /dev/ttySP879 && minicom SP879