Description
Hey, I'm trying to print an image from my Mac using this Python SDK to no avail.
My spec
MacBook Pro M2 Max
Code
from InstaxBLE import InstaxBLE
try:
instax = InstaxBLE(
print_enabled=True,
dummy_printer=False
)
instax.connect()
instax.enable_printing()
instax.print_image('image.jpg')
except Exception as e:
print(e)
finally:
instax.disconnect()
Terminal output
2024-02-05 21:36:05.767 Python[53807:51297307] Peripheral ready to send: <CBPeripheral: 0x103b10080, identifier = ABA62E9E-5061-2DD0-DB72-471F64D0AB3A, name = INSTAX-45148263(IOS), mtu = 185, state = connected>
2024-02-05 21:36:05.820 Python[53807:51297307] Peripheral ready to send: <CBPeripheral: 0x103b10080, identifier = ABA62E9E-5061-2DD0-DB72-471F64D0AB3A, name = INSTAX-45148263(IOS), mtu = 185, state = connected>
2024-02-05 21:36:05.873 Python[53807:51297307] Peripheral ready to send: <CBPeripheral: 0x103b10080, identifier = ABA62E9E-5061-2DD0-DB72-471F64D0AB3A, name = INSTAX-45148263(IOS), mtu = 185, state = connected>Printer details:
Model: Instax Mini Link
Photos left: 7/10
Battery level: 95%
Charging: False
Required image size: 600x800px
MTU: 1822024-02-05 21:36:06.917 Python[53807:51297307] Peripheral ready to send: <CBPeripheral: 0x103b10080, identifier = ABA62E9E-5061-2DD0-DB72-471F64D0AB3A, name = INSTAX-45148263(IOS), mtu = 185, state = disconnecting>
I've put a few prints in InstaxBLE.py and this code is being called (line 399):
if self.printEnabled:
self.packetsForPrinting.append(self.create_packet(EventType.PRINT_IMAGE))
self.packetsForPrinting.append(self.create_packet((0, 2), b'\x02'))
Followed by line 409:
if not self.dummyPrinter:
packet = self.packetsForPrinting.pop(0)
self.send_packet(packet)
So I'm not sure what's the problem.