Serial Communication using NewSoftwareSerial and Android Meets Arduino

Tried using Serial.write but that didn't change anything. What astounds me is that when I pass the hex from the computer I have it connected to it works, yet when it's passed from the arduino, it only works the first time and all subsequent times the sensor (it appears) doesn't return anything.

Here is my full code.

#include <NewSoftSerial.h>

#define rxPin 2
#define txPin 4


NewSoftSerial mySerial =  NewSoftSerial(rxPin, txPin);


// This function prints "siz" HEX values from the "buf" array
void PrintHexBuffer()
{ 
    mySerial.print(byte(254));
    mySerial.print(byte(04));
    mySerial.print(byte(00));
    mySerial.print(byte(03));
    mySerial.print(byte(00));
    mySerial.print(byte(01));
    mySerial.print(byte(213));
    mySerial.print(byte(197));

}


void setup()                    // run once, when the sketch starts
{
  mySerial.begin(9600);
  Serial.begin(9600);    // set up Serial library at 9600 bps
  PrintHexBuffer(); 
}

void loop()                       // run over and over again
{         // do nothing!
  while (mySerial.available()==0)
  {}
  while (mySerial.available())
  {        
    Serial.write((char)mySerial.read());

  }
  PrintHexBuffer();
  while(mySerial.available()==0)
  {}
  

  
}