if the string is a String, not a char *, then you need to use str.c_str() to convert it to a c-string
kinda confusing. not even sure if splitting the string on spaces make sense. sounds like you'll need isdigit()
is there a spec (link) for this protocol?