labbots / NiimPrintX

NiimPrintX is a Python library designed to seamlessly interface with NiimBot label printers via Bluetooth. This library supports a range of models including D11/B21/B1, D110, and B18.
GNU General Public License v3.0
129 stars 7 forks source link

b1 label size missing #5

Open parisneto opened 4 months ago

parisneto commented 4 months ago

https://github.com/labbots/NiimPrintX/blob/e51cf57b19fda8de66632ab063784df1c359fd5f/NiimPrintX/ui/AppConfig.py#L56

I am trying to get it work with my Niimbot b1 but UI wasn't showing it under devices, I went ahead and created this additional section with the labels I have, but I am still not able to connect, the error says "cannot connect to printer d110" but at least it shows in the UI now. PS: Running on Mac Os.

        },
        "b1": {
            "size": {
                "50mm x 30mm": (50, 30),
                "40mm x 60mm": (40, 60),
                "40mm x 30mm": (40, 30),
            },
            "density": 3
        }        
parisneto commented 4 months ago

The sizes above have the second dimmensions inverted, please use this :

    "b1": {
        "size": {
            "50mm x 30mm": (50, 30),
            "60mm x 40mm": (60, 40),
            "40mm x 30mm": (40, 30),
        },
        "density": 3
    }   

after managing to connect and trying to print, I only got 6-7 blank labels from the B1 printer and an error :

unpack requires a buffer of 4 bytes.