bitbank2 / Print2BLE

MacOS app which allows drag and drop of images to BLE thermal printers
Apache License 2.0
67 stars 11 forks source link

Sleep a bit if printer doesn’t support write with response #16

Closed leolobato closed 6 months ago

leolobato commented 1 year ago

Some printers (MX06 cat) will freeze printing after a few lines if we send too much data. Asking to write with response doesn’t work since they don’t support it. The solution is to wait a bit instead.

I assume this is the same issue https://github.com/bitbank2/Print2BLE/issues/12.

bitbank2 commented 1 year ago

Sorry for the delay in responding to this. It's an idea I already tested and it does work. One issue with your solution is that you wait too long. Can you test the minimum wait needed? Otherwise the printing will go too slowly.

leolobato commented 1 year ago

To be honest, I've timed printing the same picture at the same size, using this method and using the official "Fun Print" iOS app and this method is 2 seconds faster than the official app. I'm using a "cat printer" MX06.

Did you test this with any printer and it was actually slower?

In that case, maybe we'll need different timing for different printers?

neverbot commented 7 months ago

Found this app today (great work!). I'm having the same problem with an MX06 (pink cat), any advance with this PR? could solve the problem?

leolobato commented 6 months ago

Found this app today (great work!). I'm having the same problem with an MX06 (pink cat), any advance with this PR? could solve the problem?

If you use this PR, it is working for me without any speed impact.

neverbot commented 6 months ago

Found this app today (great work!). I'm having the same problem with an MX06 (pink cat), any advance with this PR? could solve the problem?

If you use this PR, it is working for me without any speed impact.

I'm not a macOS developer, I would not know how to build de app (didn't even install XCode), I used the binary inside de build directory in the master branch.

@bitbank2 do you think this PR could be accepted?

Another idea: use the releases section in the github project to store the different built binaries.

neverbot commented 6 months ago

Thanks for the merge @bitbank2!! 🎉

I think the binary in the /build directory is still the same, isn't it?