Comandi sizeof e strlen

vi posto il codice, penso che il problema non sia tanto dovuto ai due comandi quanto al fatto che con arduino nn si possano creare array dinamici.
Comunque questo è il codice vedete dove sbaglio, e grazie per il supporto.

/variable header/
uint8_t var_header[] = {0x00,0x06,0x4d,0x51,0x49,0x73,0x64,0x70,0x03,0x02,0x00,KEEPALIVE/500,0x00,strlen(id)};

/fixed header: 2 bytes, big endian/
uint8_t fixed_header[] = {MQTTCONNECT,12+strlen(id)+2};

char packet[sizeof(fixed_header)+sizeof(var_header)+strlen(id)];

memset(packet,0,sizeof(packet));
memcpy(packet,fixed_header,sizeof(fixed_header));
memcpy(packet+sizeof(fixed_header),var_header,sizeof(var_header));
memcpy(packet+sizeof(fixed_header)+sizeof(var_header),id,strlen(id));