LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-29-2003, 11:37 AM   #1
hughmax
LQ Newbie
 
Registered: Mar 2003
Posts: 3

Rep: Reputation: 0
How to Change config to use USB serial interface


I'm running a linux based program under windows via a command shell.
Is it possible to change the config file to accept a USB serial port
instead of a normal serial port?

What changes do I need to make to the config file?

Any help would be appreciated.


I've located the appropriate driver from the prolific web site. It has come in a zip containing the following:

Files Included in This Release:
pl2303.c
pl2303.h
usbserial.c
usb-serial.h
readme.txt
makefile

Below is an excerpt from the existing config file:

# Use "" for current working directory
#datadir = ""
#logdir = ""

# default debug modes (hex)
# initial value on start, and up to 4 values that can be toggled
# debug = initial deb1 deb2 deb3 deb4
debug = 01 01 03 07 ff

# default serial port debug modes (only linux)
# syntax as for debug
serdebug = 01 01 03 07 ff

...

unixdev = /dev/ttyS0
 
Old 03-30-2003, 11:09 AM   #2
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
The prolific driver is included in kernels from at least 2.4.18 (pl2303). 'modprobe pl2303' should load both the module and usbserial. You could just tell the config file to use /dev/ttyUSB0 as the device.
 
Old 03-30-2003, 04:59 PM   #3
hughmax
LQ Newbie
 
Registered: Mar 2003
Posts: 3

Original Poster
Rep: Reputation: 0
This program was written in version 2.4.10 so presumably doesn't understand /dev/ttyUSB0 .

Can I add this driver within the main config script on my floppy disk load up?

Below are a few excerpts from the loading config script.Could you indicate where I would insert the script to do this and what it would be. Thanks.


# free space on ramdisk - the 2.4.10 kernel outdated those files
rm /lib/modules -R
rm /bin/traceroute
rm /bin/dhcpcd
rm /bin/netstat

# important - this copies the login scripts!
cp /mnt/floppy/etc/* /etc/

echo -e "Creating /lincardemu directory and setting permissions" >/dev/tty1
# create a lce directory inside the ramdisk and enter it
mkdir /lincardemu
chmod 777 /lincardemu
cd /lincardemu/
#decompress binary from floppy straight into ramdisk
gzip -d -c /mnt/floppy/lce.gz > /lincardemu/lce
# copy the files from floppy to ramdisk
cp /mnt/floppy/lce/* /lincardemu/
cp /mnt/floppy/loaf.txt /lincardemu/loaf.txt
 
Old 03-30-2003, 06:39 PM   #4
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
The program should be able to use the /dev/ttyUSB0 since it is merely another device that would present itself as just another serial port. If the program could use /dev/modem (a common symlink to /dev/ttySx) then it should be okay. You could even create your own link to /dev/ttyUSB0 as well.

As for where in the script - just insert a '/sbin/modprobe pl2303' and '/sbin/modprobe usbserial' (provided the modules are actually avialable) before you need to use the device.
 
Old 03-31-2003, 04:34 PM   #5
hughmax
LQ Newbie
 
Registered: Mar 2003
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for your reply, but still no joy.
I tried inserting the '/sbin/modprobe pl2303' in various places.
Each time I got "syntax error in assignment value" and the appropriate line number.

It looks as though it doesn't recognise "modprobe".

If I key in "ls" 'on the fly' at the # prompt (by alt F3 ing out)
It says: insmod loadkmap etc, but not modprobe.

Is this where it should be? Can I "include" this command within the config file? What would the syntax be?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB to Serial Converter on Serial Modem bongski55 Linux - General 3 08-29-2005 11:04 AM
ttyS0 - I only have one serial interface, believe me. calutateo Linux - Hardware 3 06-25-2005 01:55 AM
serial port based midi interface frieza Linux - General 4 04-10-2005 07:54 AM
Help needed to diagnose lockup on IBM X31 without serial interface denishennessy Linux - Laptop and Netbook 0 01-23-2004 06:09 PM
zoom external serial with usb to serial adapter foustware Linux - Hardware 1 12-07-2003 03:02 AM


All times are GMT -5. The time now is 08:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration