invalid conversion from 'uint8_t* {aka unsigned char*}' to 'const char*' [-fperm

aha
googling says memcpy() requires three arguments , a destination , a source, and a count of the elements in the source eg:
memcpy( arrB, arrA, 5 );

so I need:

memcpy(buf, packet.data(), packet.length());

Is that right?