Arduino Strings

Did it enter the df_key() function? Did it print the ">>>>>>>>>" above that?

And your buf[] is not a string (i.e. not null terminated), why are you treating it like a string?