cannot convert 'string' to 'const char*' in initalization
Yes, it can.
What it can't do is convert a String to an array of chars, automatically. You must do that yourself.
Perhaps the toCharArray() method of the String class would be useful. Or, even better, ditch the String class altogether, and use sprintf() and a char array.
well you are really trying to copy the data to itself there, so it is not going to work.
If you want to copy the data from an object of the String class, into an array of characters,
you would need something like this.
String s = String("some string here"); // not sure if this is right, I don't use arduino strings
char buf[30] ; // an array of chars to put the string into.
s.toCharArray( buf, 30 ); // copies the chars from the string s into the char array
Sure it is. You extracted the array of data you want to send from the String instance (data) into buf. So, why are you not pointing to buf? You know that buf is already a pointer, right? And that you don't need ANOTHER pointer.