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

Device identifying improvements (and testing Paperang devices) #43

Open
issu-shooter opened this issue Oct 6, 2022 · 6 comments
Open

Comments

@issu-shooter
Copy link

Hi NaitLee! I discovered your app long time ago on F-droid, and I find it is a practice-proven useful app. You've done such a great job, I really appreciate your efforts! Yet unfortunately, I can hardly find the app useful, because it's kinda hard to find the said supported models on Internet. Entering the model names in search engines will only return results about professional printers and/or unrelated results. Searching in shopping sites like Amazon and Aliexpress can find promising models, but these products' description cannot prove themselves to be the said models.
Since the models don't seem to have a obvious vendor, I used the images in issue #23 to help me find the promising models (I used them to picture search), so I guess some pictures of the supported products would be really helpful.

By the way, I want to contribute to the device testing, so I bought a Paperang P2 printer, this vendor should about the top tier among the thermal printers. I also downloaded nRF tools and ready to scan it, I'll update the data according to your guidance in issue #23. Feel free to ask me for more data! PS: I'm not quite satisfied with P2's poor paper width, so I'm going to change it to a P3 later, which means you can test two devices!

@issu-shooter
Copy link
Author

Screenshot_20221006-140003_nRF Connect_1
Screenshot_20221006-135921_nRF Connect_1
Screenshot_20221006-135821_nRF Connect_1
Screenshot_20221006-135701_nRF Connect_1

@issu-shooter issu-shooter closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2022
@issu-shooter issu-shooter reopened this Oct 6, 2022
@issu-shooter
Copy link
Author

Sorry I clicked on the wrong button! Here's the Log

Log 2022-10-06 14_15_06.txt

@issu-shooter
Copy link
Author

issu-shooter commented Oct 6, 2022

Here's the UUID stuff, I have the feeling that I've done it incorrectly... I will redone it if I have time

Generic Access:
  UUID: 00001800-0000-1000-8000-00805f9b34fb
  PRIMARY SERVICE:
    Device Name:
      UUID: 00002a00-0000-1000-8000-00805f9b34fb
      Properties: READ

    Appearance:
      UUID: 00002a01-0000-1000-8000-00805f9b34fb
      Properties: READ

Genertic Attribute:
  UUID: 00001801-0000-1000-8000-00805f9b34fb     
  PRIMARY SERVICE:
    Service Changed
      UUID: 00002a05-0000-1000-8000-00805f9b34fb
      Properties: INDICATE
           
Device Information:
  UUID: 0000180a-0000-1000-8000-00805f9b34fb
  PRIMARY SERVICE:
    Software Revision String
      UUID:00002a28-0000-1000-8000-00805f9b34fb
      Properties: READ
      
Unknown Service:
  UUID: 0000ff00-0000-1000-8000-00805f9b34fb
  PRIMARY SERVICE:

Unknown Service:
  UUID: 49535343-fe7d-4ae5-8fa9-9fafd205e455
  PRIMARY SERVICE:
    Unknown Characteristic:
      UUID: 49535343-1e4d-4bd9-ba61-23c647249616
      Properties: NOTIFY
    Unknown Characteristic:
      UUID: 49535343-8841-43f4-a8d4-ecbe34729bb3
      Properties: WRITE, WRITE NO RESPONSE

@issu-shooter
Copy link
Author

Well aren't they really similar? I guess these little printers all share the similar specs under the colorful shell

@NaitLee
Copy link
Owner

NaitLee commented Oct 6, 2022

Oh is Cat-Printer really in F-Droid? I didn’t put it to or see it in f-droid repo, maybe it’s in some external repos?
Anyway, glad to know people enjoy it.


It’s been one year since those GB0X models prevailed in public market, at that time I searched for the model and found a brave guy reverse engineered that model, (casually) implemented its protocol in Python — that’s (almost) where these applications like Cat-Printer have took inspiration.

But the situation has changed: GB0X is gone (internationally, from my domestic market, and from where I bought it), other brands appeared instead, with varying “features” in them.

For how such things work, they are becoming “uncontrolled” to us. And you see how Chinese proprietary apps do the jobs — vendor lockdowns are there, unchanged.

Buying all the printers (to get physical touch) isn’t optimal at all, obviously.
That means the “traditional” way isn’t reliable anymore.

Those possible ways to hack into again are discussed in historical issues and discussions, and other related repositories.
They includes but not limited to:

  • scan for bluetooth uuids, see if it’s the same (which won’t be the case anymore)
  • dump bluetooth traffic, by sending a “regular” image to printer (with “official” app), then analyze it (this is the best way for now, but not that easy)
  • r.e. the “official” application (which is risky, possibly without being able to gather anything, for they are mostly obfuscated)
  • dump and analyze the firmware (risky and ineffective)
  • (something else? let’s be innovative!)

I’m wondering if a “hacker kit” is possible to assist the 2nd way — that’s something like nRF Connect (to mimic a device) but with ease & automation included.

Note to 2nd way: not all printers have 384px paper width, but Cat-Printer is currently assuming so.
Using correct resolution to checkerboard image is helpful, for letting bluetooth traffic dump being regular.

Another note: adb logcat have big chance to reveal what is the “official” app doing, some ble libs will emit log.


Yet, sadly, I can’t make any promise to progress: I hardly have time to contribute.

Kinda sad! Leaving this beloved project makes my heart bleed.
But I have life, too… I should go farther toward future.

Good luck!

@issu-shooter
Copy link
Author

Man, sorry to hear that, I can certainly understand your feelings. Keeping a Free/Opensource project is hard, keeping up the spirit is even harder. I used to be a free software enthusiast (Richard Stallman type), but now and my future depends on becoming professional at proprietary software. I no longer care that much now, but I do hope some day we can truly go after what we really dreams with less restraints.

I myself have little coding skills so I'm afraid I cannot help, but I will learn to code once I entered uni for my master's degree. In my opinion, it would be much better to create a brand-new printer from SBCs like Raspberry Pi zero rather than supporting bigname's locked-by-design products (which is wiping' their ass, I would say), This would be a good project to start on I guess.

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