Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[RISOLTO] cups e ipp con stampante Samsung SCX-4200
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
Ic3M4n
Advocate
Advocate


Joined: 02 Nov 2004
Posts: 3489
Location: Bergamo.

PostPosted: Fri Nov 09, 2007 1:01 pm    Post subject: [RISOLTO] cups e ipp con stampante Samsung SCX-4200 Reply with quote

ciao a tutti, oggi ho proprio bisogno di una mano perchè ne sto uscendo scemo. Sto configurando una stampante con cups della Samsung, modello scx-4200 e da locale con i driver Samsung funziona senza problemi, ora vorrei fare in modo che dai computer della LAN si possa stampare, dopo aver letto un po' di documentazione e di qualche problema presentato da alcune persone googleando e con la ricerca nel forum non sono comunque riuscito a configurare il tutto. Leggendo i file di log sembra che tutto funzioni correttamente, o almeno così mi pare anche perchè cups sul server segnala il Job come completato, però la stampante non si muove e non sputa carta con inchiostro.
qualche info:
versione di cups sia sul client che sul server:
Code:
eix -e cups
[I] net-print/cups
     Available versions:  1.1.23-r8 1.2.10-r2

access_log del server dopo il riavvio del sistema e con log nuovo
Code:
tail /var/log/cups/access_log
192.168.1.6 - - [09/Nov/2007:15:11:02 +0100] "POST /printers/Samsung_SCX-4200_Series_USB_1 HTTP/1.1" 200 296 Get-Printer-Attributes successful-ok
192.168.1.6 - - [09/Nov/2007:15:11:02 +0100] "POST /printers/Samsung_SCX-4200_Series_USB_1 HTTP/1.1" 200 502644 Print-Job successful-ok
192.168.1.6 - - [09/Nov/2007:15:11:02 +0100] "POST /printers/Samsung_SCX-4200_Series_USB_1 HTTP/1.1" 200 261 Get-Job-Attributes successful-ok
192.168.1.6 - - [09/Nov/2007:15:11:02 +0100] "POST /printers/Samsung_SCX-4200_Series_USB_1 HTTP/1.1" 200 227 Get-Printer-Attributes successful-ok

errors_log
Code:
D [09/Nov/2007:15:05:23 +0100] Loading job 15 from cache...
D [09/Nov/2007:15:05:23 +0100] Loading job 16 from cache...
D [09/Nov/2007:15:05:23 +0100] Loading job 17 from cache...
D [09/Nov/2007:15:05:23 +0100] Loading job 18 from cache...
D [09/Nov/2007:15:05:23 +0100] Loading job 19 from cache...
D [09/Nov/2007:15:05:23 +0100] Loading job 20 from cache...
I [09/Nov/2007:15:05:23 +0100] Full reload complete.
I [09/Nov/2007:15:05:23 +0100] Listening to 192.168.1.3:631 on fd 2...
I [09/Nov/2007:15:05:23 +0100] Listening to 127.0.0.1:631 on fd 3...
I [09/Nov/2007:15:05:23 +0100] Listening to /var/run/cups/cups.sock on fd 4...
D [09/Nov/2007:15:11:02 +0100] cupsdAcceptClient: 8 from 192.168.1.6:631 (IPv4)
D [09/Nov/2007:15:11:02 +0100] cupsdReadClient: 8 POST /printers/Samsung_SCX-4200_Series_USB_1 HTTP/1.1
D [09/Nov/2007:15:11:02 +0100] cupsdAuthorize: No authentication data provided.
D [09/Nov/2007:15:11:02 +0100] Get-Printer-Attributes ipp://192.168.1.3:631/printers/Samsung_SCX-4200_Series_USB_1
D [09/Nov/2007:15:11:02 +0100] cupsdProcessIPPRequest: 8 status_code=0 (successful-ok)
D [09/Nov/2007:15:11:02 +0100] cupsdReadClient: 8 POST /printers/Samsung_SCX-4200_Series_USB_1 HTTP/1.1
D [09/Nov/2007:15:11:02 +0100] cupsdAuthorize: No authentication data provided.
D [09/Nov/2007:15:11:02 +0100] Print-Job ipp://192.168.1.3:631/printers/Samsung_SCX-4200_Series_USB_1
D [09/Nov/2007:15:11:02 +0100] print_job: request file type is application/vnd.cups-raw.
D [09/Nov/2007:15:11:02 +0100] add_job: requesting-user-name="guest"
D [09/Nov/2007:15:11:02 +0100] Adding default job-sheets values "none,none"...
I [09/Nov/2007:15:11:02 +0100] Adding start banner page "none" to job 21.
D [09/Nov/2007:15:11:02 +0100] Discarding unused job-created event...
I [09/Nov/2007:15:11:02 +0100] Adding end banner page "none" to job 21.
I [09/Nov/2007:15:11:02 +0100] Job 21 queued on "Samsung_SCX-4200_Series_USB_1" by "guest".
D [09/Nov/2007:15:11:02 +0100] Job 21 hold_until = 0
D [09/Nov/2007:15:11:02 +0100] Discarding unused printer-state-changed event...
D [09/Nov/2007:15:11:02 +0100] job-sheets=none,none
D [09/Nov/2007:15:11:02 +0100] banner_page = 0
D [09/Nov/2007:15:11:02 +0100] [Job 21] argv[0]="Samsung_SCX-4200_Series_USB_1"
D [09/Nov/2007:15:11:02 +0100] [Job 21] argv[1]="21"
D [09/Nov/2007:15:11:02 +0100] [Job 21] argv[2]="guest"
D [09/Nov/2007:15:11:02 +0100] [Job 21] argv[3]="Test Page"
D [09/Nov/2007:15:11:02 +0100] [Job 21] argv[4]="1"
D [09/Nov/2007:15:11:02 +0100] [Job 21] argv[5]="job-uuid=urn:uuid:2d1272f9-11a0-3ea5-63da-6fd5760cb61a"
D [09/Nov/2007:15:11:02 +0100] [Job 21] argv[6]="/var/spool/cups/d00021-001"
D [09/Nov/2007:15:11:02 +0100] [Job 21] envp[0]="CUPS_CACHEDIR=/var/cache/cups"
D [09/Nov/2007:15:11:02 +0100] [Job 21] envp[1]="CUPS_DATADIR=/usr/share/cups"
D [09/Nov/2007:15:11:02 +0100] [Job 21] envp[2]="CUPS_DOCROOT=/usr/share/cups/html"
D [09/Nov/2007:15:11:02 +0100] [Job 21] envp[3]="CUPS_FONTPATH=/usr/share/cups/fonts"
D [09/Nov/2007:15:11:02 +0100] [Job 21] envp[4]="CUPS_REQUESTROOT=/var/spool/cups"
D [09/Nov/2007:15:11:02 +0100] [Job 21] envp[5]="CUPS_SERVERBIN=/usr/libexec/cups"
D [09/Nov/2007:15:11:02 +0100] [Job 21] envp[6]="CUPS_SERVERROOT=/etc/cups"
D [09/Nov/2007:15:11:02 +0100] [Job 21] envp[7]="CUPS_STATEDIR=/var/run/cups"
D [09/Nov/2007:15:11:02 +0100] [Job 21] envp[8]="PATH=/usr/libexec/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin"
D [09/Nov/2007:15:11:02 +0100] [Job 21] envp[9]="SERVER_ADMIN=root@potasome.homelinux.org"
D [09/Nov/2007:15:11:02 +0100] [Job 21] envp[10]="SOFTWARE=CUPS/1.2.12"
D [09/Nov/2007:15:11:02 +0100] [Job 21] envp[11]="TMPDIR=/var/spool/cups/tmp"
D [09/Nov/2007:15:11:02 +0100] [Job 21] envp[12]="USER=root"
D [09/Nov/2007:15:11:02 +0100] [Job 21] envp[13]="CUPS_SERVER=/var/run/cups/cups.sock"
D [09/Nov/2007:15:11:02 +0100] [Job 21] envp[14]="CUPS_ENCRYPTION=IfRequested"
D [09/Nov/2007:15:11:02 +0100] [Job 21] envp[15]="IPP_PORT=631"
D [09/Nov/2007:15:11:02 +0100] [Job 21] envp[16]="CHARSET=utf-8"
D [09/Nov/2007:15:11:02 +0100] [Job 21] envp[17]="LANG=it_IT"
D [09/Nov/2007:15:11:02 +0100] [Job 21] envp[18]="PPD=/etc/cups/ppd/Samsung_SCX-4200_Series_USB_1.ppd"
D [09/Nov/2007:15:11:02 +0100] [Job 21] envp[19]="RIP_MAX_CACHE=8m"
D [09/Nov/2007:15:11:02 +0100] [Job 21] envp[20]="CONTENT_TYPE=application/vnd.cups-raw"
D [09/Nov/2007:15:11:02 +0100] [Job 21] envp[21]="DEVICE_URI=file:///dev/usb/lp0"
D [09/Nov/2007:15:11:02 +0100] [Job 21] envp[22]="PRINTER=Samsung_SCX-4200_Series_USB_1"
D [09/Nov/2007:15:11:02 +0100] Discarding unused job-state event...
D [09/Nov/2007:15:11:02 +0100] cupsdProcessIPPRequest: 8 status_code=0 (successful-ok)
D [09/Nov/2007:15:11:02 +0100] [Job 21] File 0 is complete.
D [09/Nov/2007:15:11:02 +0100] Discarding unused printer-state-changed event...
D [09/Nov/2007:15:11:02 +0100] Discarding unused job-completed event...
D [09/Nov/2007:15:11:02 +0100] cupsdReadClient: 8 POST /printers/Samsung_SCX-4200_Series_USB_1 HTTP/1.1
D [09/Nov/2007:15:11:02 +0100] cupsdAuthorize: No authentication data provided.
D [09/Nov/2007:15:11:02 +0100] Get-Job-Attributes ipp://192.168.1.3:631/printers/Samsung_SCX-4200_Series_USB_1
D [09/Nov/2007:15:11:02 +0100] cupsdProcessIPPRequest: 8 status_code=0 (successful-ok)
D [09/Nov/2007:15:11:02 +0100] cupsdReadClient: 8 POST /printers/Samsung_SCX-4200_Series_USB_1 HTTP/1.1
D [09/Nov/2007:15:11:02 +0100] cupsdAuthorize: No authentication data provided.
D [09/Nov/2007:15:11:02 +0100] Get-Printer-Attributes ipp://192.168.1.3:631/printers/Samsung_SCX-4200_Series_USB_1
D [09/Nov/2007:15:11:02 +0100] cupsdProcessIPPRequest: 8 status_code=0 (successful-ok)
D [09/Nov/2007:15:11:02 +0100] cupsdCloseClient: 8
D [09/Nov/2007:15:12:05 +0100] Unloading job 21...

la scritta: cupsdAuthorize: No authentication data provided. è l'unica cosa che mi suona strana, ma stando a quanto letto in giro non dovrebbe essere bloccante, ho capito male?

il file di conf di cups:
Code:
cat /etc/cups/cupsd.conf
LogLevel debug
SystemGroup lpadmin
Listen 192.168.1.3:631
Listen localhost:631
Listen /var/run/cups/cups.sock
Browsing On
BrowseOrder allow,deny
BrowseAllow @LOCAL
DefaultAuthType Basic
<Location />
  Order deny,allow
  Deny 192.168.1.1
  Allow localhost
  Allow 192.168.1.0/24
</Location>
<Location /admin>
  Order deny, allow
  Deny 192.168.1.1
  Allow 192.168.1.0/24
  Allow localhost
</Location>
<Location /admin/conf>
  AuthType Basic
  Require user @SYSTEM
  Order allow,deny
  Allow localhost
</Location>
<Policy default>
  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit Pause-Printer Resume-Printer Set-Printer-Attributes Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Add-Printer CUPS-Delete-Printer CUPS-Add-Class CUPS-Delete-Class CUPS-Accept-Jobs CUPS-Reject-Jobs CUPS-Set-Default>
    AuthType Basic
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit All>
    Order deny,allow
  </Limit>
</Policy>

e printers.conf
Code:
<DefaultPrinter Samsung_SCX-4200_Series_USB_1>
Info Samsung SCX-4200 Series
Location Local Printer
DeviceURI file:///dev/usb/lp0
State Idle
StateTime 1194483900
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>

ringrazio in anticipo per qualsiasi consiglio e mi scuso per la lunghezza del post, ma le cose da scrivere erano molte.
ogni consiglio è ben accetto.


Last edited by Ic3M4n on Sat Nov 10, 2007 8:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
Scen
Retired Dev
Retired Dev


Joined: 29 Jul 2003
Posts: 2470
Location: Padova, Italy

PostPosted: Fri Nov 09, 2007 1:39 pm    Post subject: Reply with quote

Se dal server riesci a stampare senza problemi sei già a metà dell'opera 8)

In base alla tua configurazione, la tua stampante dovrebbe essere disponibile via IPP tramite l'indirizzo http://192.168.1.3:631/printers/Samsung_SCX-4200_Series_USB_1


  • Controlla che CUPS sia in ascolto correttamente sulla porta giusta, in modo che i client possano connettersi correttamente.
    Lanciando, sul server,
    Code:

    netstat -na | grep :631

    cosa viene riportato? Casomai smanetta sulle direttive "Listen" di cups.conf

  • Sui client basta installare una stampante Internet (non penso tu abbia problemi), prova ad utilizzare prima i driver di Samsung, e se ti va male prova con i driver "generici" di CUPS

_________________
I was born in a deep forest/I wish I could live here all my life/I am made from stones and roots/My home, these woods and roads
All my life I loved this sound/Of the woods all around/Eagles flies where the winds blows free
Journey is my destiny
Back to top
View user's profile Send private message
Ic3M4n
Advocate
Advocate


Joined: 02 Nov 2004
Posts: 3489
Location: Bergamo.

PostPosted: Fri Nov 09, 2007 1:53 pm    Post subject: Reply with quote

questo è l'output di netstat:
Code:
netstat -na | grep :631
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     
tcp        0      0 192.168.1.3:631         0.0.0.0:*               LISTEN     
udp        0      0 0.0.0.0:631             0.0.0.0:*                           

che è corretto, nel file di configurazione ho impostato due listen, uno su localhost ed uno sull'interfaccia di rete.
La stampante di rete è configurata come hai detto correttamente su http://192.168.1.3:631/printers/Samsung_SCX-4200_Series_USB_1, avevo omesso la porta essendo quella standard, ma anche esplicitandola il risultato non cambia. La cosa che mi lascia perplesso è l'output di cups, quello che ho scritto prima è il risultato del log sul server. quindi la richiesta di stampa gli arriva, solo che la stampante non si muove.
Back to top
View user's profile Send private message
magowiz
Veteran
Veteran


Joined: 17 Feb 2005
Posts: 1029
Location: Italy/Milan/Bresso

PostPosted: Sat Nov 10, 2007 5:13 pm    Post subject: Reply with quote

Ic3M4n wrote:
questo è l'output di netstat:
Code:
netstat -na | grep :631
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     
tcp        0      0 192.168.1.3:631         0.0.0.0:*               LISTEN     
udp        0      0 0.0.0.0:631             0.0.0.0:*                           

che è corretto, nel file di configurazione ho impostato due listen, uno su localhost ed uno sull'interfaccia di rete.
La stampante di rete è configurata come hai detto correttamente su http://192.168.1.3:631/printers/Samsung_SCX-4200_Series_USB_1, avevo omesso la porta essendo quella standard, ma anche esplicitandola il risultato non cambia. La cosa che mi lascia perplesso è l'output di cups, quello che ho scritto prima è il risultato del log sul server. quindi la richiesta di stampa gli arriva, solo che la stampante non si muove.


scusate ma come url per ipp non si dovrebbe mettere ipp:// al posto di http:// ?
Back to top
View user's profile Send private message
Ic3M4n
Advocate
Advocate


Joined: 02 Nov 2004
Posts: 3489
Location: Bergamo.

PostPosted: Sat Nov 10, 2007 7:12 pm    Post subject: Reply with quote

è indifferente. Vengono accettati entrambi senza problemi. Almeno... Al lavoro ho una hp laserjet5 dell'anteguerra e funziona subito senza problemi sia con http:// che con ipp://.
Back to top
View user's profile Send private message
Ic3M4n
Advocate
Advocate


Joined: 02 Nov 2004
Posts: 3489
Location: Bergamo.

PostPosted: Sat Nov 10, 2007 8:05 pm    Post subject: Reply with quote

Ho risolto: spiego cosa ho fatto,
io avevo messo i drivers Samsung sia sul server che sul client, in questo modo cups rileva che voglio stampare, imposta il job come completato eppure non stampa nulla, seguendo una guida su internet (ne ho lette molte quindi non so chi ringraziare, non mi ricordo dove l'ho letto, comunque grazie :wink:) ho provato ad impostare la stampante sul client come raw e quindi senza utilizzare i driver Samsung. In questo modo la stampante fa tutto quello che dovrebbe fare senza alcun problema.
L'unica cosa che bisogna modificare è il file /etc/cups/mime.convs del server e decommentare la riga alla fine del documento
Code:
application/octet-stream        application/vnd.cups-raw        0       -

grazie a tutti per il supporto morale :D

adesso devo far andare lo scanner :(
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) 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