USB to Serial

Keith Clark keithclark at k-wbookworm.com
Fri Jul 25 23:30:59 UTC 2008


Ok, I received the adaper today and it does not work with Ubuntu, out of 
the box. It works with my XP machine with no issues. Any ideas of what 
to try?
>
> Keith
>

Specifically this is a Star TSP600 printer, and the manufacturer 
supplies a driver with the following instructions:

---------------------------------------------------------------------------------------------------------------------------------------

Star Micronics Co., Ltd. |
Copyright 2004-2007 |
|
starcupsdrv-2.9.0 |
|
--------------------------/

** Package Description **

This is the CUPS printer driver package, containing:

1. Compiled printer drivers for the following Star models:
- TUP900 Presenter
- TUP900 Cutter
- TSP1000
- TSP800
- TSP828L
- TSP700II
- TSP700
- TSP600 Cutter
- TSP600 Tear Bar
- TSP650 Cutter
- TSP650 Tear Bar
- TSP100 Cutter
- TSP100 Tear Bar
- TSP100GT Cutter
- TSP100GT Tear Bar
- SP700 Cutter (SP747)
- SP700 Tear Bar (SP717)
- SP700 Cutter (SP742)
- SP700 Tear Bar (SP712)
- SP500 Cutter
- SP500 Tear Bar

2. Printer driver option setting help files.

3. Source code for all components participant in this software set.

4. A makefile for building and installing this software on your system.

5. This readme file.

6. The GNU General Public License or GPL, under which this software set 
is freely licensed to you. Adhere to it please!

** Requirements **

This software requires that the following is present on your computer:

1. CUPS server & architecure (see www.cups.org)
2. CUPS development headers (if you choose to re-compile the drivers)
These files are included in the cups-devel-1.1.19-13.i386.rpm package, 
which can be obtained at:
http://rpmfind.net/linux/rpm2html/search.php?query=cups-devel&submit=Search+...&system=&arch=

** Compile & Install Instructions **

To begin using this software, please do the following:

1. Obtain the distribution archive starcupsdrv_linux_yyyymmdd.tar.gz.
(You probably already have this)

2. Extract this archive creating the starcupsdrv-2.9.0 directory 
automatically.
(You probably already did this)

3. Open your favorite shell (bash, etc.) and navigate to the 
starcupsdrv-2.9.0 directory.

4. Decide if you are going to install the pre-compiled drivers contained 
in this package, or if you are going to re-compile them. The precompiled 
drivers should work, as-is, on most Linux i386 distributions. If the 
precompiled drivers do not work, recompiling them should do the trick.

If you are going to use the pre-compiled drivers, skip ahead to step 5.
If you are going to re-compile the drivers, do this:

Type 'make' at the prompt to begin building the package. A successful 
build should result in output similar to this:

mkdir bin
# compiling rastertostar filter
gcc -Wl,-rpath,/usr/lib -Wall -fPIC -O2 -o bin/rastertostar 
src/rastertostar.c -lcupsimage -lcups
# compiling rastertostarlm filter
gcc -Wl,-rpath,/usr/lib -Wall -fPIC -O2 -o bin/rastertostarlm 
src/rastertostarlm.c -lcupsimage -lcups
# gzip ppd file
gzip -c ppd/sp512.ppd >> bin/sp512.ppd.gz
# gzip ppd file
gzip -c ppd/sp542.ppd >> bin/sp542.ppd.gz
# gzip ppd file
gzip -c ppd/sp712.ppd >> bin/sp712.ppd.gz
# gzip ppd file
gzip -c ppd/sp742.ppd >> bin/sp742.ppd.gz
# gzip ppd file
gzip -c ppd/sp717.ppd >> bin/sp717.ppd.gz
# gzip ppd file
gzip -c ppd/sp747.ppd >> bin/sp747.ppd.gz
# gzip ppd file
gzip -c ppd/tsp113.ppd >> bin/tsp113.ppd.gz
# gzip ppd file
gzip -c ppd/tsp143.ppd >> bin/tsp143.ppd.gz
# gzip ppd file
gzip -c ppd/tsp113gt.ppd >> bin/tsp113gt.ppd.gz
# gzip ppd file
gzip -c ppd/tsp143gt.ppd >> bin/tsp143gt.ppd.gz
# gzip ppd file
gzip -c ppd/tsp613.ppd >> bin/tsp613.ppd.gz
# gzip ppd file
gzip -c ppd/tsp643.ppd >> bin/tsp643.ppd.gz
# gzip ppd file
gzip -c ppd/tsp651.ppd >> bin/tsp651.ppd.gz
# gzip ppd file
gzip -c ppd/tsp654.ppd >> bin/tsp654.ppd.gz
# gzip ppd file
gzip -c ppd/tsp700.ppd >> bin/tsp700.ppd.gz
# gzip ppd file
gzip -c ppd/tsp700II.ppd >> bin/tsp700II.ppd.gz
# gzip ppd file
gzip -c ppd/tsp800.ppd >> bin/tsp800.ppd.gz
# gzip ppd file
gzip -c ppd/tsp828l.ppd >> bin/tsp828l.ppd.gz
# gzip ppd file
gzip -c ppd/tsp1000.ppd >> bin/tsp1000.ppd.gz
# gzip ppd file
gzip -c ppd/tup942.ppd >> bin/tup942.ppd.gz
# gzip ppd file
gzip -c ppd/tup992.ppd >> bin/tup992.ppd.gz
# create setup shell script
cp src/setup.sh bin/setup
chmod +x bin/setup
# packaging
mkdir install
cp bin/rastertostar install
cp bin/rastertostarlm install
cp bin/*.ppd.gz install
cp bin/setup install

5. Execute the 'su' command to obtain super-user level permissions. You 
must enter the root user's password for this to succeed. Be careful!

6. Type 'make install' to install this package onto your computer. A 
successfull install should result in output similar to this:

# installing
cd install; exec ./setup
Star Micronics
starcupsdrv-2.9.0 installer
---------------------------------------

Models included:
TUP900
TSP1000
TSP800
TSP828L
TSP700II
TSP700
TSP600 Cutter
TSP600 Tear Bar
TSP650 Cutter
TSP650 Tear Bar
TSP100 Cutter
TSP100 Tear Bar
TSP100GT Cutter
TSP100GT Tear Bar
SP700 Cutter (SP747)
SP700 Tear Bar (SP717)
SP700 Cutter (SP742)
SP700 Tear Bar (SP712)
SP500 Cutter
SP500 Tear Bar

Searching for ServerRoot, ServerBin, and DataDir tags in 
/etc/cups/cupsd.conf

ServerBin tag is present as an absolute path

DataDir tag is present as an absolute path

ServerRoot = /etc/cups
ServerBin = /usr/lib/cups
DataDir = /usr/share/cups

Copying rastertostar filter to //usr/lib/cups/filter

Copying rastertostarlm filter to //usr/lib/cups/filter

Copying model ppd files to //usr/share/cups/model/star

Restarting CUPS
Stopping CUPS printing system: [ OK ]
Starting CUPS printing system: [ OK ]

Install Complete
Add printer queue using OS tool, http://localhost:631, or 
http://127.0.0.1:631

7. Goto http://localhost:631 or use your favorite CUPS admin tool.

8. Add a new printer queue for your model.

9. Print happily and buy more Star printers:)

** Driver Option Settings **

There are 3 ways that driver option settings can be configured:

1. Global configuration

Using your favorite CUPS admin tool, configure all option settings for 
the printer queue you installed, and then save these as the default. 
Each tool will present this functionality in a different way, but all 
should contain support for it.

Global configuration settings remain in effect indefinitely. After 
configuring your prefered settings, documents can be printed according 
to these settings WITHOUT the need for further configuration. In 
otherwords, you can simply 'lpr' your document, and it will be printed 
according to the global settings - no need for the "Print" dialog box to 
be shown to the user.

2. Command line configuration

When using CUPS, documents are submitted for printing via the 'lpr' 
command. This command will typically have the form: 'lpr -P queue -o 
PageSize=choice -o Option=choice document.ps'. In this command, "-o" 
begins and option / choice setting. You can specify as many option / 
choice settings as required to effect the printing mode you need.

Each of the printer drivers in this set contain support for differnt 
options and choices. Within the 'docs' folder of this package, you will 
find files (such as tsp700-options.txt) that described the set of 
supported options and choices for that printer. Please use these 
documents when formulating your print command.

Here is an example command effecting the best print quality and fixed 
length pages (a setting combination you might use for printing tickets):

lpr -P TSP800 -o PrintQuality=2Best -o PageType=1Fixed lift-ticket.ps

Specifying option / choice settings on the command line has 2 main virtues:

i. Option and choice settings are under programmatic control. Users do 
not have to set global defaults. Or, if they do, those global defaults 
are overridden - thus preventing faulty configuration usage.

ii. Option and choice settings can be varied on each print job without 
the need for user interaction or the display of the print dialog - 
automation:)

3. Print dialog configuration

Users can interact with the Print Dialog window to configure print 
options just prior to the printing of documents. This method is what 
most of us are familiar with - hit the print button - configure the 
settings - then print. This scenario is not ideal for POS, ticketing, or 
kiosk environments, and so the above 2 alternative methods are prefered:(

** Page Sizes **

These printer drivers contain many narrow-width page size definitions in 
addition to defintions for the standard A4 and Letter sizes. These are 
now described:

1. Narrow-width page sizes

Star printers are capable of handling many different paper widths. For 
each driver contained in this set, all paper widths supported by that 
model are established as defined page sizes. For each of these widths, 
various lengths are defined. The result is, using the TSP700 for 
example, that the following page sizes are available:

Option Meaning
-----------------------------------------------------------------------------
X50D8MMY30MM 50.8mm * 30mm
X50D8MMY40MM 50.8mm * 40mm
... 50.8mm * ymm (in 10mm increments)
X50D8MMY200MM 50.8mm * 200mm
X50D8MMY2000MM 50.8mm * 2000mm (2 meters)

X52D5MMY30MM 52.5mm * 30mm
X52D5MMY40MM 52.5mm * 40mm
... 52.5mm * ymm (in 10mm increments)
X52D5MMY200MM 52.5mm * 200mm
X52D5MMY2000MM 52.5mm * 2000mm (2 meters)

X72MMY30MM 72mm * 30mm
X72MMY40MM 72mm * 40mm
... 72mm * ymm (in 10mm increments)
X72MMY200MM 72mm * 200mm
X72MMY2000MM 72mm * 2000mm (2 meters)

X80MMY30MM 80mm * 30mm
X80MMY40MM 80mm * 40mm
... 80mm * ymm (in 10mm increments)
X80MMY200MM 80mm * 200mm
X80MMY2000MM 80mm * 2000mm (2 meters)
-----------------------------------------------------------------------------

Other printer models have support for other page sizes. Please see the 
option / choice setting document in the docs folder of this package to 
get a complete list of the supported page sizes for your printer.

When using a narrow-width page size, it is very import that the 
document's PostScript data be formatted properly for those dimensions. 
Here is an example:

If you are using the 72mm * 50mm page size, the PostScript data would 
contain:

%%BoundingBox: 0 0 204 141
| |
| ----> 141 points = 50mm / 25.4(mm/in) * 72(pts/in)
|
--------> 204 points = 72mm / 25.4(mm/in) * 72(pts/in)

In most cases you will not be generating your own PostScript data, but 
will rather be using data generated out of some graphical environment 
like KDE or Gnome. In this case as well, the PostScript data submitted 
to CUPS for printing must be formatted corresponding to the page size 
being used.

2. Standard page sizes

All TSP and TUP printer drivers contain built-in support for the 
standard A4, Letter, and Legal page sizes. Because all of these page 
sizes are wider then what these printers are capable of, scaling is 
automatically applied during the printing process.

For each of the sizes A4, Letter, and Legal, the following scaling 
settings are available (A4 example):

Option Meaning
-----------------------------------------------------------------------------
A4 A4 Fit Width 100% - Entire width is printed
A4Zoom90 A4 Fit Width 90% - 90% of the page width is printed
A4Zoom80 A4 Fit Width 80% - 80% of the page width is printed
A4Zoom70 A4 Fit Width 70% - 70% of the page width is printed
A4Zoom60 A4 Fit Width 60% - 60% of the page width is printed
A4Zoom50 A4 Fit Width 50% - 50% of the page width is printed
-----------------------------------------------------------------------------

In the above, where it is stated that "60% of the page width is 
printed," this means that 60% of the on-screen document width will be 
printed, and 40% will not be printed.

To control which 60% is to be printed, use the configuration option 
FocusArea, as explained above. When you set the focus area to left, the 
left 60% will be printed and the right 40% discarded. When set to 
center, 20% is discarded from both the left and right, and the center 
60% is printed. When set to right, the left 40% is discarded and the 
right 60% printed.

This feature might be useful in the following scenarios:

i. Existing application software has built-in margins. These margins are 
a waste of space, but can not be removed through application 
configuration. In this case, you can choose to print the center 90% and 
thusly eliminate some or all of both the left and right margins.

ii. Let's say you're building an information kiosk, supplying recipes to 
your customers. On the left side of the screen you have listed in a 
table the recipe, and on the right side you are showing a picture of the 
finished dish. While the picture is nice to look at, when your customer 
leaves the kiosk, what they need is the recipe - not the picture. In 
this case, you can choose to print the left 50% including only the 
table. This has the virtue that the page displayed and the page printed 
both come from the same html (or other) code, but are rendered differently.

When using either narrow-width or standard page sizes, you must specify 
the option / choice setting on the command line for CUPS to process. 
This command line has the following form:

lpr -P TSP700 -o PageSize=X72MMY50mm narrow-doc.ps

or

lpr -P TSP800 -o PageSize=A4Zoom50 -o FocusArea=0Left recipe.ps

--------------------------------------------------------------------------------------------------------------------------------------
I've extracted but right away there is a problem. Upon executing the 
make command per the instructions, I get nothing but errors as follows:

--------------------------------------------------------------------------------------------------------------------------------------
keithclark at keithclark-desktop:~/tspdriver/starcupsdrv-2.9.0$ make
mkdir bin
# compiling rastertostar filter
gcc -Wl,-rpath,/usr/lib -Wall -fPIC -O2 -o bin/rastertostar 
src/rastertostar.c -lcupsimage -lcups
src/rastertostar.c:33:23: error: cups/cups.h: No such file or directory
src/rastertostar.c:34:22: error: cups/ppd.h: No such file or directory
src/rastertostar.c:35:25: error: cups/raster.h: No such file or directory
src/rastertostar.c: In function ‘outputCommand’:
src/rastertostar.c:495: warning: implicit declaration of function ‘putchar’
src/rastertostar.c: In function ‘outputAsciiEncodedLength’:
src/rastertostar.c:501: warning: implicit declaration of function ‘printf’
src/rastertostar.c:501: warning: incompatible implicit declaration of 
built-in function ‘printf’
src/rastertostar.c: At top level:
src/rastertostar.c:509: error: expected declaration specifiers or ‘...’ 
before ‘ppd_file_t’
src/rastertostar.c: In function ‘getOptionChoiceIndex’:
src/rastertostar.c:511: error: ‘ppd_choice_t’ undeclared (first use in 
this function)
src/rastertostar.c:511: error: (Each undeclared identifier is reported 
only once
src/rastertostar.c:511: error: for each function it appears in.)
src/rastertostar.c:511: error: ‘choice’ undeclared (first use in this 
function)
src/rastertostar.c:512: error: ‘ppd_option_t’ undeclared (first use in 
this function)
src/rastertostar.c:512: error: ‘option’ undeclared (first use in this 
function)
src/rastertostar.c:514: warning: implicit declaration of function 
‘ppdFindMarkedChoice’
src/rastertostar.c:514: error: ‘ppd’ undeclared (first use in this function)
src/rastertostar.c:517: warning: implicit declaration of function 
‘ppdFindOption’
src/rastertostar.c:518: warning: implicit declaration of function 
‘ppdFindChoice’
src/rastertostar.c: At top level:
src/rastertostar.c:524: error: expected ‘)’ before ‘*’ token
src/rastertostar.c: In function ‘initializeSettings’:
src/rastertostar.c:640: error: ‘ppd_file_t’ undeclared (first use in 
this function)
src/rastertostar.c:640: error: ‘ppd’ undeclared (first use in this function)
src/rastertostar.c:641: error: ‘cups_option_t’ undeclared (first use in 
this function)
src/rastertostar.c:641: error: ‘options’ undeclared (first use in this 
function)
src/rastertostar.c:645: warning: implicit declaration of function 
‘ppdOpenFile’
src/rastertostar.c:647: warning: implicit declaration of function 
‘ppdMarkDefaults’
src/rastertostar.c:649: warning: implicit declaration of function 
‘cupsParseOptions’
src/rastertostar.c:652: warning: implicit declaration of function 
‘cupsMarkOptions’
src/rastertostar.c:654: warning: implicit declaration of function 
‘cupsFreeOptions’
src/rastertostar.c:657: warning: implicit declaration of function ‘memset’
src/rastertostar.c:657: warning: incompatible implicit declaration of 
built-in function ‘memset’
src/rastertostar.c:661: error: too many arguments to function 
‘getOptionChoiceIndex’
src/rastertostar.c:662: error: too many arguments to function 
‘getOptionChoiceIndex’
src/rastertostar.c:663: error: too many arguments to function 
‘getOptionChoiceIndex’
src/rastertostar.c:664: error: too many arguments to function 
‘getOptionChoiceIndex’
src/rastertostar.c:665: error: too many arguments to function 
‘getOptionChoiceIndex’
src/rastertostar.c:666: error: too many arguments to function 
‘getOptionChoiceIndex’
src/rastertostar.c:667: error: too many arguments to function 
‘getOptionChoiceIndex’
src/rastertostar.c:668: error: too many arguments to function 
‘getOptionChoiceIndex’
src/rastertostar.c:669: error: too many arguments to function 
‘getOptionChoiceIndex’
src/rastertostar.c:670: error: too many arguments to function 
‘getOptionChoiceIndex’
src/rastertostar.c:671: error: too many arguments to function 
‘getOptionChoiceIndex’
src/rastertostar.c:672: error: too many arguments to function 
‘getOptionChoiceIndex’
src/rastertostar.c:673: error: too many arguments to function 
‘getOptionChoiceIndex’
src/rastertostar.c:674: error: too many arguments to function 
‘getOptionChoiceIndex’
src/rastertostar.c:675: error: too many arguments to function 
‘getOptionChoiceIndex’
src/rastertostar.c:733: error: too many arguments to function 
‘getOptionChoiceIndex’
src/rastertostar.c:734: error: too many arguments to function 
‘getOptionChoiceIndex’
src/rastertostar.c:735: error: too many arguments to function 
‘getOptionChoiceIndex’
src/rastertostar.c:736: error: too many arguments to function 
‘getOptionChoiceIndex’
src/rastertostar.c:737: error: too many arguments to function 
‘getOptionChoiceIndex’
src/rastertostar.c:738: error: too many arguments to function 
‘getOptionChoiceIndex’
src/rastertostar.c:739: error: too many arguments to function 
‘getOptionChoiceIndex’
src/rastertostar.c:740: error: too many arguments to function 
‘getOptionChoiceIndex’
src/rastertostar.c:745: warning: implicit declaration of function 
‘getPageWidthPageHeight’
src/rastertostar.c:747: warning: implicit declaration of function ‘ppdClose’
src/rastertostar.c: At top level:
src/rastertostar.c:920: error: expected declaration specifiers or ‘...’ 
before ‘cups_page_header_t’
src/rastertostar.c: In function ‘pageSetup’:
src/rastertostar.c:927: error: ‘header’ undeclared (first use in this 
function)
src/rastertostar.c: In function ‘main’:
src/rastertostar.c:1021: error: ‘cups_raster_t’ undeclared (first use in 
this function)
src/rastertostar.c:1021: error: ‘ras’ undeclared (first use in this 
function)
src/rastertostar.c:1022: error: ‘cups_page_header_t’ undeclared (first 
use in this function)
src/rastertostar.c:1022: error: expected ‘;’ before ‘header’
src/rastertostar.c:1072: warning: implicit declaration of function ‘fputs’
src/rastertostar.c:1072: error: ‘stderr’ undeclared (first use in this 
function)
src/rastertostar.c:1086: warning: implicit declaration of function ‘perror’
src/rastertostar.c:1087: warning: implicit declaration of function ‘sleep’
src/rastertostar.c:1106: warning: implicit declaration of function 
‘cupsRasterOpen’
src/rastertostar.c:1106: error: ‘CUPS_RASTER_READ’ undeclared (first use 
in this function)
src/rastertostar.c:1110: warning: implicit declaration of function 
‘cupsRasterReadHeader’
src/rastertostar.c:1110: error: ‘header’ undeclared (first use in this 
function)
src/rastertostar.c:1122: warning: implicit declaration of function 
‘cupsRasterClose’
src/rastertostar.c:1122: warning: implicit declaration of function ‘close’
src/rastertostar.c:1129: error: too many arguments to function ‘pageSetup’
src/rastertostar.c:1132: warning: implicit declaration of function ‘fprintf’
src/rastertostar.c:1132: warning: incompatible implicit declaration of 
built-in function ‘fprintf’
src/rastertostar.c:1166: warning: implicit declaration of function 
‘cupsRasterReadPixels’
src/rastertostar.c:1196: warning: incompatible implicit declaration of 
built-in function ‘printf’
make: *** [rastertostar] Error 1

--------------------------------------------------------------------------------------------------------------------------------------
I'm not sure where to go from here...............

Keith


-------------- next part --------------
A non-text attachment was scrubbed...
Name: keithclark.vcf
Type: text/x-vcard
Size: 245 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20080725/2276a173/attachment.vcf>


More information about the ubuntu-users mailing list