I have an array
unsigned char v[4]
printf("set_parameter %c%c%c%c\n",v[0],v[1],v[2]v[3]);
printf("set_parameter %s\n",v);
Your string is not terminated. Make is 5 bytes and put v[4]='\0' Printf has no idea your string is only 4 characters long as all is sees is a pointer. Instead changing %s to %.4s might limit printf the showing the first 4 charactors