piksel / pytouch-cube

Qt5 Label Editor for Brother P-Touch Cube label maker
MIT License
48 stars 9 forks source link

feat: bluetooth socket support #40

Open piksel opened 2 years ago

piksel commented 2 years ago

Allows directly printing to the printer through a BlueZ BluetoothSocket without pairing and creating a virtual serial device (/dev/tty or /dev/rfcomm). Windows and mac support probably needs some work, but using serial ports are still supported as before.

Fixes #39

tyalie commented 2 years ago

It works over UI, but it currently throws an async error over CLI when I don't define the device, as it tries to to execute find_default_device without awaiting it, similar errors happen when trying to print using an rfcomm0 device. But I would gladly help there.

piksel commented 2 years ago

Yeah, I am currently working on re-implementing this using using QtBluetooth instead. It uses BlueZ as well, but seems more stable. Instead of clearing all entries, async polling, and then updating the list, it will add every device as discovered (using signals). That way we don't need to use qasync and we can poll for a long time without having the user wait for the entire poll duration. Making this draft for now, and probably superseding it for the new branch if no other problems come up.