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

Cross-platform interoperability #50

Open
darkhz opened this issue Jan 14, 2024 · 4 comments
Open

Cross-platform interoperability #50

darkhz opened this issue Jan 14, 2024 · 4 comments
Assignees
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@darkhz
Copy link
Owner

darkhz commented Jan 14, 2024

The current objective is to make the app cross-platform (Linux, macOS, Windows mainly).

The requirements are:

(a) Basic device interaction (connect/pair/authentication)
(b) OBEX support (for file transfer)
(c) Control remote playback / change audio profiles
(d) Networking (PANU/DUN)

Since the APIs differ across platforms, and there is no mature library (that I know of) that can handle these requirements, I would like some suggestions from the users/community on how to proceed with this.

For example: tinygo/bluetooth has limited cross-platform support, and its APIs aren't mature. Also, OBEX, remote playback and networking features are not present in the library, and it would be tedious to implement from scratch.

Some ideas:

tinygo/bluetooth

Maybe wait until the tinygo/bluetooth library becomes mature, and then use its APIs.

Qt

The Qt Bluetooth library has broader support for various platforms.

Using the Qt bindings for Golang (this isn't active apparently, a newer fork of this will be used), the Qt Bluetooth APIs could be leveraged.

The caveat is the building process (cross-compilation). Binary sizes may be bigger, but there are methods to reduce the size.

Any more ideas/opinions from the community will be much appreciated.

@darkhz darkhz added help wanted Extra attention is needed question Further information is requested labels Jan 14, 2024
@darkhz darkhz self-assigned this Jan 14, 2024
@darkhz darkhz pinned this issue Jan 14, 2024
@ulissesjdeo
Copy link

Hi, it will be awesome to have a great and lightweight tools like this one in each platform (despite I personally think it's not necessary, but that's not the point). I got some search and see that the repos that you've pointed are the best for doing this. My point is that at this moment we should wait, in a few months Plasma 6.0 will be released, and a lot of users will be using it and because of that we should wait for lots of issues and improvements about Qt6, by another side Golang is continuous getting better, so both of them are constantly changing, and the fork you've mentioned didn't get commits by a year, so my idea is to wait if any go or qt6 news are going to be implemented in those bindings, possibly what I'm saying doesn't make any sense and that fork will be working extremely fine for years and then it will be updated. Just a fear about investing time in using a possibly dropped project. Maybe getting in contact with repo maintainers?

@darkhz
Copy link
Owner Author

darkhz commented Feb 11, 2024

@ulissesjdeo I agree, I was planning to wait as well. I did a few experiments with bluekitchen and the Qt6 bluetooth library, but yes, it will take effort and time to build a bluetooth daemon-like service for all platforms.

@darkhz
Copy link
Owner Author

darkhz commented Jun 28, 2024

[EDIT]
Update on this:

The plan is to write cross-platform lightweight shim like applications natively for each platform, with which the client can interface with via IPC and operate Bluetooth.

For Windows, a shim will be written in C# and for MacOS a shim will be written in Swift.
For FreeBSD, interfacing will be done with blued, NetBSD may be supported later and OpenBSD will not be supported.

A cross-platform daemon will then be built to use the platform specific shims.

The implementation details are still being worked out, so stay tuned.
See: https://github.com/bluetuith-org

If anyone has any suggestions post it here.

@darkhz
Copy link
Owner Author

darkhz commented Jul 19, 2024

Edited the above comment to reflect new plans.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants