121
submitted 7 months ago* (last edited 7 months ago) by darkhz@lemm.ee to c/linux@lemmy.ml

Hello Lemmy,

I am the author of bluetuith, an open-source TUI-based bluetooth manager for Linux only. I have been working on this project for over 2 years on and off, and I was wondering about extending support to other platforms as well.

To begin with, the Bluetooth Classic (BR/EDR) implementation on Linux is fairly standardized (via bluez APIs), but on other platforms, especially windows, Bluetooth APIs are finicky, and tricky to deal with, and also there is no standardized management in general.

I would like to start creating a centralized Bluetooth server or a daemon for other platforms (natively maybe), mainly Windows and Linux, which can expose relevant APIs so that clients can use them to handle Bluetooth-based operations. I know this is quite an uphill task, but I would like suggestions on how to implement it, or if anyone has a better idea, please do suggest that as well.

To summarize, my current plan is this:

  • Create bluetooth servers natively for each platform, utilizing the platform's proven APIs to handle bluetooth-based functions and expose a standard API to clients
  • Adapt clients to use said APIs provided by the daemons to allow the user to control bluetooth in general.

For the server implementation (mainly to other platforms), I will require contributors, so contributors are highly welcome to be involved in the project. I am in the process of securing an NLnet grant to invest into this project and mainly pay contributors to implement this platform-wise (the proposal has been accepted, and the negotiation call will be hosted in a few weeks, more details about this can be further published if anyone has questions about this. If contributors are confirmed, maybe the budget could be adjusted as well).

I apologize if the post is naive or does not fit this community's guidelines, and if it doesn't, a comment on where to redirect this question would be great.

Constructive feedback is appreciated. Thank you.

Note: By Bluetooth operations, I mainly mean Bluetooth Classic based operations.

top 17 comments
sorted by: hot top controversial new old
[-] SmoochyPit@lemmy.ca 13 points 7 months ago

I currently use and love bluetuith! I hope you are able to secure funding and contributors, as this sounds like it could be a great development.

[-] Qkall@lemmy.ml 4 points 7 months ago

Chiming in, pinephone homies love this ish. Thanks homie

[-] MonkderDritte@feddit.de 11 points 7 months ago

Better go with cross-platform in the sense of other unixes and maybe mac.

Windows is a different beast.

[-] darkhz@lemm.ee 6 points 7 months ago

Windows is indeed a different beast, which is why I am looking for contributors. For Linux it can be done, but since I don't have a macOS based device, I cannot work on a macOS based implementation.

[-] Vivendi@lemmy.zip 3 points 7 months ago

There is nothing preventing you from BSDs , tho

[-] cobra89@beehaw.org 3 points 7 months ago* (last edited 7 months ago)

While contributing is great, the BSDs are kinda dying and it's probably better to spend that effort elsewhere. Even TrueNAS is leaving the BSD space. The fact that most applications are shipping via docker/Flatpak/snap etc. and that BSD does not have a good solution for those does not bode well for BSD.

There just really isn't that much development for BSD anymore. Everyone who wasn't on Linux is moving over to it.

[-] juja@lemmy.world 1 points 7 months ago

I have been looking for some client tool to interact with Bluetooth on windows. After a lot of searching, I came up empty so I bit the bullet and decided to code one myself and managed to create a small command line utility using C# .Net and it was surprisingly easy. It would have been so awesome if something like bluetuith had existed for windows so I’d be happy to contribute. I should point out though that I have not written any windows based app/tool ever and this was the first one so I would definitely have some learning and research to do. I mainly use a Mac for work and personal stuff so I can contribute for the Mac portion of it as well if required. As to the implementation itself, would it be viable to use something like rust which already has cross platform support so that the server component can just be a single codebase instead of platform specific?

[-] darkhz@lemm.ee 1 points 7 months ago

I would like to be involved in the development as much as I can, but I cannot work on rust since I have no experience with it, unlike with Go and Java (a little). Also, cross-platform libraries tend to have more limitations and caveats as to what is implemented and usable. But please, do link the rust library here so I can check it out.

I think platform specific binaries is the way due to more flexibility, although we can debate about that. My objectives are to provide a standard API for any bluetooth client to use, and to retain bluetuith's existing features. If you are willing to contribute to the MacOS part of it, it would be great, and we can have further discussions via DM.

[-] juja@lemmy.world 1 points 7 months ago

I just mentioned rust as that was the first thing that came to my mind. I’ve not worked with it either. I am ok to take whatever direction you think is appropriate for the product. I just want to contribute to the tool since I was also looking for something like this in the past and I can see this tool being useful for me for my own personal projects. I can definitely help with the macos part if that’s what you need help in. Please feel free to DM me.

[-] Fuck_u_spez_@sh.itjust.works 9 points 7 months ago

Absolutely love the name.

[-] xavier666@lemm.ee 3 points 7 months ago

I've been looking for a TUI application. Ma man!

[-] Synnr@sopuli.xyz 3 points 7 months ago

Is it true the Bluetooth network stack is larger than the WiFi network stack? If so, why? I don't know much about BT besides pairing, allowing calls and audio in/out, transferring files, and.. is there more? It takes a day of reading documentation to understand all the advanced options on my ASUS router interface, and that's without anything proprietary.

I'm just surprised and curious and never got a satisfying answer.

[-] darkhz@lemm.ee 5 points 7 months ago

It's not about the size of the stacks IMO, the Bluetooth stack is notoriously difficult to interact with since the implementation varies wildly across different platforms and maybe architectures, and communicating with those different stacks is difficult, in a way. And within each stack you may find many features that are sparsely or not documented at all.

Just saying, but if it were easy, cross-platform libraries would have been developed long ago, but to this day most libraries have implementations where some functions are either finicky or not implemented. In no way am I trying to criticize the authors of those libraries, IMO it is a commendable achievement that they have understood the standard and the different stacks and have attempted make it cross-platform friendly and easy-to-use, but that's just the state of Bluetooth these days.

[-] Synnr@sopuli.xyz 1 points 7 months ago* (last edited 7 months ago)

That does go a long way towards explaining why there are so many Bluetooth vulnerabilities, thanks for the info. Looking at the list of Bluetooth protocols wiki page gives me a headache. Surely there is a better standard, and I see things like HaLow, ZigBee, Z-Wave and other custom protocols, but it seems like there should be a very cleanly well-documented alternative to do the basics that everyone expects BT to do. This, coming from a total noob, speaking completely out of my anus. I just know that as a BT user, it's a crapshoot whether there will be major audio delay, and pause/play actually worked, that's if pairing works in the first place. But if something did come along I wonder if there would even be adoption among consumer devices.

[-] dubba@feddit.de 3 points 7 months ago

Do you already known about https://doc.qt.io/qt-6/qtbluetooth-index.html? That should give you cross-platform Bluetooth access with a single API.

[-] darkhz@lemm.ee 3 points 7 months ago

Yes, I am already considering it, but it has various limitations, which I would like to avoid.

[-] mexicancartel@lemmy.dbzer0.com 1 points 6 months ago

Build it till microsoft include it in windows lol

this post was submitted on 28 May 2024
121 points (97.6% liked)

Linux

48740 readers
1189 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS