I've done this a hundred times. Change:
char b[2] = {0xBD, 0x74};
To
unsigned char b[2] = {0xBD, 0x74};
Or, better yet
uint8_t b[2] = {0xBD, 0x74};
Note that char
can be more than 8 bits (I worked on a system with a 32-bit char size)