eliasweingaertner / peripage-a6-bluetooth Goto Github PK
View Code? Open in Web Editor NEWDirectly printing on a Peripage A6 thermal printer via Bluetooth
License: MIT License
Directly printing on a Peripage A6 thermal printer via Bluetooth
License: MIT License
I get this error when i try to print my image:
klara@raspberrypi:~/peripage-A6-bluetooth $ ./ppa6-print.py -i image.jpg 20:21:01:38:FF:C9
Traceback (most recent call last):
File "/home/klara/peripage-A6-bluetooth/./ppa6-print.py", line 2, in <module>
import bluetooth
File "/home/klara/.local/lib/python3.9/site-packages/bluetooth/__init__.py", line 45, in <module>
from bluetooth.bluez import *
File "/home/klara/.local/lib/python3.9/site-packages/bluetooth/bluez.py", line 8, in <module>
import bluetooth._bluetooth as _bt
ImportError: libbluetooth.so.3: cannot open shared object file: No such file or directory
Why is that? should the image be saved somewhere specific?
Hi! Thanks for your work!
Could you please port it to mac somehow? If that's possible..
I'd suggest to add a variable delay in the sending loop so printer will have enough time to print each part of received chunk without hanging
time.sleep(0.05)
In addition Android/ios application should be reverse engineered for more detailed protocol description, variable width printing, e.t.c, but they're obfuscated and shitcoded
@bitrate16 figured out that the S/N can be changed via a command:
Using the poke method i've found out that it has additional configuration commands, but now i've lost ability to print text and get S/N
UPD: S/N break code 10ff20f4
UPD2: Write [0x10ff20f4, 'S/N'] will overwrite S/N with new value 'S/N'. String has to be terminated with '\0'
UPD3: 10ffff** configures print modes
UPD4: I don't understand it, sending any raw string makes printer print it
_Originally posted by @bitrate16 in https://github.com/eliasweingaertner/peripage-A6-bluetooth/issues/1#issuecomment-803662260_
Goal of this issue to make this functionality available from the script.
I got this error in linux Mint
pip install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
Collecting PyBluez==0.23
Downloading PyBluez-0.23.tar.gz (97 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.6/97.6 KB 3.2 MB/s eta 0:00:00
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
error in PyBluez setup command: use_2to3 is invalid.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Could it be related to https://stackoverflow.com/questions/69100275/error-while-downloading-the-requirements-using-pip-install-setup-command-use-2 ?
HI, as the printer is also recognized via USB, would it be possible to add Support for printing via USB?
Thanks a lot for considering :-)
Hi,
I love your job! Thank you!
I tried the script this week and it works very well.
I am running the script through a nodejs server which creates a png and sends it to print.
Do you think it is possible to translate python to js using node-bluez ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.