Tiny Core Linux
Tiny Core Extensions => TCE Q&A Forum => Topic started by: Yleisajattelija on February 17, 2012, 04:38:31 AM
-
Samsung has multifunction printer/scanner Linux driver pack including only few distros. TC is missing, of course.
It is well known problem with Linux that distros uses many file formats and it is impossible to install driver by standard manner. I had lot of troubles to install CUPS-driver to TC, and it is still crude "all lib stuff persistence" version, because I haven't found yet all files attached by CUPS/Ghostscript filters and config files.
Samsung install script should be modified to TC-style script to make valid TC-extension.
Should have specification for TC -CUPS system file structure, is there any?
-
Should have specification for TC -CUPS system file structure, is there any?
the cups extension file structure is that created by ./configure --prefix=/usr/local - you can look at the extension .list file to see the full details
-
Didn't found much from FHS_3.0 (draft) or CUPS.org, either.
Up to TC, I think.
-
I think that /usr/local is part of the problem. My TC CUPS thinks that rastertosamsungs.plc raster file path should be at /usr/lib, not /usr/local/lib.
One part of the problem is local/shared printer, both seems to use their own config files.
How are those CUPS vars handled? cupsd.conf should be configured, but where?
-
/usr/local/etc/cups/cupsd.conf
-
HI: Hope this fits in here-
I am trying for month to hook up a Samsung SCX-4521F MF to my TC 3.8.4
I used a "SCX4521.ppd" from the openprinting.org website to install the printer. It never worked. The best result was a completed
print job generating an empty page - error message in the log file.
Question: Is the .ppd file enough to install a printer or do I also need an additional driver?
During the cups configuration procedure (localhost:631) the software asks to select a printer from a menu or down under the menu you may select a space where the apropriate .ppd file is located.
I discovered that the printer manufacturers listed in the menu are generated by: gutenprint.tcz and/or hplip2.x.tcz. If you do not install gutenprint or hplip there are only one or two printer brands to select from.
-
Maybe this is what you're looking for?
http://splix.ap2c.org/ (http://splix.ap2c.org/)
-
.ppd driver is not enough, CUPS daemon must started (see TC FAQ, for help) and lot of other things, too. Big problem is library locations, because TC CUPS installation point is "/usr/local" instead of "/usr" for many distroes. For that reason, Samsung Unified Driver installer loads libraries and raster files to wrong directory.
I try to document Samsung unified driver installation when sane part is done, unfortunately THAT will take some time.
-
Big problem is library locations, because TC CUPS installation point is "/usr/local" instead of "/usr" for many distroes. For that reason, Samsung Unified Driver installer loads libraries and raster files to wrong directory.
Most installers are smart enough to figure that out, but if not, I suspect simply moving the relevent files under /usr/local will work
-
HI: I have a Samsung MF 4521F and I am still trying to hook it to my TCL 3.8.4 system.
I have the .ppd for this machine and the newest cups 1.44 running. With ghostscript, ghostcript_common and foomatic-rip on boot the install procedure in localhost:631 works OK.
But I am getting filter errors such as"job stopped due to filter errors"
There is only one foomatic-rip (binary) at the TCL 3.X repo which does not need Perl any more. It is not very new and I think it might work only with the cups 1311
The CD which came with the MultiFunction has two Linux drivers. The Unified and another one. There is also an install script.
The scripts start but crash with error messages.
This Samsung MF supports only the Samsung Page Description Language SPL. No other printer languages supported. This is no good. Next time I am going to buy a printer or MF I will take a closer look at the specs or move to HP, Canon or Epson.
I looked at splix and will try to install it. But into which location (folder) do I need to install this drivers?
-
I looked at splix and will try to install it. But into which location (folder) do I need to install this drivers?
If you compile it with "--prefix=/usr/local" I believe it will put the files in the correct place
-
Last night I digged TC7Sane internals.
a) Bourne shell seems to be good choise, bash generates "mentally invalid" installation scipts
b) usbfs is valid for udev systems
c) sane-find-scanner finds CLX-3185, -> usbfs is alive
d) scanimage -L won't find CLX-3185, conflicting/missing udev rules suspected
e) Unified Linux driver tries to install 98 and 99 rules, there seems to be TC staff on 98, sane default is 65
f) There is sane scripts tools/udev directory, which probably can be used to re-installs rules for sane
What is TC strategy for maintaining udev-rules? Rules update needs some sort of state-machine to be stable (Xorg crashes are probably due this same problem).
-
Okay, NOW I see, this "/usr/local" installation point is for PPI method.
Anyway, SANE/CUPS extension maintainer should notice these numerous side effects when changing installation point and at least set those file-location vars correctly.
Of course, if EVERYONE other distros are using "/usr" installation point, coders may hardcode some of those library directories. That's ALSA problem.
Hmm... who is SANE extension maintainer?
-
Hi Yleisajattelija
Hmm... who is SANE extension maintainer?
Read the Info tab in AppBrowser.
-
Okay, SANE maintainer seems to be Jason W.
-
Anyway, SANE/CUPS extension maintainer should notice these numerous side effects when changing installation point and at least set those file-location vars correctly.
Are some of the cups vars set incorrectly?
Of course, if EVERYONE other distros are using "/usr" installation point, coders may hardcode some of those library directories. That's ALSA problem.
PPI or not, I think there's a certain logic to the base being in /usr and all extensions being in /usr/local
Even if /usr is hardcoded in some cases, it's usually not a big deal to symlink to /usr/local. I saw this once with a lexmark driver for cups - which was only available in a deb - and the error messages made it reasonably easy to make a symlink fix.
-
I'm not sure for CUPS, at least UnifiedLinuxDriver installer uses wrong directory. When correcting those (cp files to correct dir + force static by filetools.lst) CUPS works OK.
My SANE won't work at all at this moment, but I'm not sure, if it is this /usr/local -lib problem or udev.rules related issue. There is another SANE discussion thread (should found by searching with "sane"), where SANE works by dir correction procedure.
-
If you got things to work with cups after the UnifiedLinuxDriver installed to /usr by copying files to /usr/local, then you should be able make an extension and be good to go without resorting to filetool.lst and backup/restore.
I'd also guess that your sane woes are more likely due to /usr vs /usr/local than udev...
-
If you got things to work with cups after the UnifiedLinuxDriver installed to /usr by copying files to /usr/local, then you should be able make an extension and be good to go without resorting to filetool.lst and backup/restore.
Yes, that's the goal.
I agree with TC frugal installation PPI-method, no doubt of that.
Gobolinux approach may be theoretically better, but it is impossible recode all unix code written from golden -70:ies. Gobolinux alias/link -system is horrible mess, ever worse than scattered "traditional" linux
It is solid idea to limit "basic TC pack" to minimum and isolate code as much as possible to extensions. Also it looks good trade-off to put border between "/usr" and "usr/local" directories, that gives maximum compatibility with "industry standard unix" and still makes isolation effective.
-
tc@box:~$ sane-find-scanner
# sane-find-scanner will now attempt to detect your scanner. If the
# result is different from what you expected, first make sure your
# scanner is powered up and properly connected to your computer.
# No SCSI scanners found. If you expected something different, make sure that
# you have loaded a kernel SCSI driver for your SCSI adapter.
found USB scanner (vendor=0x04e8 [Samsung Electronics Co., Ltd.], product=0x343d [CLX-3180 Series]) at libusb:002:004
# Your USB scanner was (probably) detected. It may or may not be supported by
# SANE. Try scanimage -L and read the backend's manpage.
# Not checking for parallel port scanners.
# Most Scanners connected to the parallel port or other proprietary ports
# can't be detected by this program.
# You may want to run this program as root to find all devices. Once you
# found the scanner devices, be sure to adjust access permissions as
# necessary.
tc@box:~$ scanimage -L
No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).
tc@box:~$
-
Contents of file "/usr/local/etc/sane.d/dll.conf" (trying to use that xerox_mfp driver)
# enable the next line if you want to allow access through the network:
net
abaton
agfafocus
apple
avision
artec
artec_eplus48u
as6e
bh
canon
canon630u
canon_dr
#canon_pp
cardscan
coolscan
#coolscan2
coolscan3
#dc25
#dc210
#dc240
dell1600n_net
dmc
epjitsu
#epson
epson2
fujitsu
#gphoto2
genesys
gt68xx
hp
hp3900
hpsj5s
hp3500
hp4200
hp5400
hp5590
hpljm1005
hs2p
ibm
kodak
kvs1025
kvs20xx
leo
lexmark
ma1509
magicolor
matsushita
microtek
microtek2
mustek
#mustek_pp
mustek_usb
mustek_usb2
nec
niash
#p5
pie
pint
pixma
plustek
#plustek_pp
#pnm
qcam
ricoh
rts8891
s9036
sceptre
sharp
sm3600
sm3840
snapscan
sp15c
#st400
#stv680
tamarack
teco1
teco2
teco3
#test
u12
umax
#umax_pp
umax1220u
v4l
xerox_mfp
-
# Edit: this part is added to original xerox_mfp.conf file, CLX-3175 driver should be same than CLX-3185
#Samsung CLX-3185
#usb 0x04e8 0x343d
#end of edit
#xerox_mfp.conf
#Xerox Phaser 3200MFP
usb 0x0924 0x3da4
#Dell MFP Laser Printer 1815dn
usb 0x413c 0x5124
#Xerox Phaser 6110MFP
usb 0x0924 0x3d5d
#Samsung CLX-3170fn & CLX-3175FW
usb 0x04e8 0x342a
#Samsung SCX-4200
usb 0x04e8 0x341b
#Samsung SCX4725-FN
usb 0x04e8 0x341f
#Samsung SCX-4500
usb 0x04e8 0x3426
# Samsung SCX-4500W
usb 0x04e8 0x342b
# Samsung SCX-4824
usb 0x04e8 0x342c
# Samsung SCX-4300
usb 0x04e8 0x342e
# Samsung SCX-4600
usb 0x04e8 0x3433
#Samsung CLX-3185
usb 0x04e8 0x343d
#Xerox WorkCentre 3119 Series
usb 0x0924 0x4265
#Samsung SCX-4623
usb 0x04e8 0x3434
# Samsung SCX-4825FN
usb 0x04e8 0x343c
#Xerox WorkCentre 4118 Series
usb 0x0924 0x420c
#Xerox WorkCentre 3210
usb 0x0924 0x4293
#Xerox WorkCentre 3220
usb 0x0924 0x4294
# Samsung SCX-4500W, network mode
# tcp HOST_ADDR PORT
# Uncomment and configure:
#tcp scx4500 9400
-
Installed sane packages:
xsane.tcz
sane-backends.tcz
sane-backends-dev.tcz
Edit: libusb.tcz
Missing something?
-
$ sane-find-scanner
found USB scanner (vendor=0x04e8 [Samsung Electronics Co., Ltd.], product=0x343d [CLX-3180 Series]) at libusb:002:004
This might be helpful: http://ubuntuforums.org/showthread.php?t=341621&page=83
$ scanimage -L
No scanners were identified.
Hmm - I get:$ scanimage -L
device `hpaio:/usb/OfficeJet_G85?serial=SGG13E0C49VL' is a Hewlett-Packard OfficeJet_G85 all-in-one
Contents of file "/usr/local/etc/sane.d/dll.conf" (trying to use that xerox_mfp driver)
# enable the next line if you want to allow access through the network:
net
abaton
agfafocus
...
xerox_mfp
It might be better to comment out or delete everything except "xerox_mfp", all I have is: $ cat /usr/local/etc/sane.d/dll.conf
hpaio
net
# Edit: this part is added to original xerox_mfp.conf file, CLX-3175 driver should be same than CLX-3185
#Samsung CLX-3185
#usb 0x04e8 0x343d
#end of edit
Shouldn't it look like this (i.e. delete the "#" before "usb") # Edit: this part is added to original xerox_mfp.conf file, CLX-3175 driver should be same than CLX-3185
#Samsung CLX-3185
usb 0x04e8 0x343d
#end of edit
-
I added first that added text on "xerox_mfp.conf file for comment, active text without "#" is later on file.
I have read those SamsungUnifiedLinux ubuntu discussion threads, but remember, debian use "/usr" installation point.
xerox_mfp is part of standard sane package, should work "out of the box".
I don't know, how to find out if sane-backend finds and reads that xerox_mfp.conf file at all. That would be logical consequence for "/usr/local" installation point.
-
SamsungUnifiedLinuxDriver installer adds twos files at "etc/udev/rules.d/" directory
a) 98_smfpautoconf_samsung.rules
# This file is a part of Unified Linux Driver
# Rules to allow low level USB device access for smfpautoconf
SUBSYSTEM!="usb_device", GOTO="label_end"
ACTION!="add", GOTO="label_end"
ATTRS{idVendor}=="0419", MODE="0666"
ATTRS{idVendor}=="04e8", MODE="0666"
ATTRS{idVendor}=="0924", MODE="0666"
ATTRS{idVendor}=="413c", MODE="0666"
LABEL="label_end"
b) 99_smfpautoconf_samsung.rules
# This file is a part of Unified Linux Driver
# Rules to allow low level USB device access for smfpautoconf
SUBSYSTEM!="usb", GOTO="label_end"
ACTION!="add", GOTO="label_end"
ATTRS{idVendor}=="0419", MODE="0666"
ATTRS{idVendor}=="04e8", MODE="0666"
ATTRS{idVendor}=="0924", MODE="0666"
ATTRS{idVendor}=="413c", MODE="0666"
LABEL="label_end"
I don't know if these are needed without network scanner SANE-server "saned".
Thas miserable SANE-documentation says, that SANE-default directories may be changed by settin variables, but these variables should export at compile time.
-
I have read those SamsungUnifiedLinux ubuntu discussion threads, but remember, debian use "/usr" installation point.
OK, but on my machine sane is reading files from /usr/local/etc/sane.d - note also, by default, tinycore will load libs from both /usr/lib and /usr/local/lib
I don't know, how to find out if sane-backend finds and reads that xerox_mfp.conf file at all. That would be logical consequence for "/usr/local" installation point.
To double-check you can make a symlink from /etc/sane.d -> /usr/local/etc/sane.d, but I don't think that is the issue..
Edit: you could also double-check: $ ldd /usr/local/lib/sane/libsane-xerox_mfp.so
.. to be sure you're not missing anything
-
SamsungUnifiedLinuxDriver installer adds twos files at "etc/udev/rules.d/" directory
If these two files are in place you can do the following:$ sudo udevadm trigger
$ sudo udevadm monitor
..and then plug your scanner in to see what you get
-
I think easiest way is to recompile SANE source.
To do that, I need to know "tc specalities", this /usr/local installation point and others.
There is some discussion for udev.rules (defaults should be OK), anything else need to be known?
-
See http://distro.ibiblio.org/tinycorelinux/3.x/tcz/src/sane-backends/sane-backends.tcbuild
You can also get the standard tc cflags/cxxflags from the extension making section of the wiki
-
I'm not familiar with bash (should be ash on TC?) -scripting, but if I read correctly, those SANE dirs are exported.
Hmm, normally extension maintainer should comment. Is this distro-community-internal-discussion-stuff-related issue?.
-
Hi Yleisajattelija
Yes, TC uses ash since it is part of busybox, however, there is a bash extension you can install. If you plan on
compiling, be sure to install the compiletc extension.
-
BusyBox is great and ash is great, too.
I digged SANE histrory and seems that origin of that bash script is RedHat. I strogly agree that scripting should be just simple maintenance tasks, use C if complexity needed.
JasonW is obviously overloaded because of so many extensions maintenace, so I suppose SANE upadate takes some time.
I'm very slow coder, for me it will take months to rewrite that script (if it works at all).
Is there timetable for SANE update?
-
Hi Yleisajattelija
As I said, you can install bash.tcz. You should then be able to run the script.
-
As I said, you can install bash.tcz. You should then be able to run the script.
Sorry, I prefer ash, I will try to convert that "bashism" stuff to reasonable code. There was dicsussion thread for shell scripting versus AWK. Seems to me, that ash is correct tool for system maintenance, but it is not a parser tool.
As system like TC, tool chain is important thing. Minimizing tools is important, use simple tools and as few as possible. Obviously shell script language is needed but is AWK really needed or is better to just use C if arthmetic is concerned?
I prefer C, but there is some point to use AWK. No need for compiling most important.
-
Hi Yleisajattelija
While it makes sense to use ash for TC scripts since it is part of busybox, the same is not necessarily true of a
package you wish to compile. Rather than fight with the package, I'd recommend you install the bash extension.
It's only needed to build the package, not for the final extension. Awk is also a part of busybox and can be called
from a script.
-
Hi Yleisajattelija,
if you don't like to install bash.tcz you can try to modify the building script(s).
I did compile several packages e. g. from git-repositories, where scripts normally have the
#/bin/bash shebang
Changing these lines to
#/bin/sh
did work.
Maybe it is even enough to do this only in the 'configure' script.
Together with 'compiletc' - as Rich stated - the compilation should be possible.
regards
xyz-worx
-
Hi Yleisajattelija,
if you don't like to install bash.tcz you can try to modify the building script(s).
I did compile several packages e. g. from git-repositories, where scripts normally have the
#/bin/bash shebang
Changing these lines to
#/bin/sh
did work.
...which is an indication that they are wrongly declared in header in the first place.
Would be a good idea to report such uptime so it can get fixed.
-
The point is, bash is "evil code". I like to get rid of it. It it good example of "unix disease", unnecessary complexity is ruining everything.
Awk is indeend part of the basebox, so let it be default, if ash won't be solution.
a) busybox (not gnu-utils)
b) compiletc.tcz (not c++)
c) ash (not bash)
d) awk (not gawk) only lethal cases, when need to heavy string processing or/and arithmetic
e) nothing else .
-
Sane backends source README file says (sorry for long listing):
Where can i find those "TC PPI-compatibility" rules for sane libs and udev rule files?
---------------------------------------------
Read the file README and this file.
Install missing development packages with your prefered package manager:
libusb-dev
Search the location where your system installed libsane.so.1.
Each distribution uses different folders for the libraries.
Here are some examples from 64 bit Ubuntu 10.04. For the installation process
you need to replace /usr/lib with the folder detected on your system.
$ sudo find / -name libsane.so.1
/usr/lib/libsane.so.1
/usr/lib is the folder we are looking for.
Be careful on 64 bit systems, if you already installed 32 bit compatibility
libraries, e.g. the package ia32-libs:
$ sudo find / -name libsane.so.1
/usr/lib/libsane.so.1
/usr/lib32/libsane.so.1
This response contains 2 folders: (1) /usr/lib32 is the location of the
32 bit compatibility libraries. (2) /usr/lib is the folder we are looking
for.
Be careful, if you already compiled and installed new SANE backend:
$ sudo find / -name libsane.so.1
/usr/lib/libsane.so.1
/usr/local/lib/libsane.so.1
/home/user/src/sane-backends/backend/.libs/libsane.so.1
This response contains 3 folders: (1) /usr/local/lib is the location of
installed new SANE backend. (2) /home/user/src/sane-backends/backend/.libs
is the location of compiled new SANE backend in the source tree.
(3) /usr/lib is the folder we are looking for.
Decide where you want to install new libsane.
You can set symbolic links to new libsane.
I assume that new libsane version 1.0.23 will be installed to
/usr/local/lib and your system installed libsane.so.1 to /usr/lib.
$ cd /usr/lib
$ sudo ln -sf /usr/local/lib/libsane.so.1.0.23 libsane.so.1
$ sudo ln -sf /usr/local/lib/sane/libsane.la libsane.la
$ cd -
Alternatively you can overwrite standard libsane.
Then you need to do some extra configuration for latest SANE backend:
$ ./configure --libdir="/usr/lib"
You also can replace the binaries, configuration, manuals, translations, etc.
of your distribution. For more information please read:
$ ./configure --help
Configure, make and install latest SANE backend.
$ ./configure [with your options defined above]
$ make && sudo make install
Use the scanner with normal user rights.
This only works if udev is installed. Please note that historically not all
of the distributions have used the same format for the udev rules file.
Copy udev rules file:
$ sudo cp tools/udev/libsane.rules /etc/udev/rules.d
Reconnect your scanner to the USB bus to activate the new rules file.
Your user must be a member of the group scanner. Please use the system tools
to check, if this group exists, if needed create this group and join this
group. After this you must logoff and login again.
Test your scanner.
First you should check if new libsane is used.
$ scanimage -V
scanimage (sane-backends) 1.0.23git; backend version 1.0.23
This example shows that backend and scanimage are version 1.0.23.
$ /usr/bin/scanimage -V
scanimage (sane-backends) 1.0.20; backend version 1.0.23
This example shows that an old scanimage (1.0.20) uses the backend 1.0.23.
If you want to use xsane, start xsane and check the used version with
CTRL - i.
Now you can test if your scanner is recognized with normal user rights.
$ scanimage -L
If your scanner isn't recognized here, try this:
$ sudo scanimage -L
If this works, your user doesn't have the rights to access the scanner.
However, please check and redo the installation steps described above.
If this doesn't help, you can ask the mailing list
<sane-devel@lists.alioth.debian.org> for further support.
Have a lot of fun with the latest SANE backend.
-----------------------------------------------------------------------------------------------
-
Reading whole posted README it is not evident what is unclear to you.
-
Sorry, unambiguous question.
Reason for that sane TinyCore installation is not working is probably TC unique file system.
On that README file sane staff says that too. For every distro, default directories have to match distros file structure.
That match have to do with udev.rules files, too.
If I have understood correctly, this "PPI compatible" means that package installation matches with TC unique file structure.
I got an answer at different chain, that TC uses kernel default udev.rules, I think that README says that udev.rules mast be modified for sane-backends.
There seems to be standard makefile for compile, but those udev.rules might need some hacking.
Actually, I not sure if that udev.rules are needed only if saned -daemon is installed, if so -> can be skipped.
For compile, correct TC file structure and udev.rules handling must be known.
-
Sorry, still unambiguous question.
TC is linux is unix is coded with C -language.
That's good for me, even if I personally like most direct coding with hex editor, next to that is assembler and then C (Java is accepted occasionally, but C++ never).
One of the difficult/wonderful features with C is libraries. Commonly needed code is placed on linked C-library, and several applications can use same piece code.
Unfortunately, using libraries is not simple, for example BusyBox is "multiple call library" for some special reasons (there is problems for dynamic library loading in embedded environments).
Because several applications can use same library, there must be EXACT rules how libs are placed on directory tree.
On linux community, it is distro who decide where libs are, and debian/redhat are most common file structures.
udev.rules are mechanism for linux dynamic harware/driver/module handling. Problems are same and worse than with libs, because udev is dynamic in nature.
When scanner is connected with USB-cable, that makes udev event and triggers scanner driver modules loading to memory.
When page is scanned, that generates udev event, too. That event might need special udev.rules handling or not, depends on driver/module structure.
-
Sorry, unambiguous again, let's make third try:
a) It is distro who makes rules how handle sane-bacend libs. Of course, I can make that decision and put libs somewhere but that will cause problems, because probably on next TC update I have to manually adjust those settings. Good practice is use TC specification, if there is some.
b) Only docs I have yet found are those few diagrams for TC system.
c) FHS -spesification is something, but I think it not sufficient to describe file structure needed for lib tree.
d) Especially that udev.rules might be nightmare, and udev development on linux is going to fork .-> changes will be in near future
-
More explanations:
This lib issue is current concern with Samsung Unified Driver CUPS parts, because few files at /usr/lib/ directory must be updated (driver is not working without).
That directory seems to hold important C standard libraries and there is always risk of side effects when updating those libs.
-
I did compiled sane backends ver. 1.0.23 and by minor lib adjustments it work confless with xerox_mfp driver and Samsung CLX-3185.
Compile.tcz is stable package, no problem with compile.
Backends (scanimage included) seems not install udev.rules.
I try next make .tcz ot .scm package, let's see what happens.