View Full Version : Send text file to a tcp/ip address
04-25-2005, 03:31 AM
Under Windows, I use HyperTerminal to send a text file to a specific port of a tcp/ip adress.
All the terminal software I know for Mac don't seem to allow sending a text file to a tcp/ip adress.
Can you help me ?
04-25-2005, 03:38 AM
Could you elaborate what exactly you do in Hyperterminal ?
My understanding is that it's just a serial Terminal program like ZTerm for Mac OS X.
There's also a Terminal application by that name in the Utilities folder of Mac OS X that could be useful for what you're up to.
04-25-2005, 04:21 AM
Here's a pic of what I'm doing in Hyperterminal :
We've got thermal transfer tag printer, with small print server. I recieve the data of the tags as text file from some customers. With Hyperterminal I can send these files to the print servers over tcp/ip.
Than you !
04-25-2005, 09:02 AM
The french screenshot made it very clear :rolleyes:
`telnet` is the unix equivalent of Windows hyperterminal. I don't use it much so can't help with usage, but type "man telnet (http://www.hmug.org/man/1/telnet.html")" into Google for the online manual.
04-25-2005, 10:30 AM
You can use Terminal in the /Programs/Utilities folder.
There you type in the following command:
telnet 192.168.20.100 9001
c'est pas plus compliqué que ça.
You can even bookmark that and if you want a fancier terminal, there's
04-26-2005, 08:56 AM
Thank you Voldenuit !
The problem is, I don't want to telnet 192.168.100.20 on port 9001, I want to send a text file to it ! Is it possible to send a file with telnet ?
In Hyperterminal, you can connect as shown on my screenshot yersterday and then send a file to this adress.
I've tried with the lp command with no succes for now.
04-26-2005, 09:07 AM
If you tell us what printer/printer server you have, we'll probably able to figure out how to use it via the standard CUPS (9001 is a standard port) printing system in OS X.
That would be even less cumbersome than to handle direct network connections.
Other than netcat (not part of OS X, fink or darwinports should have it), I don't have any brilliant idea how to do that in the same way you did it before.
Telnetting to the printserver, then pasting the text into the terminal window probably doesn't work ?
04-26-2005, 09:49 AM
Using 'netcat' (already mentioned by voldenuit above) would be the easiest way to send a file to a waiting server. It in fact does come as a standard part of OS X (in the BSD package).
Note that the executable is actually called 'nc': /usr/bin/nc
To use netcat:
nc server_ip_address 9001 < the_file
05-03-2005, 08:30 AM
Hayne, thank you ! It works !
I'll use it to send text files with tag descriptions to our thermal transfer tag printers. Some printers have small print servers other have serial port servers. Netcat works with both.
Thank you !
vBulletin® v3.8.7, Copyright ©2000-2014, vBulletin Solutions, Inc.