Problem in ethernet printer

Michael Sweet msweet at apple.com
Mon Feb 22 20:12:57 PST 2010


On Feb 22, 2010, at 8:00 PM, kavin wrote:
> Hi,
>        The following code will query the our zebra printer for error.
> 
> memset(port_monitor_buffer,0,sizeof(port_monitor_buffer));
> retn =write(device_fd,"\033E 1\r",5);
> retn =read(device_fd,port_monitor_buffer,sizeof(port_monitor_buffer));
> 
>       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.
> 

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.

> 
>>> Hi,
>>> 	I am trying to get the printer response for particular commands. =
>> I written the following code inside the socket.c after the function =
>> backendrunloop.the Same code at same place written in usb-unix.c gives =
>> to me a proper response.
>>> =20
>>>       memset(port_monitor_buffer,0,sizeof(port_monitor_buffer));
>>> 	retn =3D write(device_fd,"\033E 1\r",5);
>>> 	retn =3D =
>> read(device_fd,port_monitor_buffer,sizeof(port_monitor_buffer));
>>> =20
>>> In the case of socket it doesnt gives any response but the command =
>> goes to the printer in proper manner
>>> please give me the guidence to resolve the problem
>>> =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
>> 
>> 
>> 
> 
> _______________________________________________
> 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 mailing list