Slackware This Forum is for the discussion of Slackware Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
10-30-2007, 07:55 AM
|
#1
|
|
Member
Registered: Apr 2007
Location: Stockholm, Sweden
Distribution: Slackware11&12
Posts: 94
Rep:
|
Correct syntax for cu
I am trying to use the cu command in Slackware 11 default installation to connect to a remote device by way of a serial port. While I can receive from the remote device I am unable to transmit. The syntax I use is:-
cu -l /dev/ttyS1 -s 9600 -h --nostop --parity=none dir
The computer has a dual installation. I can use M$-Windoze-hyperterminal without problem and so I do not belive it is a hardware problem.
What is the correct syntax ?
Are there alternative programs in Slackware I could try?
Are there other Linux programs anywhere ?
John
|
|
|
|
10-30-2007, 08:14 AM
|
#2
|
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,797
|
Did you try "man cu"?
http://linux.die.net/man/1/cu
Google is your friend
Last edited by pixellany; 10-30-2007 at 08:19 AM.
|
|
|
|
10-30-2007, 09:07 AM
|
#3
|
|
Senior Member
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 2,743
|
I found 'minicom' to be useful to chat to a router via a serial port.
|
|
|
|
10-30-2007, 09:55 AM
|
#4
|
|
Member
Registered: Apr 2007
Location: Stockholm, Sweden
Distribution: Slackware11&12
Posts: 94
Original Poster
Rep:
|
pixellany
Yes I have read the manual.
Please see what the maintainer has to say under the heading Bugs.
And we still work with vacuum tubes.
allend
Can you tell the syntax for minicom. It is for direct connection at 9600baud no modems or telephone numbers and the like.
John
|
|
|
|
10-30-2007, 04:23 PM
|
#5
|
|
Senior Member
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 2,743
|
This is a bit of a memory test! Have not done RS232 for a while.
You will need to uncomment a line in your /etc/inittab file to activate the serial port and add appropriate arguments. From "man agetty".
Quote:
For a hard-wired line or a console tty:
/sbin/agetty 9600 ttyS1
For a directly connected terminal without proper carriage detect wiring: (try this if your terminal just sleeps instead of giving you a password: prompt.)
/sbin/agetty -L 9600 ttyS1 vt100
|
|
|
|
|
10-31-2007, 05:46 AM
|
#6
|
|
Member
Registered: Apr 2007
Location: Stockholm, Sweden
Distribution: Slackware11&12
Posts: 94
Original Poster
Rep:
|
All that I so far acheive with agetty is a line that states :-
Password:
Entering the root password only repeats this.
John
|
|
|
|
10-31-2007, 08:23 AM
|
#7
|
|
Senior Member
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 2,743
|
John,
Sorry for my unclear post.
The /etc/inittab contains these lines:
Quote:
# Local serial lines:
#s1:12345:respawn:/sbin/agetty -L ttyS0 9600 vt100
#s2:12345:respawn:/sbin/agetty -L ttyS1 9600 vt100
|
I meant that you may need to change the agetty options in these lines.
Also, please note that minicom allows you to set the RS232 options. Start minicom with the -s option.
|
|
|
|
10-31-2007, 12:29 PM
|
#8
|
|
Member
Registered: Apr 2007
Location: Stockholm, Sweden
Distribution: Slackware11&12
Posts: 94
Original Poster
Rep:
|
I have now connected my laptop to same computer by null-modem to try to understand why is going on. The original cu command works. It stops working if I remove the # shown above in inittab.
agetty never works with or without #. It still seams tied up with this password idea.
I have looked at minicom and I just get confused by all its dialog boxes but I will be struggling with it soon. Its been in Slackware as long as I can remember.
The cu does seam to work even connected to hyperterminal two way but only in receive for my remote device which is a microcontroller. Hyperterminal still works fine two way and I just get more confused.
John
|
|
|
|
10-31-2007, 01:23 PM
|
#9
|
|
Member
Registered: Apr 2003
Location: uk
Distribution: slackware current
Posts: 741
Rep:
|
this may help a bit:
http://www.vanemery.com/Linux/Serial...l-console.html
you might want to check also that the 8250 module is loaded.
I have not used cu, but I have used minicom quite a bit (when I converted an ipaq to linux).
It is confusing at first, but you will soon get the hang of it. I read somewhere that it is superior to hyperterminal.
tobyl
|
|
|
|
10-31-2007, 07:08 PM
|
#10
|
|
Senior Member
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 2,743
|
I suspect that your microcontroller may not be asserting DCD (Data Carrier Detect).
*nix systems routinely make use of this, but other systems often do not.
Your choices are to use an appropriately wired cable or else use software options to ignore DCD.
|
|
|
|
11-01-2007, 09:26 AM
|
#11
|
|
Member
Registered: Apr 2007
Location: Stockholm, Sweden
Distribution: Slackware11&12
Posts: 94
Original Poster
Rep:
|
Many thanks allend & tobyl.
I can now use cu which was my original post.
It appears that cu requires you to do something about DCD.
At least short it out at the back of the plug.
Will read up on minicom over the weekend and take agetty after that.
John
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:00 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|