Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using VB and modems for file transfers 1

Status
Not open for further replies.

progolf069

Programmer
Jun 13, 2001
37
0
0
US
Greetings techies,

Have a good question to make you all think! Here is my issue: I have 7 PC's in remote locations that I need to send and receive files from all in one connection. I know you can set the MSComm control up to dial your modem on the local machine, and set the MSComm control up on the other machine, to answer the local machines call. But once I get a clean connection estabished, how can I start sending and receiving files, without purchasing an outside program module? I know that there is programs like PDQ, and SAX, but I would like to try and code around the outside applications. Does anybody know of a way to allow this to occur?

Our current application uses PDQ to send and receive files, but we are only able to use one type of modem, and you can't purchase it anymore. So, we need to redevelop this application, but I would like to get away from outside applications if at all possible. The way our current system is set up is like this: The program reads a text file with a list of files to send from the local machine to the remote machine, and then reads a list of files to get from the remote machine, to send to the local machine. After this processing is done, the two modems disconnect from each other.

Any support or feedback I can get with this issue would be greatly appreciated. An early thank you goes out to thoes who reply with a thread!

Signed,
Ian Wickline
K's Merchandise, Inc.
 
It seems that few people work at this low a level these days. They'd probably set up the remote computers as remote access dialins accepting PPP connections, and the same (dialout) at the central machine.

Then they'd FTP the files from the central machine to FTP servers running on the remote machines.

You could still do what you have described but there isn't any standard XModem control or whatever that I am aware of. This leaves you with writing a lot of code, finding sample code somewhere, or using a 3rd party custom control - and you say you don't want to use 3rd party software, right?
 
I sort of hated my previous answer, so I did a little hunting.

I dug through every site I could find loking for source code for XModem, YModem, or a similar serial-port file transfer protocol. Nada. I even found some sites with "legacy" stuff from software CDs they put out a hundred years ago (well, maybe 5 or 10). Still nothing, though I found some "get you started" sample code in weird obsolete DOS Basics of various flavors and some old Pascal versions.

Nothing usable though.

There is an OCX out there you can use:


But you wanted something that didn't use a 3rd-party component or package. I understand, you want this to live for a few years, unlike your current solution.

Well, I found out this guy gives away the source to his OCX in his $30 book, available from:


Go there, read this stuff (which may tell you that you'll want the book anyway - tons of stuff about using VB's MSComm Control), then click "Product Index" at the top of the page, then click "Books," then click "VBPG" to get to the page where you can order the book.

You might check elsewhere (Amazon?) for it at a discount price if you're as cheap as me.


This guy is a dinosaur, almost nobody writes serial-port file transfer stuff anymore except a couple gnomes who make LapLink/PCAnywhere-type stuff. I'd say grab it while it is in print.

I've used his "PC Pocket Ref" for years (hmm - I need a new edition come to think of it) and it is a quality publication. Can't tell if the source is on a CD included with the book or not, but this might be the last lead you'll find if you want to stick to this mode of communication.

... or you can go the PPP route. Probably a few threads here about doing just that.
 
Oops, this Grier isn't the "Pocket PC Ref" author, the web site just sells both books. So you're on your own.

Good luck!
 
I'm not sure if i understand you right but ...

If you can establish a right connection what's keeping your application (The server side) to signal the other application (Client side) that a transaction will start.

SYMBOLIC HANDSHAKING ...

Server > Client
"Requesting clearence to send file"
Client > Server
"Clearence granted"
Server > Client
"Filename is FILENAME.EXT"
Client > Server
"OK"
Server > Client
"Size is xxxxx Bytes"
Client > Server
"OK"
Server > Client
"Directory to be stored is C:\COMPANY\FILES\"
Client > Server
"OK"
Server > Client
"I'm ready to send the file, just say when ..."
Client > Server
"I'm ready to catch the file, GO !!!!"
Server > Client
..............................
Client > Server
..............................
Server > Client
"FINISHED"
Client > Server
"I'm finished too."
Server > Client
"BYE"
Client > Server
"See you later"

END TRANS ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top