USSD message sending through AT command with a huawei modem I'm trying to send ussd messages with a huawei modem through AT Command.
Here is my function which writes At command into serial port.
for sms ,im trying the following and its working and i can den sms.
 string recievedData = ExecCommand(port,"AT", 300, "No phone connected");
recievedData = ExecCommand(port,"AT+CMGF=1", 300, "Failed to set message format.");
String command = "AT+CMGS=\"" + PhoneNo + "\"";
recievedData = ExecCommand(port,command, 300, "Failed to accept phoneNo");
command = Message + char.ConvertFromUtf32(26) + "\r";
recievedData = ExecCommand(port,command, 3000, "Failed to send message"); //3 seconds
if (recievedData.EndsWith("\r\nOK\r\n"))
{
isSend = true;
}
else if (recievedData.Contains("ERROR"))
{
isSend = false;
}

but for ussd messages,while im trying the following,
  string recievedData = ExecCommand(port,"AT", 300, "No phone connected");
recievedData = ExecCommand(port,"AT+CMGF=1", 300, "Failed to set message format.");
String command = "AT+CUSD=1,*566#";
recievedData = ExecCommand(port,command, 3000, "Failed to send ussd");
Console.WriteLine("received data : " +recievedData);
//  command = Message + char.ConvertFromUtf32(26) + "\r";
//  recievedData = ExecCommand(port,command, 3000, "Failed to send message"); //3 seconds
if (recievedData.EndsWith("\r\nOK\r\n"))
{
isSend = true;
}
else if (recievedData.Contains("ERROR"))
{
isSend = false;
}

first two exec command returns ok,but the third exec command returns error.
USSD code is working from providers mobile partner application,
what sets of AT command do i need to send to handle ussd application properly?