I am trying to receive responses over BT SPP for my client device connected to a server.
After creating the client socket and initiating the bonding
Client = device.CreateSocket(ServiceUuid);
Client.ConnectionStateChanged += ClientConnectionStateChanged;
device.ConnectionStateChanged += DeviceConnectionStateChanged;
device.CreateBond();
I call the connect method in the bonding callback Client.Connect();
, and then subscribe to the OnDataReceived event Client.DataReceived += OnDataReceived;
Now everything works but the OnDataReceived is never called, as if there is no data returned. But as I am also controlling the server which runs on a secondary device, I know there is data being send back, so why is it not received ?
Please refer the below test code for DataReceived() function.
[https://review.tizen.org/gerrit/gitweb?p=test/tct/csharp/api.git;a=blob;f=tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSIBluetoothServerSocket.cs;h=a52a38bb2ce46e384ca24897c27a694173d47fff;hb=refs/heads/tizen][1]
And, please check one whether the Result is success or not in ConnectionStateChanged callback.