Skip to content

Sendig different BLE characteristics #24

Open

Description

@ANPuroOsso

Hello I'm currently trying using the BLE Sensor APP by STM and I would like to work around the BLE 20 bytes cap when sending information. Basically I want to know if the APP's structure given in this repository supports the receivement of two differente BLE packages, as in an example: first my tile sends information of a given set of sensors and then, after the APP has received it the tile sends out information related to a different set of sensors

What's happening now is that I'm alternating bewtween sending package 1 with a set of sensors and package 2 with completely different sensors but what's happening is that package1's info is getting on where I showcase package 2 sensor's info and vice versa. Could the problem be in sending these 2 information packets with the same UUID or is it something that the frontend is doing wrong? And so, how can I fix it?

Activity

  1. ANPuroOsso commented on Jan 28, 2020

    @ANPuroOsso
    Author

    Would enabling notifications of certain sensors when I'm about to receive the package corresponding to them while desabling notifications of the other package's sensors and vice versa work?

  2. GiovanniVisentiniST commented on Jan 28, 2020

    @GiovanniVisentiniST
    Contributor

    the extractData method is called from a concurrent queue, so the is no guarantee about the order that it is executed, probably that is your problem.

    you can use 2 different uuid and enable the notification on both.

  3. ANPuroOsso commented on Jan 28, 2020

    @ANPuroOsso
    Author

    @GiovanniVisentini Oh I see, I'm just a little confused about the "UUID", do you mean when the tile is sending characteristics there's a UUID representing the BLE package and I should make 2 differents UUID's for those messages(one for each package)? If so, how exactly can I generate a new UUID to attach to this new BLE package?

  4. GiovanniVisentiniST commented on Jan 28, 2020

    @GiovanniVisentiniST
    Contributor

    you can see the UUID as an address where read the data, you define 2 data location one for a set of sensors and the other for another set of sensors.
    then you enable the notification on this 2 Feature and you will receive the notification on different classes.

  5. ANPuroOsso commented on Jan 28, 2020

    @ANPuroOsso
    Author

    @GiovanniVisentini I see, so it's something primarily defined by the backend? And by that I mean the STM tile code responsible for sending the data?

  6. GiovanniVisentiniST commented on Jan 28, 2020

    @GiovanniVisentiniST
    Contributor

    the STM Tile needs to export the UUID that you want to read, otherwise from the mobile you can read/receive notification..

  7. ANPuroOsso commented on Jan 28, 2020

    @ANPuroOsso
    Author

    I got that, so what you're saying is that when the STM Tile builds the package with the sensor's measurement in it's backend code to be sent to the app, also in that code it needs to be defined an UUID corresponding to that package?

  8. ANPuroOsso commented on Jan 28, 2020

    @ANPuroOsso
    Author

    where in APP'S code does can I find the UUID exported by the tile?

  9. GiovanniVisentiniST commented on Jan 28, 2020

    @GiovanniVisentiniST
    Contributor

    but all the UUID listed there are already manage by the sdk..
    and by the way the data exported depends to the firmware that you are running..

  10. ANPuroOsso commented on Jan 28, 2020

    @ANPuroOsso
    Author

    So what should I implement on the app's code to handle a different UUID?

  11. GiovanniVisentiniST commented on Jan 28, 2020

    @GiovanniVisentiniST
    Contributor

    see here:
    #23

  12. ANPuroOsso commented on Jan 28, 2020

    @ANPuroOsso
    Author

    Sorry I still don't get it, the other thread I made was about adding external features not sending 2 different BLE packages

  13. ANPuroOsso commented on Jan 28, 2020

    @ANPuroOsso
    Author

    Does the tile have to send the UUID: "7e7419d5-cad5-4f01-91e2-2f3e5cd0a72c" when sending FeatureMyCustomClass data, is that what you're saying?
    image

  14. GiovanniVisentiniST commented on Jan 28, 2020

    @GiovanniVisentiniST
    Contributor

    the tile has to export the characteristics with that UUID..

    you can use this sdk without knowing about uuid, and how the data are arriving to the mobile..
    but if you want to do something custom it is better if understand how the BLE works.
    otherwise we both lost time..

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