Tiny Core Linux
Tiny Core Extensions => TCE Q&A Forum => Topic started by: Shyam24689 on April 30, 2013, 06:13:48 AM
-
Does any one had faced Problems with printing using Tinycore over Parallel port.
I installed my printer using: lpadmin -p AMTECH -R -v parallel:/dev/lp0 -m amt_tif.ppd
And then made the printer system default using: lpadmin -d AMTECH
When i send a file to print or even a testprint it gives no output although status given is Ready to print
No errors are logged in the error_log file of cups. Please help if any one had come out through this situation using 3.0.21-tinycore.....
Thanks in advance......
-
Hi
sorry your first post is an error. Sorry if my next bit is telling a programmer how to suck eggs.
Juanito is current maintainer of CUPS but I am attempting to upgrade it......currently a fail.
When you get a chance, as its not clear to me, can you edit with sudo or root powers the
/usr/local/etc/cups/cupsd.conf
change to debug, then you need to restart the daemon with
sudo /usr/local/etc/init.d/cups restart
OR --- If you can use a web browser then create a root password with
sudo passwd
open web browser to http://localhost:631/admin
click edit the file, change to debug, when you attempt to save, it must bring up the root passwd screen
--if not seen, backtrack and click on ADD printer and that should bring up the passwd dialog box
Then which ever way you used, can you upload all debug log somewhere and post a link to it.
I am not sure if your post count allows you to post a link tho.
If not pm me the link and I can broadcast it, or pm Juanito the link. but I will hang around an hour or so
good luck
EDIT
do you have the module loaded?
sudo modprobe parport
-
Hi,
First of all Thanks for ur reply
I have the parport module loaded
lsmod gives me the following result:
parport_pc 24576 1
parport 24576 3 lp,ppdev,parport_pc
-
Hi ,
Go to the link and click sign in
Enter username: shyamchaturvedi99@yahoo.in
Password: Shyam24689
Then got to Cups error log folder. You can then have a look over the error log which is generated after changing cups.confd to debug
https://dl-web.dropbox.com/get/Cups%20Error%20log/error_log?w=AACGfK1ta87sFTk4GmmTh6jxdt2Ufk3FTvaAGQfusGKW5w (https://dl-web.dropbox.com/get/Cups%20Error%20log/error_log?w=AACGfK1ta87sFTk4GmmTh6jxdt2Ufk3FTvaAGQfusGKW5w)
-
From the error log:
I [01/May/2013:18:49:53 +0000] [Job 2] Started backend /usr/local/lib/cups/backend/parallel (PID 8426)
...
I [01/May/2013:18:49:53 +0000] [Job 2] Printer not connected; will retry in 30 seconds...
D [01/May/2013:18:49:53 +0000] [Job 2] Set job-printer-state-message to "Printer not connected; will retry in 30 seconds...", current level=INFO
...
I [01/May/2013:18:49:54 +0000] [Job 2] Printing page 1, 96% complete...
D [01/May/2013:18:49:54 +0000] [Job 2] Set job-printer-state-message to "Printing page 1, 96% complete...", current level=INFO
D [01/May/2013:18:49:54 +0000] Discarding unused job-progress event...
D [01/May/2013:18:49:54 +0000] Discarding unused printer-state-changed event...
I [01/May/2013:18:49:54 +0000] [Job 2] Rendering completed
D [01/May/2013:18:49:54 +0000] [Job 2] Set job-printer-state-message to "Rendering completed", current level=INFO
...
D [01/May/2013:19:10:23 +0000] [CGI] python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
...
D [01/May/2013:19:10:23 +0000] [CGI] hp: error while loading shared libraries: libhpmud.so.0: cannot open shared object file: No such file or directory
It looks like cups is trying to use the parallel backend, but does not find a parallel printer - if you search the forums on "cups" and "parallel" you'll find a post where Roberts prints to a parallel printer without using cups - you could try this to see if your machine actually recognises that a parallel printer is connected to it.
What does "ldd /usr/local/lib/cups/backend/parallel" give?
Further down the error log, it looks like cups believes it has printed 96% of a document and then completed it - I take it that nothing was printed?
What printer are you using? The errors about missing libpython and libhpmud make me think that the ppd file expects hplip to be installed?
-
"ldd /usr/local/lib/cups/backend/parallel" gives the following output
linux-gate.so.1 => (0xb779a000)
libcups.so.2 => /usr/local/lib/libcups.so.2 (0xb7754000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb7730000)
libm.so.6 => /lib/libm.so.6 (0xb770d000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0xb76de000)
libc.so.6 => /lib/libc.so.6 (0xb75d2000)
libz.so.1 => /usr/lib/libz.so.1 (0xb75c1000)
/lib/ld-linux.so.2 (0xb779b000)
I'm using AMTECH 120 Thermal printer ,I already have hplip installed so I tried adding a symbolic link
ln -s /usr/local/lib/libhpmud.so.0 /usr/lib/libhpmud.so.0 & ln -s /usr/local/lib/libpython2.7.so.1.0 /usr/lib/libpython2.7.so.1.0
and then restarted cups the error regarding shared object library disappeared but still no Prinitng.
Can you please provide me the link about printing to a parallel printer without using cups...?
Can you please suggest if it is the problem with tinycore Kernel not detecting parallel port or it might be a system issue? I'm using 3.0.21-tinycore
-
"ldd /usr/local/lib/cups/backend/parallel" gives the following output
linux-gate.so.1 => (0xb779a000)
...
That looks OK
I'm using AMTECH 120 Thermal printer ,I already have hplip installed so I tried adding a symbolic link
ln -s /usr/local/lib/libhpmud.so.0 /usr/lib/libhpmud.so.0 & ln -s /usr/local/lib/libpython2.7.so.1.0 /usr/lib/libpython2.7.so.1.0
and then restarted cups the error regarding shared object library disappeared but still no Prinitng.
I doubt that an Amtech printer would require hplip, which I thought was for HP printers only. Maybe you have the wrong ppd for your printer and it is that ppd that is looking for hplip.
Can you please provide me the link about printing to a parallel printer without using cups...?
From http://forum.tinycorelinux.net/index.php/topic,3373.msg17639.html#msg17639: Because printing is not part of the base system but instead is supported by extensions.
Yes, I modprobe lp in my /opt/bootlocal.sh on the one computer that I have that still has a parallel port.
FYI In the base is a tiny script that I use for cupsless, spoolerless, direct printing of text files, i.e,. my programs and scripts, it might be useful to some
text2lp0
Of course, it only prints plain text directly to lp0
Maybe you could try using text2lp0 to print a text file to your printer? This would help identify the problem area.
-
text2lp0 gave me the following output
/usr/bin/text2lp0: line 4: can't create /dev/lp0: Device or resource busy
/usr/bin/text2lp0: line 5: can't create /dev/lp0: Device or resource busy
Is it a real problem? even i cancelled all the print jobs sent through cups and lpr command but still it says device or resource busy....
-
It would be a good idea to reboot your machine and try the same thing without cups or any of it's deps or hplip loaded
-
After system restart it gave no error but then tooo no print
-
I assume the "lp" module is loaded, what does "ls -l /dev/lp0" give?
-
Again i tried by rebooting and did modprobe lp & modprobe parport_pc after reboot then tried text2lp0...
but the command prompt appeared to get hanged without giving the next command cursor
-
ls -l /dev/lp0 gave the following output
crw-rw---- 1 root staff 6, 0 May 2 17:56 /dev/lp0
-
Hi
Having read the link kindly supplied by Juanito I see I have mislead you on your kernel module the correct command is as follows
tc@box:~$ sudo modprobe lp
(to check)
lsmod | grep lp
lp 12288 0
parport 24576 1 lp
usblp 16384 0
ls -l /dev/lp0
(but I have no such beast)
Then retry your printer stuff
good luck
-
lsmod | grep lp gives me the following output
lp 12288 0
parport 24576 3 lp,ppdev,parport_pc
-
one interesting fact which i noticed between tinycore os and ther os i which printer is working...
the output of ls -l /dev/lp0 in tiny core is
crw-rw---- 1 root staff 6, 0 May 2 21:00 /dev/lp0
Whereas in other OS
crw-rw---- 1 root lp 6, 0 May 2 21:00 /dev/lp0
Does staff/lp makes any difference while accessing the port...
-
Hi Shyam24689
but the command prompt appeared to get hanged without giving the next command cursor
That sounds like the printer is not acknowledging that it received data. Power the printer down and back up and make
sure the the online light is lit. Then execute:
echo -ne \\f > /dev/lp0
and see if you get a form feed.
-
Hi Shyam24689
Does staff/lp makes any difference while accessing the port...
Staff is the group that lp0 belongs to. As user tc, you also belong to that group and have permission to access it.
By any chance, do you have more than one parallel port?
-
Yesss i received a form feed.... :) but why is it not accepting text file through text2lp0
-
Hi Shyam24689
If you enter:
text2lp0 .xsession
does it print anything?
-
No i dont have any other parallel port.....
text2lp0 .xsession din't worked it hangs the command line
-
Hi Shyam24689
OK, how about:
cat .xsession > /dev/lp0
echo -ne \\f > /dev/lp0
-
It hangs... even for cat .xsession > /dev/lp0
-
Hi
If you like to try something a bit wilder?
load cups, gutenprint and ghostscript......you may have to download these monsters first
create root passwd as per info file $sudo passwd
http://localhost:631/admin <<--- go to this page in web browser and click on add printers to see root login box
input root and your new passwd......its saved for this session only so if it does not work....you have no persistence for cups
after a short pause.....it may offer some printer makers
choose Epson 24 pin.......click add printer and then save the defaults
here is a peek of the PPD in a code box for display purposes only......your will differ as I am testing 1.6.2 vesion
*PPD-Adobe: "4.3"
*%%%% PPD file for 24-Pin Series with CUPS.
*%%%% Created by the CUPS PPD Compiler CUPS v1.6.2.
*% Copyright 2007-2012 by Apple Inc.
*% Copyright 1997-2007 by Easy Software Products.
*%
*% These coded instructions, statements, and computer programs are the
*% property of Apple Inc. and are protected by Federal copyright
*% law. Distribution and use rights are outlined in the file "LICENSE.txt"
*% which should have been included with this file. If this file is
*% file is missing or damaged, see the license at "http://www.cups.org/".
*FormatVersion: "4.3"
*FileVersion: "1.5"
*LanguageVersion: English
*LanguageEncoding: ISOLatin1
*PCFileName: "epson24.ppd"
*Product: "(24-Pin Series)"
*Manufacturer: "Epson"
*ModelName: "Epson 24-Pin Series"
*ShortNickName: "Epson 24-Pin Series"
*NickName: "Epson 24-Pin Series"
*PSVersion: "(3010.000) 0"
*LanguageLevel: "3"
*ColorDevice: False
*DefaultColorSpace: Gray
*FileSystem: False
*Throughput: "1"
*LandscapeOrientation: Plus90
*TTRasterizer: Type42
*% Driver-defined attributes...
*cupsVersion: 1.6
*cupsModelNumber: 1
*cupsManualCopies: True
*cupsFilter: "application/vnd.cups-raster 50 rastertoepson"
*cupsLanguages: "en"
*OpenUI *PageSize/Media Size: PickOne
*OrderDependency: 10 AnySetup *PageSize
*DefaultPageSize: A4
*PageSize Letter/US Letter: "<</PageSize[612 792]/ImagingBBox null>>setpagedevice"
*PageSize Legal/US Legal: "<</PageSize[612 1008]/ImagingBBox null>>setpagedevice"
*PageSize A4/A4: "<</PageSize[595 842]/ImagingBBox null>>setpagedevice"
*PageSize FanFoldUS/Fanfold US: "<</PageSize[1071 792]/ImagingBBox null>>setpagedevice"
*CloseUI: *PageSize
*OpenUI *PageRegion/Media Size: PickOne
*OrderDependency: 10 AnySetup *PageRegion
*DefaultPageRegion: A4
*PageRegion Letter/US Letter: "<</PageSize[612 792]/ImagingBBox null>>setpagedevice"
*PageRegion Legal/US Legal: "<</PageSize[612 1008]/ImagingBBox null>>setpagedevice"
*PageRegion A4/A4: "<</PageSize[595 842]/ImagingBBox null>>setpagedevice"
*PageRegion FanFoldUS/Fanfold US: "<</PageSize[1071 792]/ImagingBBox null>>setpagedevice"
*CloseUI: *PageRegion
*DefaultImageableArea: A4
*ImageableArea Letter/US Letter: "18 18 594 774"
*ImageableArea Legal/US Legal: "18 18 594 990"
*ImageableArea A4/A4: "18 18 577 824"
*ImageableArea FanFoldUS/Fanfold US: "18 18 1053 774"
*DefaultPaperDimension: A4
*PaperDimension Letter/US Letter: "612 792"
*PaperDimension Legal/US Legal: "612 1008"
*PaperDimension A4/A4: "595 842"
*PaperDimension FanFoldUS/Fanfold US: "1071 792"
*MaxMediaWidth: "1080"
*MaxMediaHeight: "86400"
*HWMargins: 18 18 18 18
*CustomPageSize True: "pop pop pop <</PageSize[5 -2 roll]/ImagingBBox null>>setpagedevice"
*ParamCustomPageSize Width: 1 points 36 1080
*ParamCustomPageSize Height: 2 points 36 86400
*ParamCustomPageSize WidthOffset: 3 points 0 0
*ParamCustomPageSize HeightOffset: 4 points 0 0
*ParamCustomPageSize Orientation: 5 int 0 0
*OpenUI *Resolution/Resolution: PickOne
*OrderDependency: 10 AnySetup *Resolution
*DefaultResolution: 120x60dpi
*Resolution 60dpi/60dpi: "<</HWResolution[60 60]/cupsBitsPerColor 1/cupsRowCount 8/cupsRowFeed 0/cupsRowStep 0/cupsColorSpace 3>>setpagedevice"
*Resolution 120x60dpi/120x60dpi: "<</HWResolution[120 60]/cupsBitsPerColor 1/cupsRowCount 8/cupsRowFeed 0/cupsRowStep 0/cupsColorSpace 3>>setpagedevice"
*Resolution 180dpi/180dpi: "<</HWResolution[180 180]/cupsBitsPerColor 1/cupsRowCount 24/cupsRowFeed 0/cupsRowStep 0/cupsColorSpace 3>>setpagedevice"
*Resolution 360x180dpi/360x180dpi: "<</HWResolution[360 180]/cupsBitsPerColor 1/cupsRowCount 24/cupsRowFeed 0/cupsRowStep 0/cupsColorSpace 3>>setpagedevice"
*Resolution 360dpi/360dpi: "<</HWResolution[360 360]/cupsBitsPerColor 1/cupsRowCount 48/cupsRowFeed 0/cupsRowStep 0/cupsColorSpace 3>>setpagedevice"
*CloseUI: *Resolution
*DefaultFont: Courier
*Font AvantGarde-Book: Standard "(1.05)" Standard ROM
*Font AvantGarde-BookOblique: Standard "(1.05)" Standard ROM
*Font AvantGarde-Demi: Standard "(1.05)" Standard ROM
*Font AvantGarde-DemiOblique: Standard "(1.05)" Standard ROM
*Font Bookman-Demi: Standard "(1.05)" Standard ROM
*Font Bookman-DemiItalic: Standard "(1.05)" Standard ROM
*Font Bookman-Light: Standard "(1.05)" Standard ROM
*Font Bookman-LightItalic: Standard "(1.05)" Standard ROM
*Font Courier: Standard "(1.05)" Standard ROM
*Font Courier-Bold: Standard "(1.05)" Standard ROM
*Font Courier-BoldOblique: Standard "(1.05)" Standard ROM
*Font Courier-Oblique: Standard "(1.05)" Standard ROM
*Font Helvetica: Standard "(1.05)" Standard ROM
*Font Helvetica-Bold: Standard "(1.05)" Standard ROM
*Font Helvetica-BoldOblique: Standard "(1.05)" Standard ROM
*Font Helvetica-Narrow: Standard "(1.05)" Standard ROM
*Font Helvetica-Narrow-Bold: Standard "(1.05)" Standard ROM
*Font Helvetica-Narrow-BoldOblique: Standard "(1.05)" Standard ROM
*Font Helvetica-Narrow-Oblique: Standard "(1.05)" Standard ROM
*Font Helvetica-Oblique: Standard "(1.05)" Standard ROM
*Font NewCenturySchlbk-Bold: Standard "(1.05)" Standard ROM
*Font NewCenturySchlbk-BoldItalic: Standard "(1.05)" Standard ROM
*Font NewCenturySchlbk-Italic: Standard "(1.05)" Standard ROM
*Font NewCenturySchlbk-Roman: Standard "(1.05)" Standard ROM
*Font Palatino-Bold: Standard "(1.05)" Standard ROM
*Font Palatino-BoldItalic: Standard "(1.05)" Standard ROM
*Font Palatino-Italic: Standard "(1.05)" Standard ROM
*Font Palatino-Roman: Standard "(1.05)" Standard ROM
*Font Symbol: Special "(001.005)" Special ROM
*Font Times-Bold: Standard "(1.05)" Standard ROM
*Font Times-BoldItalic: Standard "(1.05)" Standard ROM
*Font Times-Italic: Standard "(1.05)" Standard ROM
*Font Times-Roman: Standard "(1.05)" Standard ROM
*Font ZapfChancery-MediumItalic: Standard "(1.05)" Standard ROM
*Font ZapfDingbats: Special "(001.005)" Special ROM
*% End of epson24.ppd, 05814 bytes.
Note I am in aussie land with locale set to A4 paper......if you have your locale set, paper default will differ
then see if it prints
if not go back to admin page and Edit the config to almost top line to
LogLevel debug
Next saving it......will restart cups
try to print and if no good.....post your debug file if you feel like it
###########
Much harder is to create your own PPD using ppdc but I am not sure it was designed for 24 pins
good luck
-
Still no luck :(
Error_log
D [03/May/2013:07:02:08 +0000] cupsdReadClient: 9 GET /printers/Test HTTP/1.1
D [03/May/2013:07:02:08 +0000] cupsdSetBusyState: Active clients, printing jobs, and dirty files
D [03/May/2013:07:02:08 +0000] cupsdAuthorize: Authorized as root using Basic
D [03/May/2013:07:02:08 +0000] [CGI] argv[0] = "/usr/local/lib/cups/cgi-bin/printers.cgi"
D [03/May/2013:07:02:08 +0000] [CGI] envp[0] = "CUPS_CACHEDIR=/var/cache/cups"
D [03/May/2013:07:02:08 +0000] [CGI] envp[1] = "CUPS_DATADIR=/usr/local/share/cups"
D [03/May/2013:07:02:08 +0000] [CGI] envp[2] = "CUPS_DOCROOT=/usr/local/share/doc/cups"
D [03/May/2013:07:02:08 +0000] [CGI] envp[3] = "CUPS_FONTPATH=/usr/local/share/ghostscript/fonts"
D [03/May/2013:07:02:08 +0000] [CGI] envp[4] = "CUPS_REQUESTROOT=/var/spool/cups"
D [03/May/2013:07:02:08 +0000] [CGI] envp[5] = "CUPS_SERVERBIN=/usr/local/lib/cups"
D [03/May/2013:07:02:08 +0000] [CGI] envp[6] = "CUPS_SERVERROOT=/usr/local/etc/cups"
D [03/May/2013:07:02:08 +0000] [CGI] envp[7] = "CUPS_STATEDIR=/var/run/cups"
D [03/May/2013:07:02:08 +0000] [CGI] envp[8] = "HOME=/var/spool/cups/tmp"
D [03/May/2013:07:02:08 +0000] [CGI] envp[9] = "PATH=/usr/local/lib/cups/filter:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin"
D [03/May/2013:07:02:08 +0000] [CGI] envp[10] = "SERVER_ADMIN=root@box"
D [03/May/2013:07:02:08 +0000] [CGI] envp[11] = "SOFTWARE=CUPS/1.4.8"
D [03/May/2013:07:02:08 +0000] [CGI] envp[12] = "TMPDIR=/var/spool/cups/tmp"
D [03/May/2013:07:02:08 +0000] [CGI] envp[13] = "USER=root"
D [03/May/2013:07:02:08 +0000] [CGI] envp[14] = "CUPS_SERVER=/var/run/cups/cups.sock"
D [03/May/2013:07:02:08 +0000] [CGI] envp[15] = "CUPS_ENCRYPTION=IfRequested"
D [03/May/2013:07:02:08 +0000] [CGI] envp[16] = "IPP_PORT=631"
D [03/May/2013:07:02:08 +0000] [CGI] envp[17] = "AUTH_TYPE=Basic"
D [03/May/2013:07:02:08 +0000] [CGI] envp[18] = "LANG=en_US.UTF8"
D [03/May/2013:07:02:08 +0000] [CGI] envp[19] = "REDIRECT_STATUS=1"
D [03/May/2013:07:02:08 +0000] [CGI] envp[20] = "GATEWAY_INTERFACE=CGI/1.1"
D [03/May/2013:07:02:08 +0000] [CGI] envp[21] = "SERVER_NAME=localhost"
D [03/May/2013:07:02:08 +0000] [CGI] envp[22] = "SERVER_PORT=631"
D [03/May/2013:07:02:08 +0000] [CGI] envp[23] = "REMOTE_ADDR=127.0.0.1"
D [03/May/2013:07:02:08 +0000] [CGI] envp[24] = "REMOTE_HOST=localhost"
D [03/May/2013:07:02:08 +0000] [CGI] envp[25] = "SCRIPT_NAME=/printers/Test"
D [03/May/2013:07:02:08 +0000] [CGI] envp[26] = "SCRIPT_FILENAME=/usr/local/share/doc/cups/printers/Test"
D [03/May/2013:07:02:08 +0000] [CGI] envp[27] = "PATH_INFO=/Test"
D [03/May/2013:07:02:08 +0000] [CGI] envp[28] = "REMOTE_USER=root"
D [03/May/2013:07:02:08 +0000] [CGI] envp[29] = "SERVER_PROTOCOL=HTTP/1.1"
D [03/May/2013:07:02:08 +0000] [CGI] envp[30] = "HTTP_COOKIE=org.cups.sid=29e9320bd97f1e966030c83e05c7466a"
D [03/May/2013:07:02:08 +0000] [CGI] envp[31] = "HTTP_USER_AGENT=Mozilla/5.0 (X11; Linux i686; rv:18.0) Gecko/20100101 Firefox/18.0"
D [03/May/2013:07:02:08 +0000] [CGI] envp[32] = "REQUEST_METHOD=GET"
D [03/May/2013:07:02:08 +0000] [CGI] envp[33] = "QUERY_STRING="
D [03/May/2013:07:02:08 +0000] [CGI] Started /usr/local/lib/cups/cgi-bin/printers.cgi (PID 10849)
I [03/May/2013:07:02:08 +0000] Started "/usr/local/lib/cups/cgi-bin/printers.cgi" (pid=10849)
D [03/May/2013:07:02:08 +0000] cupsdSendCommand: 9 file=12
D [03/May/2013:07:02:08 +0000] Report: clients=1
D [03/May/2013:07:02:08 +0000] Report: jobs=2
D [03/May/2013:07:02:08 +0000] Report: jobs-active=1
D [03/May/2013:07:02:08 +0000] Report: printers=2
D [03/May/2013:07:02:08 +0000] Report: printers-implicit=0
D [03/May/2013:07:02:08 +0000] Report: stringpool-string-count=507
D [03/May/2013:07:02:08 +0000] Report: stringpool-alloc-bytes=7656
D [03/May/2013:07:02:08 +0000] Report: stringpool-total-bytes=11064
D [03/May/2013:07:02:08 +0000] [CGI] org.cups.sid cookie is "29e9320bd97f1e966030c83e05c7466a"
D [03/May/2013:07:02:08 +0000] cupsdAcceptClient: 15 from localhost (Domain)
D [03/May/2013:07:02:08 +0000] cupsdReadClient: 15 POST / HTTP/1.1
D [03/May/2013:07:02:08 +0000] cupsdAuthorize: No authentication data provided.
D [03/May/2013:07:02:08 +0000] cupsdReadClient: 15 1.1 CUPS-Get-Default 1
D [03/May/2013:07:02:08 +0000] CUPS-Get-Default
D [03/May/2013:07:02:08 +0000] CUPS-Get-Default client-error-not-found: No default printer
D [03/May/2013:07:02:08 +0000] Returning IPP client-error-not-found for CUPS-Get-Default (no URI) from localhost
D [03/May/2013:07:02:08 +0000] [CGI] show_printer(http=0xb8593a58, printer="Test")
D [03/May/2013:07:02:08 +0000] cupsdReadClient: 15 POST / HTTP/1.1
D [03/May/2013:07:02:08 +0000] cupsdAuthorize: No authentication data provided.
D [03/May/2013:07:02:08 +0000] cupsdReadClient: 15 1.1 Get-Printer-Attributes 1
D [03/May/2013:07:02:08 +0000] Get-Printer-Attributes ipp://localhost/printers/Test
D [03/May/2013:07:02:08 +0000] Returning IPP successful-ok for Get-Printer-Attributes (ipp://localhost/printers/Test) from localhost
D [03/May/2013:07:02:08 +0000] Script header: Content-Type: text/html;charset=utf-8
D [03/May/2013:07:02:08 +0000] Script header:
D [03/May/2013:07:02:08 +0000] [CGI] Regular expression ".*Clean.*"
D [03/May/2013:07:02:08 +0000] [CGI] Regular expression ".*PrintSelfTestPage.*"
D [03/May/2013:07:02:08 +0000] cupsdReadClient: 15 POST / HTTP/1.1
D [03/May/2013:07:02:08 +0000] cupsdAuthorize: No authentication data provided.
D [03/May/2013:07:02:08 +0000] cupsdReadClient: 15 1.1 Get-Jobs 1
D [03/May/2013:07:02:08 +0000] Get-Jobs ipp://localhost:631/printers/Test
D [03/May/2013:07:02:08 +0000] Returning IPP successful-ok for Get-Jobs (ipp://localhost:631/printers/Test) from localhost
D [03/May/2013:07:02:08 +0000] cupsdReadClient: 15 WAITING Closing on EOF
D [03/May/2013:07:02:08 +0000] cupsdCloseClient: 15
D [03/May/2013:07:02:08 +0000] cupsdSetBusyState: Printing jobs and dirty files
D [03/May/2013:07:02:08 +0000] PID 10849 (/usr/local/lib/cups/cgi-bin/printers.cgi) exited with no errors.
D [03/May/2013:07:02:08 +0000] cupsdReadClient: 9 GET /cups.css HTTP/1.1
D [03/May/2013:07:02:08 +0000] cupsdSetBusyState: Active clients, printing jobs, and dirty files
D [03/May/2013:07:02:08 +0000] cupsdAuthorize: Authorized as root using Basic
D [03/May/2013:07:02:08 +0000] cupsdSetBusyState: Printing jobs and dirty files
D [03/May/2013:07:02:08 +0000] cupsdReadClient: 9 GET /images/left.gif HTTP/1.1
D [03/May/2013:07:02:08 +0000] cupsdSetBusyState: Active clients, printing jobs, and dirty files
D [03/May/2013:07:02:08 +0000] cupsdAuthorize: Authorized as root using Basic
D [03/May/2013:07:02:08 +0000] cupsdSetBusyState: Printing jobs and dirty files
D [03/May/2013:07:02:08 +0000] cupsdReadClient: 9 GET /images/right.gif HTTP/1.1
D [03/May/2013:07:02:08 +0000] cupsdSetBusyState: Active clients, printing jobs, and dirty files
D [03/May/2013:07:02:08 +0000] cupsdAuthorize: Authorized as root using Basic
D [03/May/2013:07:02:08 +0000] cupsdSetBusyState: Printing jobs and dirty files
D [03/May/2013:07:02:08 +0000] cupsdReadClient: 9 GET /images/unsel.gif HTTP/1.1
D [03/May/2013:07:02:08 +0000] cupsdSetBusyState: Active clients, printing jobs, and dirty files
D [03/May/2013:07:02:08 +0000] cupsdAuthorize: Authorized as root using Basic
D [03/May/2013:07:02:08 +0000] cupsdSetBusyState: Printing jobs and dirty files
D [03/May/2013:07:02:08 +0000] cupsdReadClient: 9 GET /images/sel.gif HTTP/1.1
D [03/May/2013:07:02:08 +0000] cupsdSetBusyState: Active clients, printing jobs, and dirty files
D [03/May/2013:07:02:08 +0000] cupsdAuthorize: Authorized as root using Basic
D [03/May/2013:07:02:08 +0000] cupsdSetBusyState: Printing jobs and dirty files
D [03/May/2013:07:02:10 +0000] cupsdReadClient: 9 GET /admin HTTP/1.1
D [03/May/2013:07:02:10 +0000] cupsdSetBusyState: Active clients, printing jobs, and dirty files
D [03/May/2013:07:02:10 +0000] cupsdAuthorize: Authorized as root using Basic
D [03/May/2013:07:02:10 +0000] [CGI] argv[0] = "/usr/local/lib/cups/cgi-bin/admin.cgi"
D [03/May/2013:07:02:10 +0000] [CGI] envp[0] = "CUPS_CACHEDIR=/var/cache/cups"
D [03/May/2013:07:02:10 +0000] [CGI] envp[1] = "CUPS_DATADIR=/usr/local/share/cups"
D [03/May/2013:07:02:10 +0000] [CGI] envp[2] = "CUPS_DOCROOT=/usr/local/share/doc/cups"
D [03/May/2013:07:02:10 +0000] [CGI] envp[3] = "CUPS_FONTPATH=/usr/local/share/ghostscript/fonts"
D [03/May/2013:07:02:10 +0000] [CGI] envp[4] = "CUPS_REQUESTROOT=/var/spool/cups"
D [03/May/2013:07:02:10 +0000] [CGI] envp[5] = "CUPS_SERVERBIN=/usr/local/lib/cups"
D [03/May/2013:07:02:10 +0000] [CGI] envp[6] = "CUPS_SERVERROOT=/usr/local/etc/cups"
D [03/May/2013:07:02:10 +0000] [CGI] envp[7] = "CUPS_STATEDIR=/var/run/cups"
D [03/May/2013:07:02:10 +0000] [CGI] envp[8] = "HOME=/var/spool/cups/tmp"
D [03/May/2013:07:02:10 +0000] [CGI] envp[9] = "PATH=/usr/local/lib/cups/filter:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin"
D [03/May/2013:07:02:10 +0000] [CGI] envp[10] = "SERVER_ADMIN=root@box"
D [03/May/2013:07:02:10 +0000] [CGI] envp[11] = "SOFTWARE=CUPS/1.4.8"
D [03/May/2013:07:02:10 +0000] [CGI] envp[12] = "TMPDIR=/var/spool/cups/tmp"
D [03/May/2013:07:02:10 +0000] [CGI] envp[13] = "USER=root"
D [03/May/2013:07:02:10 +0000] [CGI] envp[14] = "CUPS_SERVER=/var/run/cups/cups.sock"
D [03/May/2013:07:02:10 +0000] [CGI] envp[15] = "CUPS_ENCRYPTION=IfRequested"
D [03/May/2013:07:02:10 +0000] [CGI] envp[16] = "IPP_PORT=631"
D [03/May/2013:07:02:10 +0000] [CGI] envp[17] = "AUTH_TYPE=Basic"
D [03/May/2013:07:02:10 +0000] [CGI] envp[18] = "LANG=en_US.UTF8"
D [03/May/2013:07:02:10 +0000] [CGI] envp[19] = "REDIRECT_STATUS=1"
D [03/May/2013:07:02:10 +0000] [CGI] envp[20] = "GATEWAY_INTERFACE=CGI/1.1"
D [03/May/2013:07:02:10 +0000] [CGI] envp[21] = "SERVER_NAME=localhost"
D [03/May/2013:07:02:10 +0000] [CGI] envp[22] = "SERVER_PORT=631"
D [03/May/2013:07:02:10 +0000] [CGI] envp[23] = "REMOTE_ADDR=127.0.0.1"
D [03/May/2013:07:02:10 +0000] [CGI] envp[24] = "REMOTE_HOST=localhost"
D [03/May/2013:07:02:10 +0000] [CGI] envp[25] = "SCRIPT_NAME=/admin"
D [03/May/2013:07:02:10 +0000] [CGI] envp[26] = "SCRIPT_FILENAME=/usr/local/share/doc/cups/admin"
D [03/May/2013:07:02:10 +0000] [CGI] envp[27] = "REMOTE_USER=root"
D [03/May/2013:07:02:10 +0000] [CGI] envp[28] = "SERVER_PROTOCOL=HTTP/1.1"
D [03/May/2013:07:02:10 +0000] [CGI] envp[29] = "HTTP_COOKIE=org.cups.sid=29e9320bd97f1e966030c83e05c7466a"
D [03/May/2013:07:02:10 +0000] [CGI] envp[30] = "HTTP_USER_AGENT=Mozilla/5.0 (X11; Linux i686; rv:18.0) Gecko/20100101 Firefox/18.0"
D [03/May/2013:07:02:10 +0000] [CGI] envp[31] = "HTTP_REFERER=http://localhost:631/printers/Test"
D [03/May/2013:07:02:10 +0000] [CGI] envp[32] = "REQUEST_METHOD=GET"
D [03/May/2013:07:02:10 +0000] [CGI] envp[33] = "QUERY_STRING="
D [03/May/2013:07:02:10 +0000] [CGI] Started /usr/local/lib/cups/cgi-bin/admin.cgi (PID 10850)
I [03/May/2013:07:02:10 +0000] Started "/usr/local/lib/cups/cgi-bin/admin.cgi" (pid=10850)
D [03/May/2013:07:02:10 +0000] cupsdSendCommand: 9 file=12
D [03/May/2013:07:02:10 +0000] [CGI] admin.cgi started...
D [03/May/2013:07:02:10 +0000] cupsdAcceptClient: 15 from localhost (Domain)
D [03/May/2013:07:02:10 +0000] [CGI] http=0xb81f9948
D [03/May/2013:07:02:10 +0000] [CGI] org.cups.sid cookie is "29e9320bd97f1e966030c83e05c7466a"
D [03/May/2013:07:02:10 +0000] [CGI] No form data, showing main menu...
E [03/May/2013:07:02:10 +0000] [CGI] smbclient not found!
E [03/May/2013:07:02:10 +0000] [CGI] rpcclient not found!
D [03/May/2013:07:02:10 +0000] cupsdReadClient: 15 POST / HTTP/1.1
D [03/May/2013:07:02:10 +0000] cupsdAuthorize: No authentication data provided.
D [03/May/2013:07:02:10 +0000] cupsdReadClient: 15 1.1 Get-Subscriptions 1
D [03/May/2013:07:02:10 +0000] Get-Subscriptions ipp://localhost/
D [03/May/2013:07:02:10 +0000] Get-Subscriptions client-error-not-found: No subscriptions found.
D [03/May/2013:07:02:10 +0000] Returning IPP client-error-not-found for Get-Subscriptions (ipp://localhost/) from localhost
D [03/May/2013:07:02:10 +0000] Script header: Content-Type: text/html;charset=utf-8
D [03/May/2013:07:02:10 +0000] Script header:
D [03/May/2013:07:02:10 +0000] cupsdReadClient: 15 WAITING Closing on EOF
D [03/May/2013:07:02:10 +0000] cupsdCloseClient: 15
D [03/May/2013:07:02:10 +0000] cupsdSetBusyState: Printing jobs and dirty files
D [03/May/2013:07:02:10 +0000] PID 10850 (/usr/local/lib/cups/cgi-bin/admin.cgi) exited with no errors.
D [03/May/2013:07:02:13 +0000] cupsdReadClient: 9 GET /admin/log/error_log HTTP/1.1
D [03/May/2013:07:02:13 +0000] cupsdSetBusyState: Active clients, printing jobs, and dirty files
D [03/May/2013:07:02:13 +0000] cupsdAuthorize: Authorized as root using Basic
[EDIT]: Added code tags. Rich
-
text2lp0 requires no drivers... what could be the reason if it is not working?
Should i change the system and try to install in other PC
-
Hi Shyam24689
You've verified that the printer responds to a line feed with:
echo -ne \\f > /dev/lp0
If you execute it twice, does it respond the second time?
If it does, try:
cat - /dev/lp0
then type some text, press enter, and Ctrl Z. Did it print what you typed?
-
Executing line feed twice or thrice responds every time..
But cat - /dev/lp0 "text" Enter and ctrl Z gives no print...
-
Hi Shyam24689
Maybe your printer wants a CR/LF sequence:
cp .xsession testfile
unix2dos testfile
cat testfile > /dev/lp0
-
It hanged... then ctrl Z sudo echo -ne \\f > /dev/lp0 gives device or resource busy
-
Hi Shyam24689
Is there a link to some documentation for your printer you could post?
-
http://forum.tinycorelinux.net/index.php?action=post2;start=15;board=15 (http://forum.tinycorelinux.net/index.php?action=post2;start=15;board=15) but it doesn't contain driver
-
attached file is the driver
-
my apols, I forgot to mention that you need to click on the LPD radio button as your debug is claiming IPP address and thats not right for a parallel printer
(http://ompldr.org/vaWFzMQ/lpd.jpg)
-
what url to add at connection after selecting lpd
-
i gave the address lpd://192.168.0.80/queue and then test print it shows status Connecting to printer and hangs...
The attachment provided previously consist of amt_tif.ppd file please have a look
-
sorry if its trivial but when I unpack the readme says read the web pages but they are zero byte
2) your rastertolabel.....pls don't use it. cups already has one. If I run
strings rastertolabel
against yours, I see strings like....__i686.get_pc_thunk.bx, making me think someone compiled not against our 486 recommendation
---/usr/lib/gcc/i486-linux-gnu/4.4.3/include also found......but our structure differs from......GCC: (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3
short answer....try our rastertolabel
3) So its a label printer? that other link is not working for me. We could look at making our own PPD based on your PPD but for the moment your other question
4) what address....I don't know as I don't own a parallel printer
try
sudo lpinfo -v
192.168.0.80 looks like your ethernet address and that can't be right surely?
You may also wish to review
/usr/local/share/doc/cups/help/man-cups-lpd.html
also I just tried
lpstat -v
device for EPSON_Stylus_TX100: usb://EPSON/Stylus%20TX100
You may be able to get something going using lpstat? try the web page for it?
-
Googling for AM Tech printers returns kiosk and POS printers.
-
first i tried with rastertolabel which already exist but i dint helped....
I think the only way out.. is to make our own ppd but how?
I there any generic driver for parallel port printing which can used to print .ps file to any parallel port connected printer?
-
AMtech is a kiosk Thermal printer
-
yeah I wanted to avoid making a PPD as I have zero success and making one for an USB printer
before start process Juanito when his timezone comes up may wish to solve my misleading bit?
but I found this thru google with 12 hits on that page for parallel
http://www.cups.org/doc-1.1/sam.html
lpinfo -v ENTER
network socket
network http
network ipp
network lpd
direct parallel:/dev/lp1
serial serial:/dev/ttyS1?baud=115200
serial serial:/dev/ttyS2?baud=115200
direct usb:/dev/usb/lp0
network smb
so maybe based on your result for /dev/lp0, you could try to input
parallel:/dev/lp0
Then look at running wine and installing the windows driver?
-
ahhh just looking at your PPD
it was (MAY HAVE BEEN) generated using a gutenprint model 49 as per
usr/local/share/gutenprint/5.2/xml/escp2/model/model_49.xml
we could do it......I will try to reply tonite with a PPD for cups 1.4.8
In the meantime I will let Rich and Juanito give you better advice
Can you do me a favour, as I will generate a potential PPD.....I need to know what number your dimensions are in your PPD you uploaded
I am guessing but as you would know the effective printing area look at your PPD and tell me the number please
eg ImageableArea 11./Label - 72x72mm:......means you can print 72 mm across and the true size of it may be 79 mm not showing in specs
get it?
Measure your width.....go to size closest to it ......tell me the number please or your size what ever suits
-
Is it a problem because AMtech is a customized Thermal printer? What should i try at my side
-
I just editted my last
-
72 X 297mm
-
Have you checked for possible parport options in your BIOS?
-
Good one tinypoodle
In the mean time I have hit a brick wall....again
tce-load -i cups cups-dev
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
// 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
-
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
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
-
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
// 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
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)
-
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:
lsmod
under 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.
-
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.
-
Barcode label printers often speak a special printer control language and will not print ascii text.
-
Not sure if OP is still attempting my way but
what url to add at connection after selecting lpd
found http://www.cups.org/documentation.php/network.html section Line Printer Daemon (LPD) Protocol
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