LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-25-2003, 04:40 AM   #1
tomascebrian
LQ Newbie
 
Registered: Sep 2003
Location: spain
Distribution: suse and debian
Posts: 1

Rep: Reputation: 0
Unhappy A laptop, a pc, a serial null cable modem, ppp, and perl


Hello, everyone.

I have been searching for a solution to my problem through lots of forums and resources before I write this post, but this is my last chance to solve it. I tell you:

I have connected a pc with a laptop via a serial null cable modem, following the instructions provided in a howto I found, with the ppp protocol. Even I can get a connection to internet in the laptop through the pc, as in a LAN. Then I wrote a little program in Perl, that uses IO::Socket::INET, for transferring data from one computer to another. The pc works as server and the laptop as client. The goal of the program is control the pc from the laptop sending and receiving data from this one to the other, navigate through server directories and import/export files between the two machines giving orders from the laptop. I have tested the program in a real LAN with two pc's working with windows 95 and 98, ethernet cards and ActivePerl 5.8 and it works fine. The pc's are a Pentium II at 233 Mhz and 128 Mgs and a Pentium III at 800 Mhz and 256 Mgs. The problem I have is:

For trasferring a file from the server to the client, I divide the file into little parts, and I put them on an array. Then I send this parts with
$Socket->send($part); And in the client I do $Socket->recv($part,1024). When all the parts are received, I group and write them into the new file.
It works in a terminal. Well, when I'm receiving data and I open another terminal for execute anything else, or when the screen of the laptop gets off (I don't know if it's well explained, my english is a little poor yet), then the conexion halts. No messages, no errors are displayed, and I have put some signals and outputs to locate the problem. No nothing. Just the transfer stops in both the server and the client. I have included alarms so if in a few seconds one of them doesn't receive anything, the program halts. But it doesn´t. However in the real LAN I opened such programs as I wanted, and the transfer continues.

The laptop is a Toshiba CDT460 with a Pentium 166 Mhz processor, 96 Mgs Ram, and the pc is a PentiumIII 666 Mhz 256 Mgs Ram. To avoid the difference of speed I used semaphores in the program, so the pc does not send nothing if the laptop have not finished of receiving and gives the order of continuing. I have SuSE linux 7.3 installed in the laptop and Debian 3.0 in the pc, and the Perl version installed in both is 5.8, maybe it should be useful.

Well, thanks to all for read this bible, and excuse my english!
 
  


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
Null modem cable question msills Linux - Hardware 1 11-09-2005 06:15 PM
null modem cable connection PC-PC Boiler_Mafiot Linux - Software 2 04-12-2005 01:51 AM
PPP over null modem haxcess Linux - Networking 1 01-25-2005 05:01 PM
Question about null modem cable Luke727 Linux - Hardware 5 05-29-2004 07:05 PM
serial communication - null modem cable sg3 Linux - Networking 3 07-17-2003 06:08 AM

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

All times are GMT -5. The time now is 10:21 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
Open Source Consulting | Domain Registration