Implementing discovery service. Getting undefined error with bt_dis_pnp_params. };

Hi,

I am implementing discovery service but getting undefined error with below

bt_dis_pnp_params pnp_id = {
        .vendor_id_source = BT_DIS_VENDOR_ID_SRC_USB,
        .vendor_id = 0x1234,
        .product_id = 0x5678,
        .product_version = 0x0100,
    };
I followed the below steps:
1. Added CONFIG_BT_DIS_PNP=y to prj.config file
2. Added the header file 
#include <zephyr/bluetooth/services/dis.h>
But still getting undefined error while building.
Please, suggest me how to resolve the issue. Need urgent help.
Thanks in advance.
Parents
  • Hello,

    There should be multiple examples already that use CONFIG_BT_DIS_PNP=y, I suggest to take a look at those for comparison. Search for CONFIG_BT_DIS_PNP=y in prj.conf files.

    Kenneth

  • I followed the below steps before posting here:
    1. Added CONFIG_BT_DIS_PNP=y to prj.config file
    2. Added the header file 
    #include <zephyr/bluetooth/services/dis.h>
Reply
  • I followed the below steps before posting here:
    1. Added CONFIG_BT_DIS_PNP=y to prj.config file
    2. Added the header file 
    #include <zephyr/bluetooth/services/dis.h>
Children