LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-05-2007, 02:35 PM   #1
bored_coder_ca
LQ Newbie
 
Registered: May 2007
Posts: 2

Rep: Reputation: 0
IP to RS232 bridging software


hi,

Does anyone know some bridging software available (free or not) that allows me to bind a serial port (RS 232) to a tcp/ip port on my local machine. The idea is that i will be able to control a modem/PBX from another computer.

thanks,
 
Old 05-05-2007, 04:36 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
I use ttywatch; it's available pre-packaged from many distributions. You can even script it with TCL/Expect. For example, I have a modem on the port, and I use this to initialize it for CallerID:

Code:
#!/usr/bin/expect

#----------------
# Assume no error
#----------------
set error 0

#---------------------
# Connect to the modem
#---------------------
spawn -noecho /usr/kerberos/bin/telnet localhost 1234

#---------------------------------------
# Make sure the modem is ready for input
#---------------------------------------
after 1000
send "at\r"
after 1000
send "at\r"
after 1000

#-------------------------------
# Send the initialization string
#-------------------------------
expect {
   "OK" {
      after 1000
      send AT&FE1V1Q0+VIP\r
   }
   timeout {
      set error 1
   }
}

#----------------
# Enable callerID
#----------------
expect {
   "OK" {
      after 1000
      send AT+VCID=1\r
   }
   timeout {
      set error 1
   }
}

#---------
# All done
#---------
expect {
   "OK" {
      after 1000
      exit
   }
   timeout {
      set error 1
   }
}

#--------------------
# Did an error occur?
#--------------------
if {$error == 1} {
   catch {exec /usr/bin/logger -t initCallerID.info "Error initializing modem for callerID" &}
}

exit

Last edited by macemoneta; 05-05-2007 at 04:38 PM.
 
Old 05-07-2007, 09:43 AM   #3
bored_coder_ca
LQ Newbie
 
Registered: May 2007
Posts: 2

Original Poster
Rep: Reputation: 0
that seems perfect, thanks for the help
 
  


Reply



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
minicom@rs232 kingraja84 Programming 7 03-10-2012 09:05 AM
Bridging+Bonding for Bridging+HA+Load Balancing? kartheekpn Linux - Networking 0 08-13-2006 02:08 AM
configuring bridging software bharathvn Linux - Networking 3 02-19-2006 08:56 PM
USB>RS232 versus PCMCIA>RS232 jayhel Linux - Laptop and Netbook 2 08-04-2005 06:09 PM
using rs232 with linux ams Linux - Networking 1 02-26-2005 05:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:55 PM.

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
Open Source Consulting | Domain Registration