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

Device information service dis length limit

Hello!

I fill in a dis struct with the fields manufact_name_str, fw_rev_str and sw_rev_str. Everything is dandy and works perfect.

Then I also fill in the field serial_num_str and suddenly there is seems to be a length limit on sw_rev_str.

What I actually try to fill in sw_rev_str is a git describe field, some like sw-1.0.0rc2-19-g0b187ac-dirty.

Is that so and, if so, what is the length limit? I have solved the problem by removing the -dirty part above, so this is more out of curiosity.

Thanks and best regards

/spe

  • I tried recreating it with this code:

    uint8_t serial_num_str [] = "sw-1.0.0rc2-19-g0b187ac-dirty";
    dis_init.serial_num_str.p_str = serial_num_str;
    dis_init.serial_num_str.length = sizeof(serial_num_str);
    
    uint8_t manufact_name_str[] = "sw-1.0.0rc2-19-g0b187ac-dirty";
    dis_init.manufact_name_str.p_str = manufact_name_str;
    dis_init.manufact_name_str.length = sizeof(manufact_name_str);
    
    uint8_t fw_rev_str[] = "sw-1.0.0rc2-19-g0b187ac-dirty";
    dis_init.fw_rev_str.p_str = fw_rev_str;
    dis_init.fw_rev_str.length = sizeof(fw_rev_str);
        
    uint8_t sw_rev[] = "sw-1.0.0rc2-19-g0b187ac-dirty";
    dis_init.sw_rev_str.p_str = sw_rev;
    dis_init.sw_rev_str.length = sizeof(sw_rev);
    

    It seemed to work fine.

    1. How do you figure there is a length limit? Can you connect? Or do you get errors?
    2. What SDK and SD versions are you using?
Related