Open KlemenDEV opened 10 months ago
I have started to work on Java bindings, but am currently stuck at #267
@KlemenDEV Just like you, I am also developing Java bindings. If you don’t mind, I would like to contribute to your development work. Could you please share with me the URL of your repository?
I would love this! Any work in progress that I can take a look at?
@KlemenDEV how did you go with Java bindings? I have made good progress, but am currently stuck on passing my user-defined structs to the simpleble_peripheral_write_command
function. Any assistance would be appreciated!
The project got a bit stuck because it is currently not the priority at the company I was working on those bindings for
No worries, I will post up my repo so others can critique it - it's close I think but I'm not implementing the Pointers correctly I think with JNI-FFI (for function calls using structs)
Here's where I have gotten up to, very messy at the moment but not sure if it is similar to where you left off?
If I can get something to work I will definitely update this code and share it with SimpleBLE
Hi @KlemenDEV, I finally got Java bindings to work using Java Native Access. The weirdest thing was that I needed to change the parameter order for "simpleble_peripheral_write_command" in order for it to work...? So I think JNA was mixing up calling conventions somewhere along the way, so it may not be that stable.
Anyway, the code is here. Happy for questions/comments/feedback!
It would be neat to have Java bindings for this library. There is currently no BLE desktop Java library to my knowledge.
JNA/SWIG/JNR-FFI could be used to achieve this.
Originally this was a comment at #121 but moved to a separate ticket.