The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > Linux > Ubuntu
.
google unix.com



Ubuntu Ubuntu is a complete desktop Linux operating system, freely available with both community and professional support.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Redirect an application with a Serial connection Sunb3 SUN Solaris 7 12-24-2008 03:40 PM
Device serial number noratx Linux 2 11-19-2008 01:54 PM
Pro Application Replacement Serial Numbers iBot OS X Support RSS 0 10-31-2008 05:50 PM
Accessing device with Prolific USB-serial controller. monkeybiz High Level Programming 1 06-11-2007 04:20 PM
serial port device path tyskertøs UNIX for Dummies Questions & Answers 6 08-05-2004 11:22 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-08-2009
mvona mvona is offline
Registered User
  
 

Join Date: Oct 2009
Location: California
Posts: 3
Red face Ubuntu 9.04 Serial application to telnet to serial device

Hello!

I am working on an application which reads environmental instruments which have serial ports. The application requires a serial port to be present to talk to the device (i.e. /dev/ttyS0 ). In some instances the environmental devices will be 100's of yards away from the computer, so a serial cable becomes a liability. In these scenarios we would like to use a multi-port terminal server which serves up multiple serial connections via telnet.

I have almost solved the problem...but need some help finishing. DETAILS:
The configuration we have is:

Computer/Ubuntu 9.04 --> Ethernet ----> Telnet Based Serial Device Server --> Serial Device

I have run remserial and am able to interact with the serial device using socat or netcat from the terminal. However, SJINN as with as other serial port viewers are unable to connect to the generated pseudo serial port. I get an error about ioctrl.

DETAILED STEPS I FOLLWED:

1) Create a file in /dev called “remserial1” and chmod this to 777.

2) Run
Code:
./remserial -d -r XXX.XXX.XXX.XXX -p 10001 -l /dev/remserial1 /dev/ptmx &
3) When I do the following command
Code:
socat - /dev/remserial1,raw,crnl &
I can interact with the serial device as if I had a serial connection to it.

The Issue: When I use a normal serial viewer (in this case SJINN or Serial Port Terminal gtkterm) with gtkterm I get “Control signals read: Invalid argument”. With SJINN I get an error involving ioctrl.

I believe that it has to do with trying to read a pseudo terminal, but am at my wits end , any advice would be appreciated. Also, before linking netcat or socat examples, please remember that an application on the computer must speak with a serial port, which is then relayed over telnet and back to a serial device without buying some serial port redirector package.
  #2 (permalink)  
Old 10-09-2009
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,928
Code:
1) Create a file in /dev called “remserial1” and chmod this to 777.
What is this file? How do you create it?

I might try putty's serial device option in raw mode.
  #3 (permalink)  
Old 10-12-2009
mvona mvona is offline
Registered User
  
 

Join Date: Oct 2009
Location: California
Posts: 3
I used some command like
Code:
echo " " > /dev/remserial1; chmod 777 remserial1
I use PuTTy allot. I will try the raw mode. I do know that the pseudo terminal is in raw mode, maybe that's the ticket. Will write back when I try.

Quote:
Originally Posted by Corona688 View Post
Code:
1) Create a file in /dev called “remserial1” and chmod this to 777.
What is this file? How do you create it?

I might try putty's serial device option in raw mode.
  #4 (permalink)  
Old 10-13-2009
mvona mvona is offline
Registered User
  
 

Join Date: Oct 2009
Location: California
Posts: 3
Putty in raw mode dosen't do it. I can use screen /dev/remserial1 and that works fine. I think I need to specify the baud rate and comm settings of the virtual device.
  #5 (permalink)  
Old 10-13-2009
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,928
Quote:
Originally Posted by mvona View Post
Putty in raw mode dosen't do it.
What does it do, exactly?

Quote:
I can use screen /dev/remserial1 and that works fine. I think I need to specify the baud rate and comm settings of the virtual device.
Sounds like setting the baud rate is what these serial programs are failing on... it's not acting like a serial port, it's acting like a virtual terminal. A terminal emulator that insists on a real serial port might never accept it.

---------- Post updated at 02:34 PM ---------- Previous update was at 02:26 PM ----------

Quote:
Originally Posted by mvona View Post
I used some command like
Code:
echo " " > /dev/remserial1; chmod 777 remserial1
That's a very odd way to create a device file... Have you tried not doing this and just letting remserial create the device itself?
  #6 (permalink)  
Old 3 Weeks Ago
nangus nangus is offline
Registered User
  
 

Join Date: Oct 2009
Posts: 2
I thought that you needed a fifo file for simultating serial communication? You should try something along the lines of:
Code:
mkfifo /dev/remserial1
Sponsored Links
Reply

Bookmarks

Tags
pseudo terminal, remserial, serial connection, telnet

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate 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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:51 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0