I think what you want here is
`*broadcastPacket = PACKET_HEADER_HEAD_DATA`

What you're doing is changing the broadcastPacket pointer to an incorrectly casted char. This is likely where the EXC_BAD_ACCESS comes from.