LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-24-2009, 02:08 AM   #1
Dumb.Coder
LQ Newbie
 
Registered: Feb 2009
Posts: 10

Rep: Reputation: 1
Unhappy Virtual Null Modem or pseudo terminal b2b connection


Hi,

I am trying to write 2 applications in C# (MONO) which communicate over serial port. For debugging purposes, I need back to back serial port connection simulator. On windows box I have used com0com, which basically creates pairs of virtual COM ports, each of which is virtually connected back 2 back (Rx of one is Tx of other and vice versa). I don't need other properties of serial port(RS232) e.g. DTE/DTR, CTS/RTS etc etc. All I need is to be able set Baud-Rate, Data-Bits, Parity-Bit to 9600,N,8,1 (It may or may not change the communication parameters, it is of no concern, I just need to be able to set them, so that the same code can work on actual serial ports).

I have googled for this, searched forums also and it seems that pseudo terminals can be used for this. But as I am quite new to Linux world and have just started 10-12 days back , I will need some help from you people.

Can you please help me in setting up pseudo terminal connections or let me know if some other technique exists, which can be helpful in my case. I am using OpenSUSE 11.1 and have a laptop with no serial port . Also using a USB-serial converter is not possible for me.

TIA,
Dumb.Coder
 
Old 02-24-2009, 03:32 AM   #2
brianmcgee
Member
 
Registered: Jun 2007
Location: Munich, Germany
Distribution: RHEL, CentOS, Fedora, SLES (...)
Posts: 399

Rep: Reputation: 38
Maybe this tutorial is of use for you:

http://darebux.blogspot.com/2007/12/...rial-port.html
 
Old 02-24-2009, 06:34 AM   #3
Dumb.Coder
LQ Newbie
 
Registered: Feb 2009
Posts: 10

Original Poster
Rep: Reputation: 1
Unhappy

Hi Brian,

I tried installing the VSPD in my OpenSUSE 11.1 box. First it was failing to compile saying, it could not found /usr/src/linux-2.6.27.7-9-pae, so i created a symbolic link to the directory /usr/src/linux-2.6.27-9. After that here is the output from running install.sh from vspd extracted directory...

OpenSUSE11:/usr/local/vspd-1.39-dist # ./install.sh /usr/local/vspd/
installing to /usr/local/vspd/
creating cache ./config.cache
checking for target KERNEL... ok
checking for target KERNEL name... linux
checking for target KERNEL version... 2.6.27.7-9-pae
checking for target KERNEL subversion... 2.6
checking for target KERNEL path... /usr/src/linux-2.6.27.7-9-pae
checking for target MAKE_ARGS... make "-C /usr/src/linux-2.6.27.7-9-pae SUBDIRS=$PWD modules"
checking for DEVFS... checking for UDEV... ok
********************* checking for required programms ******************
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for install... /usr/bin/install
checking for cp... /bin/cp
****************** checking for required header files ******************
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for ctype.h... yes
*********************** checking for functions *************************
checking for strerror... yes
************************ current settings ******************************
CC: gcc
CXX version: gcc (SUSE Linux) 4.3.2 [gcc-4_3-branch revision 141291]
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
CXXFLAGS:
EXTRA_DEFINES:
EXTRA_SOURCES:
Using kernel: linux
Using kernel version: 2.6.27.7-9-pae
Using kernel subversion: 2.6
********************** making config.h and Makefile ********************
updating cache ./config.cache
creating ./config.status
creating lib/src/_makewrapper
creating lib/src/Makefile
creating lib/src/linux/Makefile-2.6
creating ./bin/vspd.sh
creating ./bin/vspm.sh
creating ./etc/vspd.conf
compiling the vspm kernel module ...
make: Entering directory `/usr/src/linux-2.6.27.7-9'

WARNING: Symbol version dump /usr/src/linux-2.6.27.7-9/Module.symvers
is missing; modules will have no dependencies and modversions.

CC [M] /usr/local/vspd-1.39-dist/lib/src/vspm.o
In file included from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /usr/local/vspd-1.39-dist/lib/src/sysheaders.h:13,
from /usr/local/vspd-1.39-dist/lib/src/vspm.c:1:
include/linux/mmzone.h:18:26: error: linux/bounds.h: No such file or directory
include/linux/mmzone.h:197:5: warning: "MAX_NR_ZONES" is not defined
In file included from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /usr/local/vspd-1.39-dist/lib/src/sysheaders.h:13,
from /usr/local/vspd-1.39-dist/lib/src/vspm.c:1:
include/linux/mmzone.h:221: error: ‘MAX_NR_ZONES’ undeclared here (not in a function)
In file included from /usr/local/vspd-1.39-dist/lib/src/vspm.c:4:
/usr/local/vspd-1.39-dist/lib/src/vspm.h: In function ‘vsp_unregister’:
/usr/local/vspd-1.39-dist/lib/src/vspm.h:279: warning: overflow in implicit constant conversion
/usr/local/vspd-1.39-dist/lib/src/vspm.h: In function ‘vsp_register’:
/usr/local/vspd-1.39-dist/lib/src/vspm.h:292: warning: overflow in implicit constant conversion
/usr/local/vspd-1.39-dist/lib/src/vspm.h: In function ‘vsp_register_dev’:
/usr/local/vspd-1.39-dist/lib/src/vspm.h:414: warning: overflow in implicit constant conversion
make[1]: *** [/usr/local/vspd-1.39-dist/lib/src/vspm.o] Error 1
make: *** [_module_/usr/local/vspd-1.39-dist/lib/src] Error 2
make: Leaving directory `/usr/src/linux-2.6.27.7-9'
compilation failed, please see ./README for details

--------------------------

Please help me further to compile and install the VSPD drivers.

TIA,
Dumb.Coder

-------------------
Quote:
Originally Posted by brianmcgee View Post
Maybe this tutorial is of use for you:

http://darebux.blogspot.com/2007/12/...rial-port.html
 
Old 03-04-2009, 04:14 AM   #4
Dumb.Coder
LQ Newbie
 
Registered: Feb 2009
Posts: 10

Original Poster
Rep: Reputation: 1
Hi,

Even after all kind of gymnastics, I was unable to install a virtual null modem on Linux . Anyways, here virtual machine came to the rescue . Here are the steps in case somebody else needs the same thing.

1. I installed com0com virtual null modem drivers on my windows box.
2. Installed Linux in virtual machine (VMWare).
3. In hardware configuration for guest OS, I mapped one of the serial port from the pair of virtual null modem to /dev/ttyS0.
4. Now, I can use /dev/ttyS0 in my linux vm, and at other end (on windows host) I can run my hw simulator application.


Hope this helps anybody needing the same thing.

Regards,
Dumb.Coder
 
Old 09-13-2010, 01:55 AM   #5
eeffrr
LQ Newbie
 
Registered: Sep 2010
Posts: 1

Rep: Reputation: 0
I've got some problems about pseudo terminal b2b connection too.

Last edited by eeffrr; 10-23-2010 at 06:03 AM.
 
  


Reply

Tags
modem, null, pseudo, terminal, virtual


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
Pseudo-Terminal means? Marty21 Linux - Software 1 01-28-2009 03:53 PM
Virtual Null Modem for Linux adriangolding Linux - Software 13 12-28-2008 01:39 PM
Null modem serial connection problem adriangolding Linux - Hardware 2 12-11-2008 10:20 AM
Pseudo Terminal Problem gabsik Linux - Software 8 07-25-2008 06:00 AM
null modem cable connection PC-PC Boiler_Mafiot Linux - Software 2 04-12-2005 02:51 AM


All times are GMT -5. The time now is 05:06 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration