This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Is there any "getting started" guides or documentation for pc-ble-driver-py?

I'm having a hard time understanding the control flow in the Python implementation of pc-ble-driver. I've looked at the example and I can somewhat understand each step, but my understanding isn't enough that I would know where to modify the code in order to implement my own services and functions.

As recommended by this post, I've looked through the soft device documentation and the serialization API documentation. The issue is, I don't really see how they come into play with this. I understand that pc-ble-driver is mainly just making calls to the soft device over a USB connection and the soft device is reporting back what it finds to pc-ble-driver.

I would really benefit from either some documentation or even a guide similar to the one to make a custom service on the NRF52. Even some comments in the heart rate connector explaining what's going on would help immensely.

Thanks

Parents
  • Hello,

    The issue is, I don't really see how they come into play with this. I understand that pc-ble-driver is mainly just making calls to the soft device over a USB connection and the soft device is reporting back what it finds to pc-ble-driver.

    Yes, this is correct. The pc-ble-driver is really just a serialization of the SoftDevice API.

    I would really benefit from either some documentation or even a guide similar to the one to make a custom service on the NRF52. Even some comments in the heart rate connector explaining what's going on would help immensely.

    Unfortunately, the pc-ble-driver - and its python-ported subset pc-ble-driver-py - does not have a lot of examples, since they essentially just expose the SoftDevice API to a computer application.
    Einar's suggestion in the previous ticket that you linked is therefore a good way to start, and perhaps especially taking a look at the Message sequence charts - since these make different processes and interaction with the SoftDevice very clear, and is a good way to see how you should go about implementing different SoftDevice processes in your application.
    For the instance you mention, you might for example benefit from seeing GATTS ATT table populating sequence chart detailing the necessary communication between the app and the SoftDevice.
    If you are already somewhat familiar with the SoftDevice API, you may also look to the embedded examples from the SDK, to see the ordering of how different tasks and processes can be implemented. This does not always translate 1:1 to the pc-ble-driver calls, but the general ordering of the SoftDevice calls in different functions will still be the same as what you potentially could implement with the pc-ble-driver(-py).

    I hope this makes things a little bit more clear.
    Please do not hesitate to ask if any part of my answer should be unclear, or if you encounter any other issues or questions!

    Best regards,
    Karl

Reply
  • Hello,

    The issue is, I don't really see how they come into play with this. I understand that pc-ble-driver is mainly just making calls to the soft device over a USB connection and the soft device is reporting back what it finds to pc-ble-driver.

    Yes, this is correct. The pc-ble-driver is really just a serialization of the SoftDevice API.

    I would really benefit from either some documentation or even a guide similar to the one to make a custom service on the NRF52. Even some comments in the heart rate connector explaining what's going on would help immensely.

    Unfortunately, the pc-ble-driver - and its python-ported subset pc-ble-driver-py - does not have a lot of examples, since they essentially just expose the SoftDevice API to a computer application.
    Einar's suggestion in the previous ticket that you linked is therefore a good way to start, and perhaps especially taking a look at the Message sequence charts - since these make different processes and interaction with the SoftDevice very clear, and is a good way to see how you should go about implementing different SoftDevice processes in your application.
    For the instance you mention, you might for example benefit from seeing GATTS ATT table populating sequence chart detailing the necessary communication between the app and the SoftDevice.
    If you are already somewhat familiar with the SoftDevice API, you may also look to the embedded examples from the SDK, to see the ordering of how different tasks and processes can be implemented. This does not always translate 1:1 to the pc-ble-driver calls, but the general ordering of the SoftDevice calls in different functions will still be the same as what you potentially could implement with the pc-ble-driver(-py).

    I hope this makes things a little bit more clear.
    Please do not hesitate to ask if any part of my answer should be unclear, or if you encounter any other issues or questions!

    Best regards,
    Karl

Children
No Data
Related