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

Support dodocool printers #17

Open
cqx931 opened this issue Dec 5, 2021 · 8 comments
Open

Support dodocool printers #17

cqx931 opened this issue Dec 5, 2021 · 8 comments

Comments

@cqx931
Copy link

cqx931 commented Dec 5, 2021

I am trying to get my dodocool printer to work with the library.
Could you please add it to the library?
Name: starpany200, Address: dc:0d:30:97:8c:83, manufacturer data: 0000dc0d30978c83, serviceUUID: e7810a71-73ae-499d-8c15-faa9aef0c3f2

characteristic UUID
bef8d6c9-9c21-4c9e-b632-bd58c1009f9f

@cqx931
Copy link
Author

cqx931 commented Dec 5, 2021

I tried to add the printer myself here:
cqx931@8c9232a
So far I can get the connection established but it doesn't print anything. Is there anything I missed or got it wrong? Any kind of hint or help would be much appreciated!

@bitbank2
Copy link
Owner

bitbank2 commented Dec 5, 2021

If it uses the standard "ESC" command set, then you should not create a new type of printer. Add the name, but reuse the MTP2 printer type. Test to see that it works like a "normal" printer with the NRF Connect app on your phone. Write a short string of hex and terminate it with a CR; that should produce print output if you're using the correct service/characteristic.

@cqx931
Copy link
Author

cqx931 commented Dec 6, 2021

Thank you for the reply!

Could you give me an example hex string that I can try? I'm not very familiar with hex and ESC/POS command set and I'm afraid that I might tried the wrong commands. So far I tried to send some random utf-8 string or the line feed command "0A" in hex directly using an BLE Scanner app but I didn't see any response. I also tried it with other services I see under the device but no luck so far.

WechatIMG54

@bitbank2
Copy link
Owner

bitbank2 commented Dec 6, 2021

Try using the 0x18f0 service and see if there's a write-only characteristic within it. Send the hex string: 0x41 0x42 0x43 0x0D

This should print "ABC" and advance the page 1 line

@cqx931
Copy link
Author

cqx931 commented Dec 6, 2021

I tried it and still nothing happened. Maybe the model does not support the ESC/POS command set. I will try again with another model tomorrow.

Thank you for your help and the amazing library!

@bitbank2
Copy link
Owner

bitbank2 commented Dec 6, 2021

Try the other service UUID too. The characteristic you want will have Write, but not Notify.

@cqx931
Copy link
Author

cqx931 commented Dec 7, 2021

So today I tried it with Phomemo T02 and the library works with esp32! However, I still can't get it working with the app with the above command even with this model, which gives me hope that my other printer could potentially work with the library...

Do you have an app suggestion one should use? I'm trying to understand what else I could potentially messed up here.

This is what I tried with T02:

WechatIMG56

@raychmond
Copy link

So today I tried it with Phomemo T02 and the library works with esp32! However, I still can't get it working with the app with the above command even with this model, which gives me hope that my other printer could potentially work with the library...

Do you have an app suggestion one should use? I'm trying to understand what else I could potentially messed up here.

This is what I tried with T02:

WechatIMG56

@cqx931
I have a similar printer (Phomemo M02S). I tried different things. It can connect, but doesn't print correctly. Do you mind if you share what you did on your T02? I'm using ESP32 as well. Thank you so much!

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

3 participants