CUPS 에 관해서 질문이 있습니다

삼양라면의 이미지

목표는 리눅스 상에서 프린터를 추가 하고 출력 하는 프로그램을 작성 하는 것입니다.

그 후 CUPS를 임베디드 장비에 포팅 한 후 장비에서 프린터로 USB를 연결 하여

장비의 내용을 바로 프린터로 출력 할 예정입니다.

먼저 CUPS 를 리눅스 상에서 설치 한 후 프린터가 출력 하는지 테스트를 해보려

하는데 동작을 하지 않아 이렇게 질문을 드립니다.

CUPS 1.2.2 소스를 다운로드 하여 압축 해제 후 컴파일 하였습니다.

컴파일 한 순서는

./configure --prefix=/CUPS

./make

./make install

입니다.

그 후 /etc/init.d/cups restart

한 후

/CUPS/sbin/lpadmin -p TestPrint -E -v usb:/dev/usb/lp0

-m /CUPS/share/cups/model/laserjet.ppd

명령어 수행 후

/CUPS/sbin/cupsenable TestPrint

명령어 수행 후

/CUPS/sbin/accept TestPrint

/CUPS/bin/lpr -P TestPrint -o position=top -o media=A4 출력 파일

명령어로 출력을 시도 하였지만 프린터가 동작 하지 않았습니다.

사용하고 있는 프린터는 CUPS 1.2.2에서 지원 하는 프린터 이며 사용하는 ppd 파일은 laserjet.ppd 임을 확인 하였습니다.

그래서 CUPS 를 Compile 하는 과정에서 에러가 있거나 사용방법이 잘못 된 것으로 예상됩니다.

1) 지금 수행한 방법이 잘못 되었는지.

2) 혹시 따로 프린터 드라이버를 설치하지 않고 제공하는 PPD 파일을 이용하여 특정 프린터를 등록 하고 사용 할 수 있는지 입니다.

아래의 내용은 컴파일 시 warning입니다.

---------------makeall 수행 시 warning-------------------------

stertolabel.c: In function ‘OutputLine’:

rastertolabel.c:739: warning: pointer targets in assignment differ in signedness

rastertolabel.c:753: warning: pointer targets in assignment differ in signedness

FoFiType1C.cxx: In member function ‘void FoFiType1C::readFD(int, int, Type1CPrivateDict*)’:

FoFiType1C.cxx:1924: warning: ‘fontMatrix$0’ may be used uninitialized in this function

FoFiType1C.cxx:1924: warning: ‘fontMatrix$1’ may be used uninitialized in this function

FoFiType1C.cxx:1924: warning: ‘fontMatrix$2’ may be used uninitialized in this function

FoFiType1C.cxx:1924: warning: ‘fontMatrix$3’ may be used uninitialized in this function

FoFiType1C.cxx:1924: warning: ‘fontMatrix$4’ may be used uninitialized in this function

FoFiType1C.cxx:1924: warning: ‘fontMatrix$5’ may be used uninitialized in this function

dirsvc.c:1005: warning: implicit declaration of function ‘ldap_bind_s’

dirsvc.c: In function ‘cupsdStopBrowsing’:

dirsvc.c:1180: warning: implicit declaration of function ‘ldap_unbind’

dirsvc.c: In function ‘cupsdUpdateLDAPBrowse’:

dirsvc.c:1520: warning: implicit declaration of function ‘ldap_search_s’

dirsvc.c:1547: warning: implicit declaration of function ‘ldap_get_values’

dirsvc.c:1548: warning: assignment makes pointer from integer without a cast

dirsvc.c:1552: warning: implicit declaration of function ‘ldap_value_free’

dirsvc.c:1555: warning: assignment makes pointer from integer without a cast

dirsvc.c:1562: warning: assignment makes pointer from integer without a cast

dirsvc.c:1569: warning: assignment makes pointer from integer without a cast

dirsvc.c:1576: warning: assignment makes pointer from integer without a cast

dirsvc.c: In function ‘send_ldap_browse’:

dirsvc.c:2747: warning: implicit declaration of function ‘ldap_modify_s’

dirsvc.c:2769: warning: implicit declaration of function ‘ldap_add_s’

printers.c: In function ‘cupsdCreateCommonData’:

printers.c:559: warning: dereferencing type-punned pointer will break strict-aliasing rules

printers.c:563: warning: dereferencing type-punned pointer will break strict-aliasing rules

printers.c: In function ‘cupsdSetPrinterAttrs’:

printers.c:2050: warning: dereferencing type-punned pointer will break strict-aliasing rules

wkpark의 이미지

로그 메시지를 읽어보시길

제 경우는 /var/log/cups/ 디렉토리에 cups관련 로그가 있네요.

그리고, 장치가 제대로 작동하는지도 확인해 보세요. 예를 들어,

$ /sbin/lsmod |grep lp
lp                     19473  0
parport                47693  2 parport_pc,lp

문제 없으면 다음과 같은 식의 명령에 프린터가 반응을 보여야 합니다.
cat test.txt >/dev/lp0

온갖 참된 삶은 만남이다 --Martin Buber

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.