BC118 possible bug


#1

I’m testing a BC118 module in my project but it seems it’s not accepting a frame starting with 0x00 when I write this frame to it, using the SND command.

When I start the frame with “0x00”, the MelodySmart Android App shows “ERR”.

This is a piece of code to illustrate it better:

char BLE_Buffer_Tx[30];

char byTest[] = {0x00, 0x0A, 0x0A, 0x0B, 0x0B};
memcpy(&BLE_Buffer_Tx, "SND ", 4);  //Consider I'm using the space character after SND.
memcpy(&BLE_Buffer_Tx, byTest, 5);
memcpy(&BLE_Buffer_Tx, "\r", 1);

If I write this frame (BLE_Buffer_Tx) to BC118, the message “ERR” will appear in MelodySmart App.
Otherwise, if I change only the first byte to any value other than 0x00, it will work:

U8 byTest[] = {0x01, 0x0A, 0x0A, 0x0B, 0x0B};
memcpy(&BLE_Buffer_Tx, "SND ", 4);
memcpy(&BLE_Buffer_Tx, byTest, 5);
memcpy(&BLE_Buffer_Tx, “\r”, 1);

In this case, MelodySmart Android App will show Ok.

I’m trying to figure out what’s causing this problem. Could anyone help me with this?

Thx!