With comms, start with a terminal program. That is a program that lets you type commands that are sent out of the serial port to your device, and displays any text that comes back from the device. This will allow you to try out the protocol you've described and see what the device sends back. Once you get the correct response, you know:
- The device is working
- The serial cable is correctly wired and working
- You are using the correct port settings (baud rate, stop bits, parity, etc)
- You understand what the protocol is (do you send a "P" or a "P" followed by a newline?)
Then you can run your code in the knowledge that if it doesn't work, it's something in your code that is wrong, not any other factors muddying the waters.
Once you send the initial command, you can read the serial port immediately for the response - the call you are using will simply wait until some data is received. If no data is received, it will wait forever (hence your program hang). Any of the above things being incorrect will cause the same symptom of not receiving any data. And changing the way you read the data (e.g. async reads etc) will not change the fact that there is no data being received.
The other thing to be careful of is port settings. Generally, start with the default settings for most things (as RS232 is used in a pretty standard way by most devices) - a typical beginner mistake is to explicitly set options like the Handshaking approach, but if you get it wrong it'll break the comms. Usually you'd specify a baud rate and 8N1 (8 bits, no parity, 1 stop bit) and leave the other settings alone until you find they need to be set to get anything wto work, or you know (as in their manual states it in black and white) that your device requires something different.