#18 printing only once

v2.2.1
closed-rejected
5
2010-01-16
2010-01-16
lucky khan
No

I am really thankfull to sourceforge for providing such a wonderfull usb support library.

I had given a task to pass raw data to usb printer without using printer drivers.
I had download the latest version LibUsbDotNet_Setup.2.2.1 and libusb-win32-filter-bin-0.1.12.2

I am able to print by passing streams of bytes in ReadWriteEventDriven program example and is successfully printing.
1) The issue is it is printing for the first time and then after it doesnt print a red light appear on printer instead of green and then after a while it gets green light and ready to print.
2) Is it necessary to run both the set up (LibUsbDotNet_Setup.2.2.1 and libusb-win32-filter-bin-0.1.12.2 ) to run properly
3) What is required to just pass raw data to usb printer
4) What are latest updates availiable

Thank you
lucky khan

Discussion

  • lucky khan

    lucky khan - 2010-01-16
    • priority: 5 --> 9
    • milestone: --> v2.2.1
     
  • Travis Robinson

    Travis Robinson - 2010-01-16

    This is not a LibUsbDotNet bug as the simple ReadWriteEventDriven example was not designed for a USB printer.

    1) The red light is appearing because the printer is receiving invalid data given it's current state.
    2) LibUsbDotNet_Setup comes with the libusb-win32 and libusb-win32-filter. (Start->Programs->LibUsbDotNet->libusb-win32)
    3) The USB printer class specs can be found at usb.org.
    4) The latest release is the default download and always found in the files section.

    You might try modifying the finally block so it releases the interface that was claimed:

    finally
    {
    if (MyUsbDevice != null)
    {
    if (MyUsbDevice.IsOpen)
    {
    IUsbDevice myUsbRealDevice = MyUsbDevice as IUsbDevice;
    if (!ReferenceEquals(myUsbRealDevice, null))
    {
    // Release the first Interface.
    myUsbRealDevice.ReleaseInterface(0);
    }
    MyUsbDevice.Close();
    }
    }
    MyUsbDevice = null;
    // Wait for user input..
    Console.ReadKey();
    }

    For more help, post a detailed message in the LibUsbDotNet support forum including error messages and all relevant printer information.

    Regards,
    Travis

     
  • Travis Robinson

    Travis Robinson - 2010-01-16
    • priority: 9 --> 5
    • assigned_to: nobody --> trobinso
    • labels: --> USB Library
    • status: open --> closed-rejected
     

Log in to post a comment.