It was not very easy to catch :)
Problem was that sprintf(dest, "%02X", src->payload.data[i]); was
printing FF if most significant bit of char(!) variable was 1.
Index: include/gsmd/usock.h
===================================================================
--- include/gsmd/usock.h (revision 4101)
+++ include/gsmd/usock.h (working copy)
@@ -535,7 +535,7 @@
int is_voicemail;
struct gsmd_sms_datacodingscheme dcs;
enum gsmd_sms_tp_mti tp_mti;
- char data[GSMD_SMS_DATA_MAXLEN+1];
+ u_int8_t data[GSMD_SMS_DATA_MAXLEN+1];
} __attribute__ ((packed));
/* Refer to GSM 03.40 subclause 9.2.2.2 */