<div dir="ltr">Claudiu,<br><div class="gmail_extra"><br><div class="gmail_quote">On 1 July 2015 at 08:55, Claudiu Olteanu <span dir="ltr"><<a href="mailto:olteanu.vasilica.claudiu@gmail.com" target="_blank">olteanu.vasilica.claudiu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I attached a patch which should resolve the issues regarding<br>
the connection.<br></blockquote><div><br></div><div>Thank, I'll try it out this evening.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I know that this is not the ideal solution but I wanted to cover all cases.<br>
First I try to make a connection using the UUID of a service.<br>
If the timer expires and the device is in the ServiceLookupState, then<br>
I extend the waiting time.<br>
If the connection ends with a ServiceNotFoundError then I try to force<br>
the connection on channel 1. If this doesn't work, I try again on channel<br>
number 5.<br>
<br>
I took this decision because the QBluetoothServiceDiscoveryAgent<br>
cannot find the SPP service from my HW OSTCs device. I don't know<br>
why. I captured the HCI events during the Qt service discovery proces<br>
and they are identical with the ones raised by sdptool.<br>
The interesting thing is that when I use my HW OSTC 2 device, the SPP<br>
service is discovered.<br>
<br>
If you want I can remove the part where it tries to initiate a connection<br>
using SPP's uuid. I can try to make a connection on channel 1 and if<br>
it fails I try again on channel number 5. This would work if the SPP<br>
service is always listening on channel 1 or on channel 5.<br>
<br><br></blockquote><div>Assuming it's similar to setting up a connection on the command line with rfcomm, I think most devices use channel 0, not 1.  I can't test this because mine uses channel 5.  Can you try both 0 and 1 with the OSTC, and see if one works and the other doesn't?</div><div><br></div><div>Cheers,</div><div><br></div><div>Rick</div></div><br></div></div>