This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Adding Characteristic User Description 0x2901,0x2902

Hi Team,

I am trying to implement Blugiga's cable replacement service in Nordic chip. I have successfully changed required UUIDs for services and characteristics please refer it here

Now unable to do following:

  1. Adding Characteristic User Description 0x2901,0x2902

  2. I need to maintain backward compatibility with current Mobile Application which communicates with bluegiga using following:

Mobile App to Blugiga Opcode: Write Request (0x12) Handle: 0x000a Value: 0200

Opcode: Prepare Write Request (0x16) Offset: 0 Value:38a3cf34fb27d83b8e58db

Blugiga to Mobile App Opcode: Handle Value Indication (0x1d) Handle: 0x0008 Value:010203031

I am modifying ble_uart application which uses different handles and commands to communicate with nordic's uart mobile application.

What to do so that I can make non-nordic Mobile application to work with Nordic soc.

Please help!!!

Regards, Milan

Parents
  • First of all, here is a reference explaining what the adopted UUIDs mean: developer.bluetooth.org/.../DescriptorsHomePage.aspx. You are lacking a User Description and a CCCD for your characteristic.

    To add a user description, see here: developer.nordicsemi.com/.../a00283.html. The p_user_desc_md must be pointing to a proper ble_gatts_attr_md_t. This is very close to how you add a CCCD, so you can look in other examples how that is done. Also set char_ext_props.wr_aux to 1 if it is writable.

    Simply add a CCCD to add the UUID 0x2902 descriptor.

  • //mj uint32_t err_code; ble_gatts_attr_md_t cccd_md; ble_uuid128_t nus_base_uuid_char = NUS_BASE_UUID_CHAR;

    memset(&cccd_md, 0, sizeof(cccd_md));
    
    BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm);
    BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.write_perm);
    
    cccd_md.vloc = BLE_GATTS_VLOC_STACK;
    //mj
    
    memset(&char_md, 0, sizeof(char_md));
    	char_md.char_props.indicate			 = 1; //mj
    char_md.char_props.write         = 1;
    //char_md.char_props.write_wo_resp = 1; //mj
    char_md.p_char_user_desc         = NULL;
    char_md.p_char_pf                = NULL;
    char_md.p_user_desc_md           = NULL;
    char_md.p_cccd_md                = &cccd_md; //mj NULL earlier
    char_md.p_sccd_md                = NULL;
    

    Still not showing 0x2901 in Mobile Application.

Reply
  • //mj uint32_t err_code; ble_gatts_attr_md_t cccd_md; ble_uuid128_t nus_base_uuid_char = NUS_BASE_UUID_CHAR;

    memset(&cccd_md, 0, sizeof(cccd_md));
    
    BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm);
    BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.write_perm);
    
    cccd_md.vloc = BLE_GATTS_VLOC_STACK;
    //mj
    
    memset(&char_md, 0, sizeof(char_md));
    	char_md.char_props.indicate			 = 1; //mj
    char_md.char_props.write         = 1;
    //char_md.char_props.write_wo_resp = 1; //mj
    char_md.p_char_user_desc         = NULL;
    char_md.p_char_pf                = NULL;
    char_md.p_user_desc_md           = NULL;
    char_md.p_cccd_md                = &cccd_md; //mj NULL earlier
    char_md.p_sccd_md                = NULL;
    

    Still not showing 0x2901 in Mobile Application.

Children
No Data
Related