HarwareSerial.h

Serial.myprint() was a mistake. Actual syntax is mySerial.print().

I could compile my code.

What i expect is to receive those 4 characters "key1" through the software 'rx' pin, to a variable c, once it has been transmitted over the hardware 'tx'.