Tiny Core Base > TCB Q&A Forum
Redirect TCP to parallel port
wonderfulll:
Is there any way to redirect data from tcp port to parallel port?
bmarkus:
--- Quote from: wonderfulll on June 09, 2010, 02:19:35 AM ---Is there any way to redirect data from tcp port to parallel port?
--- End quote ---
For what purpose?
curaga:
I've done that ;)
I had a laplink connection to an older laptop, and NAT'ed internet through that. Is this what you mean?
If not, for raw redirection you can use bash or netcat (can't remember the syntax for either, but something like ncat tcp:444 > /dev/lp0/parport0)
wonderfulll:
--- Quote from: bmarkus on June 09, 2010, 02:25:14 AM ---
--- Quote from: wonderfulll on June 09, 2010, 02:19:35 AM ---Is there any way to redirect data from tcp port to parallel port?
--- End quote ---
For what purpose?
--- End quote ---
to send data to thermal printer
danielibarnes:
Tiny Core has the socat.tcz extension which will probably work. There is a man page with more information. In your case, this should work:
sudo modprobe lp
socat -u TCP4-LISTEN:44444,reuseaddr,fork OPEN:/dev/lp0
If you are sending binary data (rather than just text) to the printer, you will need raw access to the parallel port via /dev/parport0. This driver is not part of the base, so you must compile the ppdev module yourself from the Linux kernel source. Perhaps we need a ppdev.tcz extension. :)
Navigation
[0] Message Index
[#] Next page
Go to full version