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

Scripted measurements for NRF Connect Desktop

I am currently developing my app with nRF52 DK and use the nRF52480 Dongle as  a simulated sensor using the built-in server definition capabilities in nRF Connect for Desktop.

For example, my app would implement a CSCS client and the dongle is advertising such a service and the required characteristics. In order to test my code I will update measurement values in nRF Connect for Desktop (Windows 10).

In order to better test all this, it would be great if there was a possibility to feed a kind of measurement feed in the defined server. This could be either a basic scripting language or - in the simplest cases - a CSV or JSON file of raw values together with a setting when the next value should be sent (e.g. once a sec). This testing is especially helpful for time critical applications like in the sports sensors area in my opinion.

Regarding the scripting language I am thinking of a language where you could define something like:

def measurement {

length: 10

fields:

{

0: 0x03, fixed;

1,2,3,4: uint32_t, type: cumumlative, values: random(20,50)

5,6: uint16_t, type: cumulative, values: fixed(5)

...

update_interval: 1000ms

}

Something along that line, so for example every 1000s the measurement would create a new value starting with a fixed 0x03 byte, then 4 bytes with the cumulative sum of the previous val+random val between 20-50, etc. etc.

Do you think something like that could make it into a future release?

Or is there already a possibility for something like that and I failed to find that function?

Parents
  • Hi,

    If you need scripted BLE behaviour then we do have solutions for that in the form of pc-ble-driver (c, c++) and the wrappers pc-ble-driver-js (javascript) and pc-ble-driver-py (python). They use serialization of the SoftDevice, i.e. (desktop) applications using those libraries use the same underlying API as applications developed with nRF5 SDK for running on nRF devices.

    nRF Connect for Desktop uses pc-ble-driver-js for its BLE backend, and the nRF Connect BLE app is primarily intended for manual, non-repetitive, operation. For automated setups we have the variants of pc-ble-driver.

    Regards,
    Terje

Reply
  • Hi,

    If you need scripted BLE behaviour then we do have solutions for that in the form of pc-ble-driver (c, c++) and the wrappers pc-ble-driver-js (javascript) and pc-ble-driver-py (python). They use serialization of the SoftDevice, i.e. (desktop) applications using those libraries use the same underlying API as applications developed with nRF5 SDK for running on nRF devices.

    nRF Connect for Desktop uses pc-ble-driver-js for its BLE backend, and the nRF Connect BLE app is primarily intended for manual, non-repetitive, operation. For automated setups we have the variants of pc-ble-driver.

    Regards,
    Terje

Children
No Data
Related