Difference between revisions of "Serial Card (Syba)"

From LinuxMCE
Jump to: navigation, search
 
(19 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{versioninfo|810Status=applies|810UpdatedDate=10 Oct 2011|810UpdatedBy=twodogs}}
+
{{versioninfo|810Status=applies|810UpdatedDate=10 Oct 2011|810UpdatedBy=twodogs|1004Status=applies|1004UpdatedDate=10 Oct 2011|1004UpdatedBy=twodogs}}
[[Category: Tutorials]]
+
[[Category: Serial]]
[[Category:VoIP]]
+
[[Category: Obsolete]]
 
{| align="right"
 
{| align="right"
 
   | __TOC__
 
   | __TOC__
 
   |}
 
   |}
 
This tutorial covers how to install the Syba SY-PCI15001 expansion card. This costs about $35, has 6 serial ports, and uses the MOSCHIP MCS9865 chip (even though Newegg says it uses MCS9845 - wrong). Moschip doesn't have a stellar record with Linux, but the drivers have been recently updated and the price is right. Not exactly plug/play, but it shouldn't take too long to install by following this tutorial.
 
 
  
 
==Overview==
 
==Overview==
  
The Syba card ships with out-of-date drivers, so we'll use the latest Moschip drivers. Following the Moschip instructions will result in two working ports that LinuxMCE can't recognize (because they're ttyD instead of ttyS). The remaining four ttyS ports will be recognized, but they won't work with LMCE because the standard driver configuration is wrong (need to have hardware flow control enabled). Also, grub only sets up four serial ports, two of which are typically allotted to the motherboard. So, here is what to do...
+
This tutorial covers how to install the Syba SY-PCI15001 expansion card. It costs about $35, has 6 serial ports, and uses the Moschip MCS9865 contoller (Newegg wrongly says it uses MCS9845). Moschip doesn't have a stellar record with Linux, but the drivers have been recently updated and the price is right. Not exactly plug/play, but it shouldn't take too long to install by following this tutorial.
  
*edit grub configuration to allow 8 ports
+
The Syba card ships with out-of-date drivers, so we'll use the latest from Moschip. Following the Moschip instructions will result in two working ports that LinuxMCE can't recognize (because they're ttyD instead of ttyS). The remaining four ttyS ports will be recognized, but they also won't work with LMCE because the standard driver configuration is wrong (need to have hardware flow control enabled). Also, grub only sets up four serial ports, two of which are typically allotted to the motherboard. So, here is what to do...
*edit the Moschip driver file to permit hardware flow control before compiling
+
 
*compile the driver
+
*Edit grub configuration to allow 8 ports.
*modify the LMCE script "ListSerialPorts.sh" to recognize the ttyD ports
+
*Edit the Moschip driver file before compiling to permit hardware flow control.
 +
*Compile the driver.
 +
*Modify the LMCE script "ListSerialPorts.sh" to recognize the ttyD ports.
  
 
==Installation==
 
==Installation==
Physically install the card. The two ports on the card are the mcs9865-isa ports that show up as ttyD. The remaining 4 ttyS ports are on expansion brackets with short cables. Boot LMCE and go to the KDE desktop. Download the driver from Moschip and extract the compressed file.
+
Physically install the card. Boot LMCE and go to the KDE desktop. Download the driver from Moschip and extract the compressed file.
  
 
http://www.asix.com.tw/products.php?op=pItemdetail&PItemID=125;74;111&PLine=74
 
http://www.asix.com.tw/products.php?op=pItemdetail&PItemID=125;74;111&PLine=74
Line 28: Line 27:
  
 
Edit "/boot/grub/menu.lst" to add "8250.nr_uarts=8" at the end of the generic kernel line as shown below.
 
Edit "/boot/grub/menu.lst" to add "8250.nr_uarts=8" at the end of the generic kernel line as shown below.
 +
 +
"/boot/vmlinuz-2.6.27-17-generic root=UUID=f8bb6686-8ed8-4795-9e5f-739f36e69d8e ro quiet splash 8250.nr_uarts=8"
 +
 +
'''Note''': this does not work for LMCE 1004 because that uses grub2. For 1004 you must edit etc/default/grub and add "8250.nr_uarts=8" after "quiet splash". Save the file, open a terminal and enter "sudo update-grub"
  
 
===Edit Moschip driver file===
 
===Edit Moschip driver file===
  
edit one of the downloaded files "mcs9865.c"
+
Edit the driver file "mcs9865.c"
  
for each line that says ".en_flow_control= 0," change the "0" to a "1"
+
For each line that says ".en_flow_control= 0," change the "0" to a "1"
  
using the "find and replace" feature in Kate is the easiest way to do this.
+
Using the "find and replace" feature in Kate is the easiest way to do this.
  
 
===Compile===
 
===Compile===
Line 41: Line 44:
 
In the terminal, change to the moschip driver directory (wherever you extracted it.)
 
In the terminal, change to the moschip driver directory (wherever you extracted it.)
  
type "make" and enter. You'll see something about "lacks a cast" that looks scary, but is nothing to worry about.
+
Type "make" and enter. You'll see something about "lacks a cast" that looks scary, but is nothing to worry about.
  
type "sudo make install" and enter
+
Type "sudo make install" and enter
  
 
===Get LMCE to recognize ttyD ports===
 
===Get LMCE to recognize ttyD ports===
  
edit "usr/pluto/bin/ListSerialPorts.sh" with root permissions (sudo kate)
+
LMCE knows how to read ttyD ports created by a Starex card. We're stealing this subroutine for the Syba card.
 +
 
 +
Edit "usr/pluto/bin/ListSerialPorts.sh" with root permissions (sudo kate)
 +
 
 +
Change the two occurrences of "starex-serial" to "mcs9865-serial"
  
change the two occurrences of "starex-serial" to "mcs9865-serial"
+
===Reboot===
  
There is a Starex card that creates ttyD ports. We're stealing this subroutine for the Syba card.
+
Enjoy your six new ports. The picture shows how the ports were numbered in my installation. If you need to troubleshoot, open a terminal and type "lspci -v" to see info like interrupts and such. Type "dmesg | grep tty" to see the total number of tty ports on your system. If you have two computers, see if you can get them to talk. Use a null modem cable and install Gtkterm.
  
===Reboot and you've got 6 new ports===
 
 
[[File:SY-PCI15001_PT2.jpg]]
 
[[File:SY-PCI15001_PT2.jpg]]

Latest revision as of 01:06, 28 September 2015

Version Status Date Updated Updated By
710 Unknown N/A N/A
810 applies 10 Oct 2011 twodogs
1004 applies 10 Oct 2011 twodogs
1204 Unknown N/A N/A
1404 Unknown N/A N/A
Usage Information

Overview

This tutorial covers how to install the Syba SY-PCI15001 expansion card. It costs about $35, has 6 serial ports, and uses the Moschip MCS9865 contoller (Newegg wrongly says it uses MCS9845). Moschip doesn't have a stellar record with Linux, but the drivers have been recently updated and the price is right. Not exactly plug/play, but it shouldn't take too long to install by following this tutorial.

The Syba card ships with out-of-date drivers, so we'll use the latest from Moschip. Following the Moschip instructions will result in two working ports that LinuxMCE can't recognize (because they're ttyD instead of ttyS). The remaining four ttyS ports will be recognized, but they also won't work with LMCE because the standard driver configuration is wrong (need to have hardware flow control enabled). Also, grub only sets up four serial ports, two of which are typically allotted to the motherboard. So, here is what to do...

  • Edit grub configuration to allow 8 ports.
  • Edit the Moschip driver file before compiling to permit hardware flow control.
  • Compile the driver.
  • Modify the LMCE script "ListSerialPorts.sh" to recognize the ttyD ports.

Installation

Physically install the card. Boot LMCE and go to the KDE desktop. Download the driver from Moschip and extract the compressed file.

http://www.asix.com.tw/products.php?op=pItemdetail&PItemID=125;74;111&PLine=74

Edit Grub

Bring up a terminal and open the text editor with root permissions "sudo kate".

Edit "/boot/grub/menu.lst" to add "8250.nr_uarts=8" at the end of the generic kernel line as shown below.

"/boot/vmlinuz-2.6.27-17-generic root=UUID=f8bb6686-8ed8-4795-9e5f-739f36e69d8e ro quiet splash 8250.nr_uarts=8"

Note: this does not work for LMCE 1004 because that uses grub2. For 1004 you must edit etc/default/grub and add "8250.nr_uarts=8" after "quiet splash". Save the file, open a terminal and enter "sudo update-grub"

Edit Moschip driver file

Edit the driver file "mcs9865.c"

For each line that says ".en_flow_control= 0," change the "0" to a "1"

Using the "find and replace" feature in Kate is the easiest way to do this.

Compile

In the terminal, change to the moschip driver directory (wherever you extracted it.)

Type "make" and enter. You'll see something about "lacks a cast" that looks scary, but is nothing to worry about.

Type "sudo make install" and enter

Get LMCE to recognize ttyD ports

LMCE knows how to read ttyD ports created by a Starex card. We're stealing this subroutine for the Syba card.

Edit "usr/pluto/bin/ListSerialPorts.sh" with root permissions (sudo kate)

Change the two occurrences of "starex-serial" to "mcs9865-serial"

Reboot

Enjoy your six new ports. The picture shows how the ports were numbered in my installation. If you need to troubleshoot, open a terminal and type "lspci -v" to see info like interrupts and such. Type "dmesg | grep tty" to see the total number of tty ports on your system. If you have two computers, see if you can get them to talk. Use a null modem cable and install Gtkterm.

SY-PCI15001 PT2.jpg