Please don't use C++ String! They're conveniences that keep you in the dark about your own code.
Learn C including pointers (address to data with data type info attached).
char myChars[] = "28 A8 FB 13 5 0 0 0 B0"; // makes a char array and initializes it.
char *chPtr; // a pointer to type char with no array, default initialized to point to nothing.
chPtr = myChars; // pointer chPtr now points to myChars data.
Note that the name myChars is a char pointer to the data in the array
The data in myChars is not hex values 2B A8 FB 13 5 0 0 0 B0, it is the ASCII text values for every letter, number and space in that string and there is another 0 added to the end, the array is 23 chars long.
Another way that should work using strtok() to parse the input string is:
char myChars[] = { "28 A8 FB 13 5 0 0 0 B0" };
char buffer[9][5]; // defaults to all 0's
byte values[9];
void setup()
{
Serial.begin( 115200 );
char *ptr;
char temp[3];
int count = 0;
ptr = strtok(myChars, " ");
while (*ptr) { // Parse into substrings
strcpy(temp, ptr); // Save the substring
strcpy(buffer[count], "0x"); // Identify it as a hex string
strcat(buffer[count], temp); // Tack on hex value
values[count] = (byte) strtoul(buffer[count], 0, 16); // Convert to unsigned byte
count++;
ptr = strtok(NULL, " "); // On to the next substring
}
for ( byte i = 0; i < 9; i++ )
{
Serial.println((byte)values[i]); // Show the results
}
}
void loop() {
// put your main code here, to run repeatedly:
}
Edit: Actually, part of the code in the while loop is not needed since strtoul() makes the proper conversion:
while (*ptr) { // Parse into substrings
strcpy(buffer[count], ptr); // Save the substring
values[count] = (byte) strtoul(buffer[count], 0, 16); // Convert to unsigned byte
count++;
ptr = strtok(NULL, " ");
}