 }
 
 void loop() {
-  messagebuff = "KC7IBT,KC7IBT,:HAMSHIELD TEST";
   prepMessage();
   delay(10000);
 } 

  bool ret = afsk.putTXPacket(packet);

  if(afsk.txReady()) {
    Serial.println(F("txReady"));
    radio.setModeTransmit();
    //delay(100);
    if(afsk.txStart()) {
      Serial.println(F("txStart"));
    } else {
      radio.setModeReceive();
    }
  }
  // Wait 2 seconds before we send our beacon again.
  Serial.println("tick");
  // Wait up to 2.5 seconds to finish sending, and stop transmitter.
  // TODO: This is hackery.
  for(int i = 0; i < 500; i++) {

void prepMessage() { 
  radio.setModeTransmit();
  delay(500);
  origin_call = "KC7IBT"; // get originating callsign
  destination_call = "KC7IBT"; // get the destination call
  textmessage = ":HAMSHIELD TEST";
  
  Serial.print("From: "); Serial.print(origin_call); Serial.print(" To: "); Serial.println(destination_call); Serial.println("Text: "); Serial.print(textmessage);

  AFSK::Packet *packet = AFSK::PacketBuffer::makePacket(22 + 32);

  packet->start();
  packet->appendCallsign(destination_call.c_str(),0);
  packet->appendCallsign(origin_call.c_str(),15,true);   
  packet->appendFCS(0x03);
  packet->appendFCS(0xf0);
  packet->print(textmessage);
