LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 10-30-2007, 07:55 AM   #1
jowa45
Member
 
Registered: Apr 2007
Location: Stockholm, Sweden
Distribution: Slackware11&12
Posts: 94

Rep: Reputation: 15
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
 
Old 10-30-2007, 08:14 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
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.
 
Old 10-30-2007, 09:07 AM   #3
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,408

Rep: Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834
I found 'minicom' to be useful to chat to a router via a serial port.
 
Old 10-30-2007, 09:55 AM   #4
jowa45
Member
 
Registered: Apr 2007
Location: Stockholm, Sweden
Distribution: Slackware11&12
Posts: 94

Original Poster
Rep: Reputation: 15
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
 
Old 10-30-2007, 04:23 PM   #5
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,408

Rep: Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834
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
 
Old 10-31-2007, 05:46 AM   #6
jowa45
Member
 
Registered: Apr 2007
Location: Stockholm, Sweden
Distribution: Slackware11&12
Posts: 94

Original Poster
Rep: Reputation: 15
All that I so far acheive with agetty is a line that states :-
Password:

Entering the root password only repeats this.

John
 
Old 10-31-2007, 08:23 AM   #7
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,408

Rep: Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834
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.
 
Old 10-31-2007, 12:29 PM   #8
jowa45
Member
 
Registered: Apr 2007
Location: Stockholm, Sweden
Distribution: Slackware11&12
Posts: 94

Original Poster
Rep: Reputation: 15
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
 
Old 10-31-2007, 01:23 PM   #9
tobyl
Member
 
Registered: Apr 2003
Location: uk
Distribution: slackware current
Posts: 743

Rep: Reputation: 50
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
 
Old 10-31-2007, 07:08 PM   #10
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,408

Rep: Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834
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.
 
Old 11-01-2007, 09:26 AM   #11
jowa45
Member
 
Registered: Apr 2007
Location: Stockholm, Sweden
Distribution: Slackware11&12
Posts: 94

Original Poster
Rep: Reputation: 15
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
 
  


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
What is the correct syntax for chcon TexanJoe Linux - Security 1 10-19-2007 04:57 AM
Correct Syntax for ethtool kaplan71 Linux - Networking 1 08-21-2007 12:30 AM
What is the correct syntax for Lame darkscot Linux - Software 2 08-14-2006 01:29 AM
correct syntax for a canonical file? rioguia Linux - Software 1 11-04-2003 02:11 AM
what is the correct syntax shanenin Linux - Software 2 10-19-2003 12:31 PM


All times are GMT -5. The time now is 04:40 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration