protected string generatePacketWithChecksum(string packet) { return "$%s#%02x".Sprintf(packet, checksum(packet)); }