//
// packet id
for (int i=1; i<11; i++)
pdata[i] = 0x20 + random()%95;
pdata[i] = 0x30 + random()%9;
// the rest of the packet
plen = vsprintf(pdata+10, format, arg);