mysticpants / Electric-Imp-Usb-Drivers

Electric Imp Usb Host and Driver Classes
MIT License
0 stars 0 forks source link

Error with endpoints with Brother QL-700 usb printer #1

Open paddypawprints opened 6 years ago

paddypawprints commented 6 years ago

Hi,

I added the source from this project to my device, made sure the PID was correct, and plugged in the printer. I get the following error when trying to print the test page. Any ideas on how to troubleshoot. (I am a newbie as far as the Imp05 USB device goes).

thanks.

2018-02-12 16:23:39 -08:00 [Device] USB Connect
2018-02-12 16:23:39 -08:00 [Device] QL720NWUartUsbDriver was connected!
2018-02-12 16:24:37 -08:00 [Device] QL720NWUartUsbDriver disconnected
2018-02-12 16:24:37 -08:00 [Device] ERROR: endpoint must have been opened in usb.generaltransfer(address, endpoint, type, data)
2018-02-12 16:24:37 -08:00 [Device] ERROR: in unknown :4294967295
2018-02-12 16:24:37 -08:00 [Device] ERROR: from _popBulkTransferQueue ...icimp#usb.device.lib.nut#0.1.0:408
2018-02-12 16:24:37 -08:00 [Device] ERROR: from _onTransferCompleted ...icimp#usb.device.lib.nut#0.1.0:377
2018-02-12 16:24:37 -08:00 [Device] ERROR: from _onEvent ...icimp#usb.device.lib.nut#0.1.0:422
2018-02-12 16:24:37 -08:00 [Device] ERROR: endpoint must have been opened in usb.generaltransfer(address, endpoint, type, data)
2018-02-12 16:24:37 -08:00 [Device] ERROR: in _popBulkTransferQueue ...icimp#usb.device.lib.nut#0.1.0:408
2018-02-12 16:24:37 -08:00 [Device] ERROR: from _onTransferCompleted ...icimp#usb.device.lib.nut#0.1.0:377
2018-02-12 16:24:37 -08:00 [Device] ERROR: from _onEvent ...icimp#usb.device.lib.nut#0.1.0:422
paddypawprints commented 6 years ago

Moved on some - enabled _DEBUG on UsbHost

Endpoints are not opened (was using wrong PID). Nothing is printed though.

paddypawprints commented 6 years ago

OK. It is now running thought the print code but nothing comes out on the printer. No apparent errors.

paddypawprints commented 6 years ago

Code: switch (typeof device) { case "QL720NWUartUsbDriver": // Initialize Printer Driver with USB UART device printer <- QL720NW(device);

        // Print a text label
        printer
            .setOrientation(QL720NW.LANDSCAPE)
            .setFont(QL720NW.FONT_SAN_DIEGO)
            .setFontSize(QL720NW.FONT_SIZE_48)
            .write("San Diego 48 ")
            .print();

        // Configure Barcode
        barcodeConfig <- {
            "type": QL720NW.BARCODE_CODE39,
            "charsBelowBarcode": true,
            "width": QL720NW.BARCODE_WIDTH_M,
            "height": 1,
            "ratio": QL720NW.BARCODE_RATIO_3_1
        }

        // Print bacode of the imp's mac address
        printer.writeBarcode(imp.getmacaddress(), barcodeConfig).print();