The specification mentions:
You can activate the "ASCII Data Query" plugin and specify the login/password request as: SMDR#0D#0APCCSMDR#0D#0A
So both the username and password will need to be carriage return-terminated:
buf = String.Format("{0}\r\n{1}\r\n", "SMDR", "PCCSMDR");