Problem in ethernet printer

kavin kavinsiva at yahoo.co.in
Mon Feb 22 23:18:52 PST 2010


Hi,
      The cupsBackChannelRead doesnt gives anything it always returns -1.




> On Feb 22, 2010, at 8:00 PM, kavin wrote:
> > Hi,
> >        The following code will query the our zebra printer for error.
> >=20
> > memset(port_monitor_buffer,0,sizeof(port_monitor_buffer));
> > retn =3Dwrite(device_fd,"\033E 1\r",5);
> > retn =3Dread(device_fd,port_monitor_buffer,sizeof(port_monitor_buffer));=
>
> >=20
> >       so i put this code in backend the same code in USB backend works =
> fine even in Ethernet i can able to feed the command to the printer but =
> cant able to get the response from printer thats my problem.
> >=20
>
> Please read:
>
>     http://www.cups.org/documentation.php/api-filter.html
>
> You should never modify the standard CUPS backends to write out =
> printer-specific data. Instead, send the commands from your filter and =
> then read the response back using cupsBackChannelRead.  You can also =
> search for similar posts in cups.development and cups.general with more =
> example code.
>
> >=20
> >>> Hi,
> >>> 	I am trying to get the printer response for particular commands. =
> =3D
> >> I written the following code inside the socket.c after the function =3D=
>
> >> backendrunloop.the Same code at same place written in usb-unix.c =
> gives =3D
> >> to me a proper response.
> >>> =3D20
> >>>       memset(port_monitor_buffer,0,sizeof(port_monitor_buffer));
> >>> 	retn =3D3D write(device_fd,"\033E 1\r",5);
> >>> 	retn =3D3D =3D
> >> read(device_fd,port_monitor_buffer,sizeof(port_monitor_buffer));
> >>> =3D20
> >>> In the case of socket it doesnt gives any response but the command =3D=
>
> >> goes to the printer in proper manner
> >>> please give me the guidence to resolve the problem
> >>> =3D20
> >>> =3D20
> >>> _______________________________________________
> >>> cups-ddk mailing list
> >>> cups-ddk at easysw.com
> >>> http://lists.easysw.com/mailman/listinfo/cups-ddk
> >>=20
> >> ___________________________________________________
> >> Michael Sweet, Senior Printing System Engineer
> >>=20
> >>=20
> >>=20
> >=20
> > _______________________________________________
> > cups-ddk mailing list
> > cups-ddk at easysw.com
> > http://lists.easysw.com/mailman/listinfo/cups-ddk
>
> ___________________________________________________
> Michael Sweet, Senior Printing System Engineer
>
>
>





More information about the cups-devel mailing list