More advanced reading the first packet

Working on sending. If sending works, then I will start to organize the
code a lot.