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

Are there plans to support Rx-BluetoothGattServer? #152

Open
brightredchilli opened this issue Mar 28, 2017 · 9 comments
Open

Are there plans to support Rx-BluetoothGattServer? #152

brightredchilli opened this issue Mar 28, 2017 · 9 comments
Labels
question / library Issue containing question / discussion about library workings

Comments

@brightredchilli
Copy link

brightredchilli commented Mar 28, 2017

Hi, I'm working on a project that starts a ble server. As far as I can tell, this library does not wrap BluetoothGattServer. Are there plans for this, and if so, would it be interesting for me to try to get a PR in of something that I have in place? I based my work heavily on how this library is structured.

This is how I imagine the interface would look like:

public interface RxBleServer {

    /***
     * Returns all writes that happen on a particular characteristic UUID. No validation
     * if you subscribe on a characteristic that is not actually a write characteristic.
     * Assembles values if they are written in chunks.
     */
    public Observable<byte[]> getCharacteristicWrites(UUID characteristicUUID);

    /***
     * Send an indication on a characteristic.
     */
    public Observable<Integer> indicateCharacteristic(BluetoothGattCharacteristic characteristic,
                                                      byte[] value);
}
@dariuszseweryn
Copy link
Owner

dariuszseweryn commented Mar 29, 2017

Hello @brightredchilli
Thanks for your interest. I would definitely like a functionality like this wrapped in an reactive approach.
This idea would need a separate module in my opinion (i.e. rxandroidbleserver) as most apps would need either central or peripheral functionality but rather not both.
It is interesting tough how Android would handle both roles at once — but that is a different topic.
Either way - a green light from me.

@dariuszseweryn dariuszseweryn added the question / library Issue containing question / discussion about library workings label Mar 29, 2017
@brightredchilli
Copy link
Author

Alright, that sounds great - i imagine we'd need to maintain a separate dev branch while the server side stuff gets up to speed - its probably not going to have all of the layers and bells and whistles that the client side has for a bit. I'll start off with 'getWriteCharacteristic'(get all ble writes to a characteristic on this gatt server), in my opinion this has the least dependencies and is the easiest to understand.

@dariuszseweryn
Copy link
Owner

A good idea from @uKL: prepare the server module so it could be easily plugged in instead of an RxBleDeviceMock. To do that there will be a need for an Interface for all Android components used in the server.

@dustedrob
Copy link

Is there any ongoing work for this. Would love to collaborate?

@kobronson
Copy link

Hi @dariuszseweryn

is there any plan to release RxAndroidBle version with server support? If yes, then when it is expected to arrive?

@dariuszseweryn
Copy link
Owner

Hello @kobronson

We have a plan (as you see this issue being opened) but it is not decided yet in what version of the library (or a different project) it will be available nor when will it arrive. There are things that have greater priority at the moment.

External pull requests are welcomed though. :)

@uKL
Copy link
Collaborator

uKL commented Mar 16, 2018

Just to mention that the API may be shared with the mock #370

@EskelCz
Copy link

EskelCz commented Oct 16, 2018

@DariuszAniszewski I could really use this, how much work would a simple implementation take? Maybe I can fund a Bounty on it.

@dariuszseweryn
Copy link
Owner

Thank you for the proposal.

From my experience there is not much trouble using the vanilla Android API for the BLE Server.

The general idea for the server functionality was about enabling an easy mocking experience for test purposes of this library. Unfortunately we are short on time/people to maintain the mockclient so we have not invested time into the topic — there are other things with greater priority at this moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question / library Issue containing question / discussion about library workings
Projects
None yet
Development

No branches or pull requests

6 participants