kable icon indicating copy to clipboard operation
kable copied to clipboard

Support Linux / Windows JVM targets

Open danielgruber opened this issue 2 years ago • 16 comments

Currently, the Kable Library does not support Windows or Linux targets.

There are libraries like https://github.com/weliem/blessed-bluez, that support Windows or Linux. It would be great to investigate if this could be an approach for kable to extend the platform compatibility. I really like the APIs from Kable, so I would prefer using such a library for all platforms instead of using different ones.

danielgruber avatar Sep 19 '22 06:09 danielgruber

Same request for macOS!

saket avatar Oct 12 '22 20:10 saket

Same request for macOS!

@saket MacOS is already supported. 🙂

twyatt avatar Oct 12 '22 20:10 twyatt

I'm sorry, I meant support for macOS through JVM

saket avatar Oct 12 '22 20:10 saket

I've done some initial investigation into this. DBus seems to be the standard approach to communicating with Bluez on JVM (it is what Blessed Bluez library, that was linked, is doing).

Unfortunately, my development machine is a Macbook, and macOS doesn't have DBus out-of-the-box — it can be set up, but it seemed like a bigger lift than I have time to take on right now.

I might try to get a hold of a Raspberry Pi (with BLE) for testing, but ideally I may look into getting an affordable Linux box for developing this feature.

All that is to say: I am interested in moving the needle on this one, but it will likely be a long ways out.

twyatt avatar Jun 21 '23 07:06 twyatt

Good morning, any update on this? :) I've been using this library for a while, and I would love to be able to use it in the JVM as well!

donadev avatar Aug 07 '23 07:08 donadev

Unfortunately, no new movement yet. I've been swamped with other projects and haven't yet invested in a machine that I can install Linux on (for developing this feature).

I am very interested in adding support for this, but I imagine it will be a couple months before I can focus on this again. 😢

twyatt avatar Aug 07 '23 17:08 twyatt

Any update here? Could a first step be to provide void implementation(throws e.g. some runtime exception) so it's possible to compile this for jvm along with other targets (iOS, android). Otherwise we need to wrap BLE interface in expect and provide kable as an actual implementation in the available targets.

konpach avatar Jan 21 '24 20:01 konpach

I like that idea, unfortunately I'm swamped with other work projects at the moment.

twyatt avatar Jan 26 '24 00:01 twyatt

I have a PR for you to add this! How to contribute?

konpach avatar Jan 26 '24 10:01 konpach

@twyatt if the project is not open for contribution I am happy to send/upload the code change and you can review and add it to the project. I am talking about adding a void jvm implementation as proposed above.

konpach avatar Jan 30 '24 08:01 konpach

Kable is definitely open to contribution, it is under the Apache 2 licence with numerous contributors.

Create a PR and project maintainers will review it.

twyatt avatar Jan 30 '24 16:01 twyatt

Screenshot 2024-01-30 at 18 56 45 Screenshot 2024-01-30 at 18 56 58

@twyatt Creating a PR right away is not possible, only if I fork and propose. Maybe I'm getting something wrong though.

konpach avatar Jan 30 '24 17:01 konpach

Yes, please fork. You can push your existing branch (add-jvm-target-with-void-implem) to your fork, then create a PR. The head repository will be your fork and branch, and the base repository would be JuulLabs/kable with base: main.

twyatt avatar Jan 30 '24 18:01 twyatt

Might be possible to implement with JNI bindings to this: https://github.com/OpenBluetoothToolbox/SimpleBLE

cedrickcooke avatar Jan 31 '24 22:01 cedrickcooke

Looks like they changed their license so we can't use this without reaching out, but they have exceptions for other open-source BLE libraries like https://github.com/thegecko/webbluetooth, so it might still be possible.

cedrickcooke avatar May 16 '24 17:05 cedrickcooke

I sent an email to SimpleBLE on Jun 6, 2024, I'll post updates on this issue if I hear back.

twyatt avatar Jun 10 '24 21:06 twyatt