Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

pmworden

macrumors newbie
Original poster
Sep 9, 2007
8
0
Hello! I AM NOT a programmer but have tried to get this to work with no luck so far. I want to avoid doing this within Parallels/Vista although I've gotten that to work. Situation is that I have an old DOS estimating program still used here and someone wants to use it on a new 13-inch MacBookPro. This person is very technically challenged so jumping between Parallels and OS X would be an invitation to lots and lots of frustration. The program works except printing. I've tried editing the config file changing the "serial1=" (many variations), putting a redirect line in the config file, all to no avail. I'm thinking that "serialx" is "COMx" in the DOS program and that perhaps an Applescript that would change "cu.modem" or "Internal Modem" to a USB printer would work. As you can see, one of the problems I've had is that I really don't know the verbage that either the DOS program uses or the Mac uses to specify a device. Any takers?

More detail
Following is a snippet of the config file for Boxer (DOSBOX) where the serial port is used. From my understanding so far, DOS doesn't use Parallel (LPT) but rather Serial (COM) for printing.
________
FROM CONFIG FILE:

[serial]

serial1=dummy
serial2=dummy
serial3=disabled
serial4=disabled
# Set the type of device connected to serial port:
# disabled, dummy, modem, nullmodem, directserial.
# Additional parameters are supplied on the same line as
# parameter:value pairs. All types use the irq parameter.

# For directserial: realport (required), rxdelay (optional)
# For modem: listenport (optional)
# For nullmodem: server, rxdelay, txdelay, telnet, usedtr,
# transparent, port, inhsocket (all optional)

# Example: serial1=modem listenport:5000
_______
ALSO FROM CONFIG FILE, AREA FOR SETTING UP AN AUTOEXEC.BAT PORTION TO LOAD:

[autoexec]
# Any DOS commands you put under this heading will be executed
# when DOSBox emulation starts.
________

I've tried substituting the serial entries like this:
serial1=directserial realportap://*/Accel-a-Writer%204N/LaserWriter
serial2=directserial realportap://*/Accel-a-Writer%204N/LaserWriter
serial3=directserial realportap://*/Accel-a-Writer%204N/LaserWriter
serial4=directserial realportap://*/Accel-a-Writer%204N/LaserWriter
... where the "pap://..." is taken from the name of a printer as it is listed on the Mac in System Preferences, Print & Fax, Options & Supplies..., General tab, URL: (this printer is a networked printer, but I've tried the same method with a USB printer without success)

I've tried substuting the serial entries like this:
serial1=directserial realport:tty.Patti-1
serial2=directserial realport:tty.Patti-1
serial3=directserial realport:tty.Patti-1
serial4=directserial realport:tty.Patti-1
where the USB printer was showing up as tty.Patti-1 through a terminal device search (/dev/tty) - I read that "cu." is incoming and "tty" is the corresponding outgoing - when I typed a unique and simple name for the printer and the location in the Print & Fax menu, the default tty of "tty.modem" was replaced by "tty.Patti-1". I had already tried the default "tty.modem" and also cu.modem.

I realize all of this is not Mac programming and I think if I could use LPT1 or even COM1 in this config file anywhere and if I knew the device name the Mac had for LPT1's destination out of this, then an Applescript could redirect it to any printer. Problem is, this config file lists only "serial..." not "COM..." and no LPT whatsoever. Thanks for any input.
 

pmworden

macrumors newbie
Original poster
Sep 9, 2007
8
0
You can't just use a USB port like it was a serial port. That won't work.

Thank you. FYI, I started with this information:
http://vogons.zetafleet.com/viewtopic.php?t=19216&sid=af48987df0122ce6ce45f50091a69bebe

where the final resolution for this user was a line in the config file as:
serial1-directserial realport:tty.usbserial

...where his usb serial adaptor was /dev/tty.usbserial

sounds then like I would need an adaptor then identify the name given to the adaptor by the Mac OS by using /dev/tty in terminal, yes?

Also, the DOS program does list LPT1 as an option for printing which was the selection that worked through Parallels/Vista, but I have no idea how to tell the DOS program what port to use - what it's called by the Mac - and how to put that in a config file for the DOS program in order to get a printout when choosing LPT1.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
That will work as the USBSeriel driver that goes with the adaptor will accept the standard old-school seriel commands, pump them over the USB bus and the adaptor converts them back.

LPT1 is the parallel port normally?
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
Yes. LPT 1 and 2 are both available and are parallel ports.

Yes, but unless you are on an ancient Mac you don't have any real parallel ports. So again you'd need some sort of adaptor. I've seen (and have somewhere) a USB->Seriel adaptor. I've never seen a USB->Parallel one.
 

pmworden

macrumors newbie
Original poster
Sep 9, 2007
8
0
Yes, but unless you are on an ancient Mac you don't have any real parallel ports. So again you'd need some sort of adaptor. I've seen (and have somewhere) a USB->Seriel adaptor. I've never seen a USB->Parallel one.

I took so long to answer it logged me out. I found a USB to serial adaptor and that looks like the answer. But I still think it's strange. Does plugging in the adaptor change the way the Mac uses the USB or does the "translation" to serial happen after the output hits the adaptor? Here's why I ask: It seems odd that I would type in a line in the config file that in effect redirects the serial output from the DOS program to the USB port in the Mac but then have to use the cable to "translate" it back to serial and then also be sure that the USB printer has a serial connector, which might be tough to find one that has serial. Also seems odd since within Windows, I can use a program that makes serial output work to USB. Weird. So should I assume that if serial is going out from the DOS program the USB would only be able to pass it through as something intelligible if it "translates" it (or keeps it as-is) via a serial adaptor?
 

pmworden

macrumors newbie
Original poster
Sep 9, 2007
8
0
I found a Keyspan USB to 2-port serial adaptor and the driver for it, unfortunately a USB printer that I've been using to test is USB only. I'll look through some old stuff and see if I can locate a desktop serial printer. Thanks so much for the help!
 

idelovski

macrumors regular
Sep 11, 2008
235
0
I have some experience with Keyspan adapters. My software uses them to print on POS (Receipt) printers.

You can try with this name: "/dev/tty.USA19QW5b14P1.1", but I think they are changing this from version to version. My software uses some code to search for available serial ports, but you said you're not a programmer. Maybe there's some utility that can help you.
 

pmworden

macrumors newbie
Original poster
Sep 9, 2007
8
0
I'll hookup the Keyspan that I found, "USA-28" and install the driver, then check terminal to see what "tty" listing it is, then I'll put that in the config file - maybe it will work. Thanks for the information - every bit helps!

Also, I downloaded the current driver today and believe I have an old printer that's still serial at home; enough for a smoke test.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.