I am trying to write a program that makes a phone call via bluetooth
and return my balance (money). I am using the 32feet.net
bluetooth api.
BluetoothAddress addr = device.DeviceAddress;
BluetoothEndPoint rep = new BluetoothEndPoint(addr, BluetoothService.Handsfree);
BluetoothClient cli = new BluetoothClient();
cli.Connect(rep);
Stream peerStream = cli.GetStream();
String dialCmd4 = "ATD*100#;\r";
Byte[] sRes = new Byte[200];
Byte[] dcB = System.Text.Encoding.ASCII.GetBytes(dialCmd4);
peerStream.Write(dcB, 0, dcB.Length);
peerStream.Read(sRes, 0, 199);
string t4 = "\n\r----------\n\r" + System.Text.Encoding.ASCII.GetString(sRes);
peerStream.Close();
cli.Close();
This code make a regular call but doesn't return a message containing my balance, and in the phone I can see this message "number not assigned".