Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Printer Epson L132
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
ilya1966616
n00b
n00b


Joined: 14 Jul 2017
Posts: 5

PostPosted: Fri Jul 14, 2017 9:33 am    Post subject: Printer Epson L132 Reply with quote

I have printer Epson L132. I downloaded from this page http://download.ebz.epson.net/dsc/du/02/DriverDownloadInfo.do?LG2=EN&CN2=&DSCMI=34541&DSCCHK=141ba614c212ead0099d27f8dc8f2bc35faf7781 epson-inkjet-printer-201401w-1.0.0-1lsb3.2.x86_64.rpm, converted it to tar.gz using `rpm2targz`, unpacked and copied to /opt/epson-inkjet-printer-201401w/. However printer doesn't work. There is also epson-inkjet-printer-201401w-1.0.0-1lsb3.2.src.rpm on the above page which contains source code for /opt/epson-inkjet-printer-201401w/cups/lib/filter/epson_inkjet_printer_filter. I downloaded it and modified source code so it includes code saving debug info into file, ran `make` within src folder and copied newly compiled file "epson_inkjet_printer_filter" to /opt/epson-inkjet-printer-201401w/cups/lib/filter/. I also created folder debug with 777 access mode within that folder for storing debug file. Function load_core_library() on line 163 of file "src/raster_to_epson.c" was modified to included debug info:

Code:

static int load_core_library (HANDLE * handle)
{
   debuglog(("TRACE IN"));
   
   FILE *f = fopen("/opt/epson-inkjet-printer-201401w/cups/lib/filter/debug/load_core_library.txt", "w");
   
   HANDLE lib_handle = NULL;
   int error = 1;
   ppd_attr_t * attr = NULL;
   EPS_RES_FUNC resFunc;
   char library [PATH_MAX];

   do {
      attr = get_ppd_attr ("epcgCoreLibrary", 1);
      if (attr == NULL) {
         fprintf(f, "get_ppd_attr is NULL\n");
         break;
      }
      fprintf(f, "library: %s/%s\n", CORE_LIBRARY_PATH, attr->value);
      snprintf(library, sizeof(library), "%s/%s", CORE_LIBRARY_PATH, attr->value);
      lib_handle = dlopen(library, RTLD_NOW /*, RTLD_LAZY*/);
      if (lib_handle == NULL) {
         debuglog(("Failed to dlopen(%s)->%s", attr->value, dlerror()));
         fprintf(f, "Failed to dlopen(%s)->%s\n", attr->value, dlerror());
         fprintf(f, "dlerror: |%s|\n", dlerror());
         break;
      }

      /* Setting of library function */
      epcgInitialize = (EPCGInitialize) dlsym (lib_handle, "epcgInitialize");
      epcgRelease = (EPCGRelease) dlsym (lib_handle, "epcgRelease");
      epcgGetVersion = (EPCGGetVersion) dlsym (lib_handle, "epcgGetVersion");
      epcgSetResource = (EPCGSetResource) dlsym (lib_handle, "epcgSetResource");
      epcgGetOptionList= (EPCGGetOptionList) dlsym (lib_handle, "epcgGetOptionList");
      epcgGetChoiceList= (EPCGGetChoiceList) dlsym (lib_handle, "epcgGetChoiceList");
      epcgSetPrintOption= (EPCGSetPrintOption) dlsym (lib_handle, "epcgSetPrintOption");
      epcgGetPageAttribute= (EPCGGetPageAttribute) dlsym (lib_handle, "epcgGetPageAttribute");
      epcgStartJob= (EPCGStartJob) dlsym (lib_handle, "epcgStartJob");
      epcgStartPage= (EPCGStartPage) dlsym (lib_handle, "epcgStartPage");
      epcgRasterOut= (EPCGRasterOut) dlsym (lib_handle, "epcgRasterOut");
      epcgEndPage= (EPCGEndPage) dlsym (lib_handle, "epcgEndPage");
      epcgEndJob= (EPCGEndJob) dlsym (lib_handle, "epcgEndJob");

      if (epcgInitialize == NULL
         || epcgRelease == NULL
         || epcgGetVersion == NULL
         || epcgSetResource == NULL
         || epcgGetOptionList == NULL
         || epcgGetChoiceList == NULL
         || epcgSetPrintOption == NULL
         || epcgGetPageAttribute == NULL
         || epcgStartJob == NULL
         || epcgStartPage == NULL
         || epcgRasterOut == NULL
         || epcgEndPage == NULL
         || epcgEndJob == NULL) {
         debuglog(("Failed to dlsym"));
         fprintf(f, "Failed to dlsym\n");
         break;
      }

      resFunc.size = sizeof(EPS_RES_FUNC);
      resFunc.memAlloc = memAlloc;
      resFunc.memFree = memFree;
      resFunc.getLocalTime = getLocalTime;
      resFunc.resOpen = resOpen;
      resFunc.resRead = resRead;
      resFunc.resSeek = resSeek;
      resFunc.resClose= resClose;
      
      debuglog(("Model name : %s", PPD->modelname));

      error = epcgInitialize (PPD->modelname, &resFunc);
      if (error) {
         fprintf(f, "epcgInitialize() failed\n");
         break;
      }

   } while (0);

   if(error && lib_handle) {
      dlclose (lib_handle);
      lib_handle = NULL;
   }

   *handle = lib_handle;
      
   debuglog(("TRACE OUT=%d", error));

   return error;
}


Now after trying to print test page from cupsd web interface (localhost:631) I have this:

Code:

# cat /opt/epson-inkjet-printer-201401w/cups/lib/filter/debug/load_core_library.txt
library: /opt/printer/lib64/libEpson_201401w.so.1.0.0
Failed to dlopen(libEpson_201401w.so.1.0.0)->(null)
dlerror: |(null)|


As you can see dlerror doesn't provide any information and returns null. Please advice on how to use this printer.[/url]
Back to top
View user's profile Send private message
gerard27
Advocate
Advocate


Joined: 04 Jan 2004
Posts: 2377
Location: Netherlands

PostPosted: Fri Jul 14, 2017 12:33 pm    Post subject: Reply with quote

Hi ilya1966616,
Had similar problem with Epson XP-750.
Epson uses "lsb" which Gentoo doesn't use.
To make Gentoo compatible you need to run as root
Code:

ln -sf /lib64/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3

This will make Gentoo lsb3.2 compatible.
Good luck.
Gerard.
_________________
To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download
Back to top
View user's profile Send private message
ilya1966616
n00b
n00b


Joined: 14 Jul 2017
Posts: 5

PostPosted: Fri Jul 14, 2017 11:35 pm    Post subject: Reply with quote

Unfortunately it didn't help. What other things I can do to make system lsb compliant? By editing source code of filter itself I discovered that the function that fails is "epcgStartJob". But I cannot debug further because this function is from dynamically loaded shared library for which no source code available.
Back to top
View user's profile Send private message
ilya1966616
n00b
n00b


Joined: 14 Jul 2017
Posts: 5

PostPosted: Fri Jul 14, 2017 11:37 pm    Post subject: Reply with quote

I installed debian in VirtualBox and successfully printed from it. However it is inconvinient this way and I cannot install debian as main system because for some reason it has issues with my hardware during installation and shows disk access related errors.
Back to top
View user's profile Send private message
gerard27
Advocate
Advocate


Joined: 04 Jan 2004
Posts: 2377
Location: Netherlands

PostPosted: Sat Jul 15, 2017 6:03 pm    Post subject: Reply with quote

I used the debian file and unpacked it with deb2targz.
I first tried to install it using rpm directly but it failed.
After having installed the printer in cups it wouldn't print.
I forgot what error it threw.
I then googled and found the lsb3.2 thing.
After that it printed OK.
Sorry I can't tell you more.
Gerard.
_________________
To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download
Back to top
View user's profile Send private message
ilya1966616
n00b
n00b


Joined: 14 Jul 2017
Posts: 5

PostPosted: Mon Jul 17, 2017 11:02 pm    Post subject: Reply with quote

gerard27 wrote:

I then googled and found the lsb3.2 thing.
After that it printed OK.
Sorry I can't tell you more.
Gerard.


Can you tell what exactly you found when googling? The script to make system lsb3.2 compliant or what? Did you save URL?
Back to top
View user's profile Send private message
grumblebear
Apprentice
Apprentice


Joined: 26 Feb 2008
Posts: 202

PostPosted: Tue Jul 18, 2017 7:48 am    Post subject: Reply with quote

Messing around with those legacy epson drivers will be painfull, I guess.
Have an eye on gutenprint (gimp-print). Maybe there will be support for your printer in its next release. From your link I conclude that L132 and L310 could be compatible to some degree and support for L310 seems to be coming.
Back to top
View user's profile Send private message
gerard27
Advocate
Advocate


Joined: 04 Jan 2004
Posts: 2377
Location: Netherlands

PostPosted: Tue Jul 18, 2017 10:26 am    Post subject: Reply with quote

Hi ilya1966616,
I did not save the URL of this forum post.
As I remember I managed to make cups see my printer.
But when I sent a print command I got a cups error,forgot what it was.
And then after installing the link it printed OK.
The link concerns ld (load) which should be compatible with the software it loads!
I have the latest gutenprint installed also and checked the xml file of supported printers but no XP-750
or L132 or L310.

Maybe you should clean all of cups and start over again.

Gerard.

Edit:
grumblebear,these are NOT legacy drivers,far from it.
Epson used to have a website with nonWindows software but it was discontinued.
_________________
To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download
Back to top
View user's profile Send private message
ilya1966616
n00b
n00b


Joined: 14 Jul 2017
Posts: 5

PostPosted: Mon Jul 24, 2017 6:26 pm    Post subject: Reply with quote

grumblebear wrote:
Messing around with those legacy epson drivers will be painfull, I guess.
Have an eye on gutenprint (gimp-print). Maybe there will be support for your printer in its next release. From your link I conclude that L132 and L310 could be compatible to some degree and support for L310 seems to be coming.


gutenprint is the solution. After emerging it select "Epson L210 - CUPS+Gutenprint v5.2.12 (color)" as the driver.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum