Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
URGENT: Transfer a file from linux to win95 via com1 or lpt1
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
khermans
n00b
n00b


Joined: 03 Aug 2004
Posts: 57

PostPosted: Sat Aug 07, 2004 8:56 pm    Post subject: URGENT: Transfer a file from linux to win95 via com1 or lpt1 Reply with quote

I am trying to get a file onto an old semi-corrupted install of win 95 on an old toshiba 620ct laptop which has:

- NO CDROM
- NO FLOPPY
- NO ETHERNET

but does have:

+ Keyboard
+ Serial port
+ Parallel port
+ PCMCIA (but no drivers for anything i try to plug in on win 95)

I am wondering if there is some way to transfer files with the available forms of input so that I can further get an external backpack cdrom driver working or the PCMCIA ethernet adapter (i have no driver on win 95 by default). I have successfully tested between two other laptops with floppies a transfer over paraller ports using LPTDOS, which sets up a client/server to transfer files over LPT ports. Can some old school linux/dos/win95 experts help me out here? Any suggestions? This is kind of urgent...

Kristian Hermansen

PS - I am trying to prevent myself from typing into windows 95 dos debug command all the hex data from LPTDOS.EXE, about 16,000 or 8,000 bytes if packed with UPX ;-) I have tried "cat foo > /dev/lp0" and "cat foo /de/ttyS0", but the real problem is getting Windows 95 to accept any input and get it out to file. If there is a way to "poison" the win 95 / dos memory that will work too, and then I can dump it to disk with the debug write command...thanks
_________________
~ Do the rubberman...do the rubberman...do the rubberman ~
Back to top
View user's profile Send private message
papal_authority
Veteran
Veteran


Joined: 31 Mar 2004
Posts: 1823
Location: Canada

PostPosted: Sat Aug 07, 2004 9:04 pm    Post subject: Reply with quote

I think I used HyperTerm (or something like it) years ago to transfer a file to SunOS. Can't you just take out the windows HD and mount it in your Linux box temporarily though?
_________________
The free market gave me gonorrhea.
Back to top
View user's profile Send private message
khermans
n00b
n00b


Joined: 03 Aug 2004
Posts: 57

PostPosted: Sat Aug 07, 2004 9:18 pm    Post subject: Reply with quote

papal_authority wrote:
I think I used HyperTerm (or something like it) years ago to transfer a file to SunOS. Can't you just take out the windows HD and mount it in your Linux box temporarily though?


hahahah...this is a laptop so I can't have two devices in at the same time :-P I have anothe laptop, but if I try to put in the windows 95 harddrive into this other laptop, i can say quite surely that the OS wont boot and end in BSOD since there are no drivers for this laptop in the win 95 drive...good try though - i thought of that a while ago. If this was a desktop, that wouldn't be a problem...

Kristian Hermansen
_________________
~ Do the rubberman...do the rubberman...do the rubberman ~
Back to top
View user's profile Send private message
kpack
Tux's lil' helper
Tux's lil' helper


Joined: 29 Mar 2004
Posts: 137

PostPosted: Sat Aug 07, 2004 10:13 pm    Post subject: Reply with quote

You should be able to create a PPP connection. See the following link:

http://www.linuxgazette.com/issue41/smyth.html
Back to top
View user's profile Send private message
khermans
n00b
n00b


Joined: 03 Aug 2004
Posts: 57

PostPosted: Mon Aug 09, 2004 8:45 pm    Post subject: Reply with quote

I am running latest Gentoo and 2.6.7 kernel and can't seem to locate the getty program anywhere. I see mgetty and other variants in portage, but I can't get them set up correcty to work with this setup! I am still lost andneed some help on this if anyone could lend a hand. I also have Windows machine to setup a connection so if anyone could figure out how to transfer files that way would be great. I can't use DIRECT CABLE CONNECTION since it is not installed already on the win 95 laptop and ther eis no way to input data to the klaptop :-( Any more suggestions? ctty com1 worked and I can now execute commands on the win95 system while in a terminal emulator from windows xp. This doesn't allow me to send binary files though...really could use some suggestions!!!

Kristian Hermansen
_________________
~ Do the rubberman...do the rubberman...do the rubberman ~
Back to top
View user's profile Send private message
nobspangle
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1318
Location: Manchester, UK

PostPosted: Mon Aug 09, 2004 9:23 pm    Post subject: Reply with quote

hyperterminal has a "receive file" option, you might be able to use kermit to connect the two machines.
Back to top
View user's profile Send private message
khermans
n00b
n00b


Joined: 03 Aug 2004
Posts: 57

PostPosted: Tue Aug 10, 2004 3:40 pm    Post subject: Reply with quote

nobspangle wrote:
hyperterminal has a "receive file" option, you might be able to use kermit to connect the two machines.


Hehehe...Windows 95 version doesn't support that feature :-) But noce try! I am almost about to give up. I managed to use "ctty com1" and "copy com1 foo.exe", but the resultant files get obliterated due to transmission corruption. Also when do this, one needs to remove all or convert the CTRL-Z (hex 1A) characters and add one at the very end to allow the transmission to even occur and be written to disk, otherwise you get premature EOF writes to disk or nothing at all...I'm still playing with it to see if there is anything I can do...

Kristian Hermansen
_________________
~ Do the rubberman...do the rubberman...do the rubberman ~
Back to top
View user's profile Send private message
pactoo
Guru
Guru


Joined: 18 Jul 2004
Posts: 553

PostPosted: Tue Aug 10, 2004 8:08 pm    Post subject: Reply with quote

Maybe the net-misc/lrzsz port will do. There are a couple of free (beer) x/y/z-modem Clients for windows floating around.

Rumors are, that even minicom can transfer files, but never tested it and I do not know the requirements on the windows side of things.
Back to top
View user's profile Send private message
khermans
n00b
n00b


Joined: 03 Aug 2004
Posts: 57

PostPosted: Tue Aug 10, 2004 8:25 pm    Post subject: Reply with quote

I tried to set up the ppp server on Linux, but getty is not around anymore and was replaced by mgetty and other variants. The problem is that with the link toward the top about ppp and linux setup, the same config options don't apply and anything I have tried to hack together w/ mgetty have failed :-( Working with what I have on the 95 machine, I tried the DOS debug command to output/input bytes over a port, but that does not seem to work. It seems that it should be possible to grab some short snippets of assembly code that opens a port on com1 and accepts binary data and outputs it to a file with some sort of CRC checking to prevent the corruption, but it needs to be really small to mitigate the problems and hopefully it could then be assembled using the DOS debug command and executed/written to disk. I have taken intro level assembly programmign and love it, but I never did any type of networking with it :-( Could someone point me in the right direction to possible code snippets to make this happen?

Kristian Hermansen
_________________
~ Do the rubberman...do the rubberman...do the rubberman ~
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 55308
Location: 56N 3W

PostPosted: Tue Aug 10, 2004 8:47 pm    Post subject: Reply with quote

khermans,

First, get a serial link going both ways between the PCs involved. You will need hardware handshaking - a null modem cable should provide all the connectivity you need.
Experiment with speed - 9,600 baud will be OK - I hope its a small file. DOS will drop characters above this rate.
Since it appears you are trying to send a binary file, you need to encode it to send it as ASCII. Use UUencode at the transmitting end and UUdecode at the receving end. You may need to run the encoding and decoding steps as pre and post processing steps.

At the receiving end, in a DOS box, type com1: > UUenc.txt to save the incoming file. At the tramsmitting end, send the UUencoded file to the serial port. When the file has gone, send another 8kb or so of text rubbish. This is to ensure the end of the transmitted file is written to disc before you manually break the connection.

At the receiving end, hit Ctrl-C. This terminates the receiver without flushing buffers to disc, hence the requirement for the rubbish. The rubbish needs to be at least the disc cluster size on the receiving machine. If UUdecode complains that the end of the file is missing, send it all again and double the size of the rubbish, up to a max of 32kb

Now decode the file. I'm sure Win95 has can do UUdecoding without further help. Try a mail application - it was a popular way to send 8 bit stuff over a 7 bit channel at one time. the rubbish at the end of the file will be ignored by UUdecode.

Practice with a small file.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
hardcore
l33t
l33t


Joined: 01 Nov 2003
Posts: 626
Location: MSU, MI

PostPosted: Wed Aug 11, 2004 7:31 am    Post subject: Reply with quote

Do you have access to a desktop computer? If so you can get a laptop to IDE converter. Mount the laptop drive on your desktop, and problem solved.
Back to top
View user's profile Send private message
khermans
n00b
n00b


Joined: 03 Aug 2004
Posts: 57

PostPosted: Wed Aug 11, 2004 4:48 pm    Post subject: Reply with quote

hardcore wrote:
Do you have access to a desktop computer? If so you can get a laptop to IDE converter. Mount the laptop drive on your desktop, and problem solved.


Yes I thought about that. hehehe...although I wasn't sure that they even made laptop to IDE converters! I took the whole laptop apart (almost broke it in the process) only to realize that I did not have such a converter :-( I am going to google for one right now, but post a link if you know where to find them on the cheap!!! Newegg???

Kristian Hermansen
_________________
~ Do the rubberman...do the rubberman...do the rubberman ~
Back to top
View user's profile Send private message
hardcore
l33t
l33t


Joined: 01 Nov 2003
Posts: 626
Location: MSU, MI

PostPosted: Wed Aug 11, 2004 8:05 pm    Post subject: Reply with quote

khermans wrote:

Yes I thought about that. hehehe...although I wasn't sure that they even made laptop to IDE converters! I took the whole laptop apart (almost broke it in the process) only to realize that I did not have such a converter :-( I am going to google for one right now, but post a link if you know where to find them on the cheap!!! Newegg???

Kristian Hermansen


I think they even sell them at Radioshack. Lemme look around real quick like.
Back to top
View user's profile Send private message
hardcore
l33t
l33t


Joined: 01 Nov 2003
Posts: 626
Location: MSU, MI

PostPosted: Wed Aug 11, 2004 8:28 pm    Post subject: Reply with quote

Well I can't find them at either Radioshack or Newegg. Newegg has USB to Serial and USB to parallel converters.

Wait I found one at TigerDirect, here's the link, only $10 ;)

http://www.tigerdirect.com/applications/SearchTools/item-details.asp?EdpNo=244974&Tab=11&NoMapp=0
Back to top
View user's profile Send private message
tatesworld
n00b
n00b


Joined: 25 Oct 2003
Posts: 67

PostPosted: Wed Aug 11, 2004 9:10 pm    Post subject: Reply with quote

did you try what NeddySeagoon suggested,

if you have qbasic.exe or gwbasic installed in windows 95

hand type in uudecode.bas (serach in google, its on simtel net) to create uudecode.com to decode

or alternately if you have debug.exe somewhere to get uudecode binary
search for a file uudecode.dbg (also on simtel net) and hand type in debug.
Back to top
View user's profile Send private message
khermans
n00b
n00b


Joined: 03 Aug 2004
Posts: 57

PostPosted: Wed Aug 11, 2004 11:12 pm    Post subject: Reply with quote

tatesworld wrote:
did you try what NeddySeagoon suggested,

if you have qbasic.exe or gwbasic installed in windows 95

hand type in uudecode.bas (serach in google, its on simtel net) to create uudecode.com to decode

or alternately if you have debug.exe somewhere to get uudecode binary
search for a file uudecode.dbg (also on simtel net) and hand type in debug.


Yeah I found the basic conversion stuff, about 75 lines of code only, not bad :-) Now I don't get to see the laptop again until this weekend, but I will keep you posted on what happens. My only concern is that the Win 95 laptop may have an OEM Windows 95 OS version installed which lacks QBASIC :-( I will find out soon enough...I am going insane!

BTW, I found a laptop ---> IDE cable converter for $4.50 on Amazon.com used! It should take a little while before it gets here though, and if I end up not needing it immediately, well I'll probably need it sometime in the future on other frustrating time-consuming projects...

Kristian Hermansen
_________________
~ Do the rubberman...do the rubberman...do the rubberman ~
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum