LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-31-2006, 11:35 PM   #1
pddm
Member
 
Registered: Sep 2005
Distribution: Mint 19.2
Posts: 112

Rep: Reputation: 15
Serial Printing Problem in Wine


I have been fighting with this Problem for weeks and I finally think I found something ...

I am trying to make a Winblows POS Software work in Wine, which uses direct serial printing to send the invoice out to an Epson TM-U200A or TM-U220A Serial Printer connected to /dev/ttyS00.

I tried with almost every version of wine from 0.9.8 to 0.9.17, they all show the same problem.

the invoice Text consists of this:
Code:
            Restaurant name
                Adress
# 4
The 07-31-20 at 06:10 PM
Waiter : MANAGER

Cherry coke                  1     2.00
Coke                         1     1.50
                               ________
                                   3.50

                     Servicio      0.35

            Amount to pay: ()     3.85

    -----------DUPLICATA-----------

            Welcome message
              Suggestion
           To type in setup
     ****************************
Now when I create my symbolic link
Code:
ln -s /dev/ttyS0 com1
and send my invoice to print only the following is printed.
Code:
            Restaurant name
# 4
The 07-31-20 at 06:10 PM
And when I change my symbolic link
Code:
ln -s /dev/pts/1 com1
and send my invoice to print, the whole invoice is correctly sent to the text window. I can now copy the text and send it to /dev/ttyS0 which prints the invoice correctly.

I think this proves that the invoice data is correctly sent to linux.

Now could it be that the that the date is sent too fast or too slow for the printer for some reason?

Do I have to find a way to reconfigure the comm port in Wine or in Linux?

Or is there a way to send the invoice to a file where it can be rerouted to the printer?

I tried to use CUPS to configure the Printer but there is no Driver for Epson TM printers, and raw printing screws up the invoice as it tries to print in graphic mode.


Any help is appreciated
 
Old 08-01-2006, 07:47 AM   #2
danie_w
LQ Newbie
 
Registered: Apr 2006
Location: Centurion, Gauteng, South Africa
Distribution: Fedora 16, Ubuntu 12.04
Posts: 20

Rep: Reputation: 0
Ah, the problem is the Waiter cannot be the MANAGER!
;^)
No, seriously: Mayby you can try to tail /dev/ttyS0
Since linux printing is fine the baud rate there might be OK
Try setting the baudrate in wine to a low value. (Hope this helps)
 
Old 08-01-2006, 09:43 AM   #3
pddm
Member
 
Registered: Sep 2005
Distribution: Mint 19.2
Posts: 112

Original Poster
Rep: Reputation: 15
I tried before to tail -f /dev/ttyS0 does not create any output.
The only way for me to see the output was linking com1 co /dev/pts/0 or dev/pts/1.

In regard to
Quote:
Try setting the baudrate in wine to a low value.
If you can tell me how, this would be great.

I asked the exact same question on the winehq IRC Chanel on freenode.net, on how to configure the comm port in wine. But I did not get an answer either

It seams to me as if it is not possible.

Even more confusing is the following:
If I paste the invoice into a text file and do this:
Code:
wine wcmd
C:\>copy test.txt com1
it prints fine.
And this:
Code:
cat .wine/dosdevices/c\:/test.txt > /home/patrick/.wine/dosdevices/com1
prints fine too.

But not directly from the application!!!


I see 3 possible solutions to the problem:
  1. A way to change the Wine settings to make it work.
  2. A CUPS Driver for the Epson TM-Series Printers.
  3. A way to print to a file which would automatically print to the serial port, like a queue
 
Old 08-02-2006, 12:33 AM   #4
pddm
Member
 
Registered: Sep 2005
Distribution: Mint 19.2
Posts: 112

Original Poster
Rep: Reputation: 15
Lightbulb

The POS Software I am trying to get to work is called Billpro.
It can be found here http://www.abcs-international.com

The reasons for me to want to get this software to work in wine are the following:
  1. The company I work for owns Licenses for the Software and is uses the system heavily.
  2. I don't see why you need to acquire Winblows Licenses to run a simple POS system.
  3. I am tired of the Problems Windows is giving me with stupid things like reconnecting network shares and user interference.
  4. The change to Linux would prepare the Platform to replace this Software in the next future by a full Linux Solution.

It is a bummer that just for this printer problem I will have to withdraw from throwing out half of the companies remaining Winblows.

My Goal is to make the company as much Linux as possible.


So if anybody could push me in the right direction I still might continue.
 
Old 08-02-2006, 04:03 AM   #5
danie_w
LQ Newbie
 
Registered: Apr 2006
Location: Centurion, Gauteng, South Africa
Distribution: Fedora 16, Ubuntu 12.04
Posts: 20

Rep: Reputation: 0
A first google got this one "http://marc.theaimsgroup.com/?l=wine-devel&m=115147456122358&w=2". Unfortunately it seems relevant and current (look at the date)?
Don't despair. There should be more than one way.
1) I think the com baud rate can be set in the registry for wine. Look at similar threads on this site. Also look for wine configuration tools.
2) Redirect the output to file and either try to use a Epson spooler (I had one for one of my Epsons) or optionally use a linux cron or printer spooler.
 
Old 08-04-2006, 05:23 PM   #6
pddm
Member
 
Registered: Sep 2005
Distribution: Mint 19.2
Posts: 112

Original Poster
Rep: Reputation: 15
Here is a little update on the issue;
I have just seen danie_w's post. And I will investigate this ...

I thught I had a glorious idea today:

I still had a parallel port module stored for the TM-U220 and I thoght; mabe I can print directly to parallel instead of serial, as the Software offers also direct printing to parallel.

Said, done.

Result:
cat .wine/dosdevices/c\:/test.txt > /home/patrick/.wine/dosdevices/lpt1
WORKS

wine wcmd
C:\>copy test.txt lpt1
WORKS

Invoice print from Program:
No printing at all!!!

I cannot beleive this, can You?
 
Old 08-09-2006, 10:16 PM   #7
pddm
Member
 
Registered: Sep 2005
Distribution: Mint 19.2
Posts: 112

Original Poster
Rep: Reputation: 15
Lightbulb

Recap:
I am adding onto this just in case somebody faces similar problems.
So he does not have to bang his head against the Printer for more than a month. lol

So, this is what I found out:

Direct Serial printing:
works from wine "DOS Prompt" (wcmd) as it uses a different way to print than the rest of wine. <- I learned this from someone over at the support IRC of winehq.

Direct Serial Printing from Billpro (the app I am using fails; even doe the text is correctly sent to the port.

In older versions of wine the ports used to be configured for usability within wine. I all versions I have seen (0.9.8 - 0.9.17) this has been replaced by sending the output directly to the device which is defined in %userhome%/.wine/dosdevices/ with a symbolic link named com1.

The thing is it has to be linked to a device. Trying to link it to a file does not write into the file. I even tried to create a fake device, and have a script continuously reroute the incoming data to lp but the information never arrives.

The only way ever to see the output was to link com1 to a print screen device /dev/pts/0; from where it is equally impossible to retrieve.


Direct Parallel Printing
Basically the same as serial, but serial might print 1 - 3 Lines, while Parallel prints Nothing.


Printing to a Windows (Linux) Printer
Direct Text Printing to a Printer (NOT PORT) always invokes the PS Encoder of wine; so CUPS will receive a PS Document to Print. You cannot print to a "Special (pseudo Printer" as wine will not recognize them.

If your Printer is configured to RAW, it will print the whole PS code.

If you invoke a driver - the only possibility is to use the Generic EPS Epson 9-Pin Series as a Driver for the TM-U2xx Series does not exist - It will try to print in graphic mode to the Text Printer. This is besides of being slow unreadable as it will put en empty line in between every line.

As pseudo Printers cannot be accessed from wine, I have not found a way to convert PS back to plain text.


Conclusion:
WINE is (not an Emulator) a really cool system. Really great.
Unfortunately I had to understand that the Gaming world has received priority. I mean something basic as Direct Serial Printing does not work, but DirectX and OpenGL for WinGaming do.

I hope in a Future Version it will be fixed.
Probably I should file a Bug Report.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Serial ports in Wine, SuSE 9.2 johnlb Linux - General 0 04-11-2005 12:09 PM
serial port under Mandrake 10.0 + Wine Andrew Skinner Linux - Hardware 0 11-02-2004 07:15 AM
trouble with serial ports and wine supradrvr Linux - Newbie 7 11-15-2003 08:58 AM
wine printing haamann Linux - Software 0 10-28-2003 02:00 AM
Printing/WINE/CUPS viniosity Linux - Hardware 4 05-11-2003 05:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration