<p dir="ltr">Claidiu,</p>
<p dir="ltr">On 1 Jul 2015 8:55 am, "Claudiu Olteanu" <<a href="mailto:olteanu.vasilica.claudiu@gmail.com">olteanu.vasilica.claudiu@gmail.com</a>> wrote:<br>
><br>
> I attached a patch which should resolve the issues regarding<br>
> the connection.<br>
><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.</p>
<p dir="ltr">I tried your patch, and it works.  But it works by falling back (after a delay) to channel 5.  To confirm, I commented out the fallback conditions, so it only tried the uuid method, and that fails.</p>
<p dir="ltr">><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>
> Cheers,<br>
> Claudiu</p>
<p dir="ltr">I don't know enough to say what method is best, so long as it's something that works.  Using the SPP's uuid looks like a neat solution, but for some reason it isn't working all the time.</p>
<p dir="ltr">There might be someone on this list with more Qt and/or bluetooth knowledge that could help.  Otherwise, I'm sure there'll be a Qtconnectivity mailing list or forum you could try.</p>
<p dir="ltr">I suspect the 5s delay could be reduced, but I don't know what to.</p>
<p dir="ltr">Cheers,</p>
<p dir="ltr">Rick<br>
</p>