Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't print on uncommon printer model #7

Open
CubeBag opened this issue Nov 21, 2021 · 2 comments
Open

Can't print on uncommon printer model #7

CubeBag opened this issue Nov 21, 2021 · 2 comments

Comments

@CubeBag
Copy link

CubeBag commented Nov 21, 2021

According to the QR code information page that prints out, my device's name is YHK-9B51 (instead of the more common GB01, GB02, etc). It seems the last four digits of the device name come from the mac address which ends in :9B:51. However, when I use bleak to scan devices, what shows up under the name "YHK-9B51" has a completely different MAC address ending in :C4:AD. (Specifically, when I try to pair the printer in Windows, two copies of "YHK-9B51" show up. One pairs but doesn't connect, and the other always rejects a connection. I'm not sure if any of that info is helpful, it is just things I've found while troubleshooting.

Anyways, when I run the print script with devicename set to YHK-9B51, sometimes it exits with exception asyncio.exceptions.TimeoutError and other times it first says Connected: True; MTU: 508 and then exits with exception bleak.exc.BleakError: Characteristic 0000ae01-0000-1000-8000-00805f9b34fb was not found! Could this be a newer hardware revision that's not compatible with the program, and if so, is there any data I could provide to help support it? (Also, I also tried this on macOS 12 Monterey, but bleak does not show any devices whatsoever because bleak currently doesn't support Monterey: hbldh/bleak#635)

@rbaron
Copy link
Owner

rbaron commented Nov 21, 2021

@CubeBag,

I don't see mentions to "YHK-9B51" in the decompiled app. It could be that it uses a different protocol altogether or that it has a different name under the hood. What does the printer look like from the outside?

If the script connects to it sometimes, you can try changing the BLE characteristic that the script write to. To figure out which one, you can use a BLE service explorer like the nRF Connect app on your smartphone or use the service_explorer.py example. It's a long shot, but worth trying.

@CubeBag
Copy link
Author

CubeBag commented Nov 22, 2021

It looks exactly the same visually: cat face with blue accents, paper door button on the right and on/off button on the left. I noticed on this other repository https://github.com/JJJollyjim/catprinter someone else had a printer that starts with "YHK" but with a different 4 hex digits after it (YHK-C200). My guess is it's the same hardware but the MAC address ends in :C2:00 and the name just changes depending on the MAC address. Anyways, thank you for the tips. I will try that and comment back soon.

Edit: Referring to the self-reported MAC address on the sheet that prints out with the QR code, since it seems like it uses a completely different MAC address when I look from a computer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants