WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Tinycore Parallel port printing problem  (Read 19301 times)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Tinycore Parallel port printing problem
« Reply #45 on: May 03, 2013, 03:23:50 AM »
Have you checked for possible parport options in your BIOS?
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

aus9

  • Guest
Re: Tinycore Parallel port printing problem
« Reply #46 on: May 03, 2013, 04:10:59 AM »
Good one tinypoodle

In the mean time I have hit a brick wall....again

tce-load -i cups cups-dev

Code: [Select]
ppdc -tvv label.drv
ppdc: Loading driver information file "label.drv"...
ppdc: Unable to find include file "<usr/local/include/cups/ppd.h>" on line 19 of label.drv!

work in progress is in code box, its a text file called label.drv
Code: [Select]
// Include standard font and media definitions
#include <font.defs>
#include <media.defs>

// include label specs
#include <label.h>

// Specify that this driver uses the label driver
DriverType label

// Each filter provided by the driver...
Filter application/vnd.cups-raster 0 rastertolabel

// List the fonts that are supported, in this case all standard fonts...
Font *

// try custom page size load cups-dev
#include <usr/local/include/cups/ppd.h>

ppd_file_t *ppd;

// try generate page size
/* Get a 72x297 millimeter custom page size */
ppd_size_t *size = ppdPageSize(ppd, "Custom.72x297mm");


// Manufacturer, model name, and version
Manufacturer "AMTECH"
ModelName "AMTECH 120"
Version 1.0

// PostScript printer attributes
Attribute ColorDevice" " False

originally I was using cups/ppd.h but that borked too

looks like I won't work it out tonite

some references for you

http://cups.org/documentation.php?VERSION=1.4

http://cups.org/documentation.php/doc-1.7/api-ppd.html#PAGE_SIZES

Altho it says 1.7 I am hoping it applies to 1.4 series

http://cups.org/documentation.php/doc-1.7/raster-driver.html

aus9

  • Guest
Re: Tinycore Parallel port printing problem
« Reply #47 on: May 03, 2013, 08:17:22 AM »
did not get far but got past that last error to a new one using a better command
this is just the test, not the generation........I would use ppdc -d /tmp label.drv, once all errors are gone

but not having much luck
Code: [Select]
ppdc -I /usr/local/lib/include/cups -tvvv label.drv
ppdc: Loading driver information file "label.drv"...
ppdc: Unknown token "#" seen on line 27 of /usr/local/share/cups/ppdc/ppd.h!
ppdc: Unknown token "ppd_file_t" seen on line 20 of label.drv!

suggest you revisit tinypoodle's suggestion or my previous link or use wine and the windows driver

giving up tonite

good luck

aus9

  • Guest
Re: Tinycore Parallel port printing problem
« Reply #48 on: May 03, 2013, 09:08:01 PM »
I elected to drop cups-dev, I am only a simple coder but believe it not bashing my head against the errors I was getting for ppd.h
so driver currently looks like this
Code: [Select]
// Include necessary files...
#include <font.defs>
#include <media.defs>
#include <label.h>

// Common stuff for all drivers...
Attribute "cupsVersion" "" "1.4"
Attribute "FileSystem" "" "False"
Attribute "LandscapeOrientation" "" "Plus90"
Attribute "TTRasterizer" "" "Type42"

Copyright "Copyright 2007-2011 by Apple Inc."
Copyright "Copyright 1997-2007 by Easy Software Products."
Copyright ""
Copyright "These coded instructions, statements, and computer programs are the"
Copyright "property of Apple Inc. and are protected by Federal copyright"
Copyright "law.  Distribution and use rights are outlined in the file \"LICENSE.txt\""
Copyright "which should have been included with this file.  If this file is"
Copyright "file is missing or damaged, see the license at \"http://www.cups.org/\"."

// fonts
Font *

// for some reason as per sample give v again
Version "1.4"

// Manufacturer, model name, and version
Manufacturer "AMTECH"
ModelName "AMTECH 120"
Version 1.0

// Specify that this driver uses the label driver
DriverType label

// Each filter provided by the driver...
Filter application/vnd.cups-raster 0 rastertolabel

// Do we have colour
ColorDevice false

// Supported resolutions
*Resolution k 1 0 0 0 "203dpi/203 DPI"

// throughput
Throughput 8

// Specify the name of the PPD file we want to generate...
PCFileName "amtech.ppd"

but its not working so I give up and hope with your programming skills etc you will have better luck

I redesigned it based on sample.drv from /usr/local/share/cups/drv with some input from your file such as your resolutions

I deliberately left out page dimensions etc, the cupstestppd should show up or you could view the file but I can't generate it.

So I am truly giving up, I can't help any further, if at all.

just to repeat my errors and maybe you can work it out

Code: [Select]
ppdc -tvv label.drv  (supposed to say PASSED)  (but I deleted my old driver so can't check any more)

(if it passed, then)

ppdc -d /tmp label.drv

cupstestppd -vv /tmp/*.ppd

(if it passes all try it)
« Last Edit: May 03, 2013, 09:10:33 PM by aus9 »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11618
Re: Tinycore Parallel port printing problem
« Reply #49 on: May 04, 2013, 01:49:49 AM »
Hi Shyam24689
In reply #15 you state that the printer works under another OS. Was this on the same machine, and was it with the
same printer cable? What print command did you use under that OS. Did you try running:
Code: [Select]
lsmodunder the working OS to see which modules were loaded?
Does this PDF:
http://amtech-europe.de/fileadmin/amtech/img/ATP-80K.pdf
basically match the specs of your printer?
Page 26 of that PDF lists pin 14 as the error output from the printer. Pin 14 on a printer port is the Auto-Linefeed output, pin
15 is the printer error input.


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11618
Re: Tinycore Parallel port printing problem
« Reply #50 on: May 04, 2013, 02:10:49 AM »
Hi Shyam24689
You might also want to put together a small diagnostic program to examine the state of the status and control registers
when the printer is hung. This link should provide enough information to do that:
http://mockmoon-cybernetics.ch/computer/linux/programming/parport.html
I would suggest using the code listed under  Access via /dev/lpX  as a template.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Tinycore Parallel port printing problem
« Reply #51 on: May 04, 2013, 06:18:39 AM »
Barcode label printers often speak a special printer control language and will not print ascii text.

aus9

  • Guest
Re: Tinycore Parallel port printing problem
« Reply #52 on: May 05, 2013, 07:19:27 PM »
Not sure if OP is still attempting my way but
Quote
what url to add at connection after selecting lpd

found http://www.cups.org/documentation.php/network.html section Line Printer Daemon (LPD) Protocol

Quote
port 515 and uses the lpd URI scheme:

lpd://ip-address-or-hostname/queue
lpd://username@ip-address-or-hostname/queue
lpd://ip-address-or-hostname/queue?option=value
lpd://username@ip-address-or-hostname/queue?option=value
lpd://ip-address-or-hostname/queue?option=value&option=value
lpd://username@ip-address-or-hostname/queue?option=value&option=value

if at reply 35 you are happy with that ip, I don't know, try changing queue to lpd://192.168.0.80:515

good luck