Solving the problem is what counts. Being "elegant" or something can be a second goal most of the time.
What is the purpose of these lines:
If you can run strlen on the arguments, then there already is a '\0' there. Do you need to ensure there are two '\0's at the end of the string?
com[strlen(com) + 1] = '\0';
val[strlen(val) + 1] = '\0';
Why not pass in the com and val buffers as arguments to the function? Then you can call it easily from an outer function:
Also its up to you but I like to name it the other way, command_read, command_parse, etc. Then all the "command_" stuff sorts nicely together
parse_command(cmd, arg1, arg2);
EDIT: You can replace
chr = str;
That's what a for loop is for
for (chr = str; *str; chr++)