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

pc-ble-driver-py read rssi of connected device

Hi,

I've been using the python bindings for the pc-ble-driver and have been getting things to work, but I noticed there is no API exposed for reading the RSSI of a connected device.

I see that there are functions in the driver to Start/Stop/Get RSSI but I am not sure on how to exposed them to the python layer. Any ideas?

Thanks,

Gabe

Parents
  • Hi,

    You should be able to call everything used in pc-ble-driver from python, as we automatically generate bindings for the API used in pc-ble-driver. You will see examples of that in ble_driver.py, e.g. on line 1787:

    driver.sd_ble_gatts_exchange_mtu_reply(self.rpc_adapter, ble_event.evt.gatts_evt.conn_handle, self.ble_enable_params.att_mtu)

    In the file pc-ble-driver-py/swig/pc_gle_driver.i.in you will see a list of "%include" directives for the header files that bindings are generated for. All functions except those specified with "%ignore" directives in the same file gets bindings.

    Regards,
    Terje

Reply
  • Hi,

    You should be able to call everything used in pc-ble-driver from python, as we automatically generate bindings for the API used in pc-ble-driver. You will see examples of that in ble_driver.py, e.g. on line 1787:

    driver.sd_ble_gatts_exchange_mtu_reply(self.rpc_adapter, ble_event.evt.gatts_evt.conn_handle, self.ble_enable_params.att_mtu)

    In the file pc-ble-driver-py/swig/pc_gle_driver.i.in you will see a list of "%include" directives for the header files that bindings are generated for. All functions except those specified with "%ignore" directives in the same file gets bindings.

    Regards,
    Terje

Children
Related