Fill a char array with multiple hex values

I know that it should be simple....but...
I have a sequence of 9 decimal byte values that I want to send, comma separated, via WiFi from a char buffer.
The receiver expect to get something like this:
{ 1, 25, 0, 148, 57, 8, 0, 82, 120 } + \0 as terminating
The problem is that I don't know how to comma separate the values .
The ASCII value of ',' is 0x2c (d44), which is a valid possible value.

Then I thought to send the values's ASCII rappresentation using ITOA with this code:

void ShowRegisters(byte rFrom, byte rEnd) {
  byte tst[] = { 5, 200, 100, 30, 40, 60, 70, 80, 99 }; //test array for the example
  char arr[37]; // enough for 3x9 (values) +9 (commas) chars + terminator
  byte pos;
  for (uint8_t i = rFrom; i < rEnd + 1; i++) {
    //  itoa(AS3935_Read(i),&arr[pos++],10);
    itoa(tst[i], &arr[pos++], 10);
    if (i < 8) {
      arr[pos++] = ',';
    } else {
      arr[pos] = '\0';
    }
  }
  esp_now_send(broadcastAddress, (uint8_t *)&arr, ++pos);
}

This is almost working; if values are all <10 it is ok, otherwise, as in the above example, I receive:

5,2,1,3,4,6,7,8,9

so just the first digit; I'm quite sure there is stupid mistake somewhere, but where?
Thanks

Why do you need to convert this array to text?
Isn't it easier to send it as is - as bytes?
You won't need comma separators and the size of the array will be four times smaller

byte values [] = { 1, 25, 0, 148, 57, 8, 0, 82, 120 };
char text [80];

char *
convert (
    byte *p,
    int   nByte )
{
    sprintf (text, "%d", *p++);

    while (--nByte)  {
        char  s [20];
        sprintf (s, ",%d", *p++);
        strcat (text, s);
    }
    return text;
}


void setup ()
{
    Serial.begin (9600);

    Serial.println (convert (values, sizeof(values)));
}

void loop ()
{
}

Because the PC app expects a single string of comma separated values.

This is interesting and I will give it a try.
Just a doubt: this instruction

strcat (text, s);

will fragment the memory, right?
This is worring since there will be a lot of these sequences.

Just for my learning, what is wrong in my procedure with ITOA that shows only the first digit?

You incremented array arr position only one char after each itoa() conversion regardless the actual length of ascii representation of the source number.

no, it copies (appends) the contents from string s after the '\0' in the text array. make sure text is long enough (or use strncat())

More strictly not after, but starting from '\0' position. The first character of the s string replaces the terminator in the text string

Ok, clear, stupid me

Very wel. In the meantime I succesfully tried your code, l, thank you