![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Printing 132 characters. | Tony Baratta | UNIX for Dummies Questions & Answers | 3 | 10-04-2007 11:32 AM |
| vi : inserting non-printing characters | cstovall | Shell Programming and Scripting | 2 | 08-29-2005 05:55 PM |
| lpd printing and a IP based printer on SCO | spglass | UNIX for Dummies Questions & Answers | 6 | 08-17-2005 12:19 PM |
| Printing from SCO 5.05... to XP Shared Printer | LarryG | SCO | 2 | 07-19-2005 01:26 PM |
| printing control characters | mglinsk | UNIX for Dummies Questions & Answers | 1 | 09-20-2000 05:42 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Printing 5 raw characters to a printer
Hi there,
I want to open a cash drawer remotely. The cash drawer is commanded by a printer. I need to connect to the cash drawer which is connected over a network (and shared) and simply send a sequence of five ASCII commands (see http://pages.prodigy.net/daleharris/popopen2.htm) to a printer, for the cash drawer to open. This is the sequence as indicated by the drawer opening website: 27,112,48,55,121 The printer computer uses a Windows system, and it's shared as: \\KASSI1\Skuffa where KASSI1 is the computer name on the network and Skuffa is the printer name. Please tell me if you need any more information to help me on this. I've tried the "lpr" command but it seems I didn't get it to work somehow, probably because of an error in my syntax. I haven't found any examples of UNIX-to-Windows raw network printing, and I really hope some of you wizards have some suggestions for me. Thanks a lot in advance, Friğrik |
|
||||
|
Thanks Perderabo - that makes a lot of sense.
What does not make sense to me is how to use the "lpr" command with a network. I've tried multiple variations, such as: echo '\033p07y' | lpr -P\\KASSI1\Skuffa I constantly get: lpr: error - unable to print file: client-error-not-found So what am I doing wrong? |
|
||||
|
Update
Okay, here's a little update. I was playing around and decided to actually set the printer up using Mac's little GUI. I set it up as a Generic PostScript printer, called it Skuffa, and then ran:
echo '\033p07y' | lpr -P Skuffa It, for the first time, worked! I was happy, until I found out that it had printed meters of some code, starting with the line "%!PS-Adobe-3.0". Now, I don't want that to happen again. I think my problem was making the printer into a Generic PostScript printer instead of just a Generic one. Are there any other tips you'd like me to consider about this command before I try this again? (the register that this is connected to is actually being used at the moment, but I'd really like to finish this functionality today) |
|
||||
|
Solved.
The problem was not anything about the printer setup. I wasn't using the -oraw parameter (which makes it a raw command). This is the solution then: Open drawer: echo -e "\033\160\060\067\171" | lpr -P Skuffa -oraw Receipt cutter: echo -e "\033\155" | lpr -P Skuffa -oraw Thank you for your help. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|