send command via rs232

SoftwareSerial MyDevice(7,8);  //  I don't know which is TX and RX...

Then, why the hell don't you try to find that out? Look at the source code!

I have connected pin 2 to 3 to make a loopback. And when I test it I don't get response.

Hardly surprising, since your code does not use pins 2 and 3.