Updates for new protocol.

This isn't very well tested, but it's enough that things mostly work for
me again after updating the firmware to v1.3. It looks like the biggest
change is that TCP is gone. The code now just sends UDP packets instead.