Help with array : How to compare

                 text_arrived[i] = buf[i], char();

What do you think this is doing? Specifically, what is the , char() bit doing?

        char text_static[2] =  {'2','?'};

This is NOT a string. A string is a NULL terminated array of chars. This is an array of chars, but it is not NULL terminated, so it can not be passed to the strcmp() function.

        char text_arrived[buflen];

There is no room for a NULL, so this can't be passed to strcmp(), either.