Skip to content

How can I get any incoming message(without using Feature class) and send it to external parser? #18

Open

Description

@AviyaSmila

How can I get any incoming message(without using Feature class) and send it to external parser?

Activity

  1. GiovanniVisentiniST commented on May 2, 2019

    @GiovanniVisentiniST
    Contributor

    why you can't parse it inside the Feature?

    by the way all the SDK is based on Feature, if you don't use it you can't enable notification/read characteristics ecc..

    you can do a feature that copies all the data inside the Sample class end then do the parsing inside the onUpgrade method.. but the feature.extractData method exist to do the message parsing..

    you can look to this class if you want to see something where not all parsing is done inside the extractData method: FFTAmplitude

  2. AviyaSmila commented on May 2, 2019

    @AviyaSmila
    Author

    OK, how is the SDK map the incoming data to the relevant feature?

  3. GiovanniVisentiniST commented on May 2, 2019

    @GiovanniVisentiniST
    Contributor

    yes exactly.
    After that you register a the Feature class (mapping the UUID with the class that will manage it) you can forget the UUID the sdk will take care to see if it present and do the correct operation on it, and will present you the parsed data.

  4. AviyaSmila commented on May 2, 2019

    @AviyaSmila
    Author

    Ok.
    But how is this happening?
    Our BLE device isn`t ready yet and I want to get to know how the data processing is happening in the SDK

  5. GiovanniVisentiniST commented on May 2, 2019

    @GiovanniVisentiniST
    Contributor

    ✨ Magic ✨ 😜
    and something related to this code:

    for (BluetoothGattCharacteristic characteristic : service.getCharacteristics()) {

  6. AviyaSmila commented on May 2, 2019

    @AviyaSmila
    Author

    OK, Im starting to get it... another question - when I get the features of the node via the getfeatures() method the list dosent include the custom features which ive added..
    how can I get those?

  7. GiovanniVisentiniST commented on May 2, 2019

    @GiovanniVisentiniST
    Contributor

    you can request directly your feature with this:
    getFeature

    your custom char should be attached to the Node with this if:

    }else if(mExternalCharFeatures!=null &&

    if your custom feature is not present:
    1- you register it in a wrong way
    2- the UUID is not present in the device
    3- there is a bug in the sdk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions