Martin J
Posts: 11
Joined: Wed Oct 26, 2005 12:02 pm
Location: Sweden

Second click on "Discover" -> services are lost

Wed Oct 26, 2005 5:12 pm

Hi!

After trying the VB.NET sample for Compact Framework (using your Beta 5) I notice that after the second search for devices, some of the previously found devices no longer list any services. If I continue to search after that then no services are found on any device.

I use VS.NET 2003 and iPAQ hx2110.

Do you have any ideas why this happens?

Thanks in advance!

Best regards,
/Martin J

User avatar
johan
GpsGate
Posts: 15293
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: Second click on "Discover" -> services are lost

Wed Oct 26, 2005 5:28 pm

Make sure you have upgraded your ROM to 1.10, this will upgrade the WidComm stack to 1.4.1.60, which is the system requirement for BlueTools to work. (We'll add some better checking for this in Beta6).

I just tried 10 times myslef, and was going to write "well it works for me" but the 11th time the services didn't show up.

I can be a WidComm error, that it simply doesn't allow you to look up services more than one, stranger things has been detected in their stack :-) I will look into this and see how to make the solution more stable.

Regards,
Johan

Franson Support

Martin J
Posts: 11
Joined: Wed Oct 26, 2005 12:02 pm
Location: Sweden

RE: Second click on "Discover" -> services are lost

Thu Oct 27, 2005 10:08 am

Here is another clue. I inserted two error checks (see below) and tested the program in two ways:

- First I just clicked on "Discover" several times. There where no error messages. If I set a breakpoint after nwork.DiscoverDevices() I can see in nwork.Devices that no device has any services (after the second "Discover").

- Then I restarted the program and after the first "Discover" I clicked on a couple of devices in the list (but not all). They listed the services I expected. But here's the strange thing: The next time I click "Discover", error check 2 shows its message for all the devices I previously listed services for and it turns out that all services for those devices are listed in nwork.Devices for all subsequent clicks on "Discover".

I have tested this on:
a hx2110 (Windows Mobile 2003 SE) with BT-PPC 1.5.0 Build 2902
a hx2190 (Windows Mobile 5.0) with BT-PPC 1.7.1 Build 1200
They both show the same result.

Regards,
/Martin J

---------------------------------
Part of code from bDiscover_Click
---------------------------------
devices = nwork.DiscoverDevices()
' Error check 1
If devices.Length < nwork.Devices.Length Then
MsgBox("More devices in nwork!")
End If

Dim inx As Integer
For inx = 0 To devices.Length - 1
listDevices.Items.Add(devices(inx))
' Error check 2
If devices(inx).Services.Length < nwork.Devices(inx).Services.Length Then
MsgBox("More services in nwork!")
End If
Next
---------------------------------

User avatar
johan
GpsGate
Posts: 15293
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: Second click on "Discover" -> services are lost

Thu Oct 27, 2005 10:35 pm

Try beta6 it has many bugfixes for the WidComm stack.

Regards,
Johan

Franson Support

Martin J
Posts: 11
Joined: Wed Oct 26, 2005 12:02 pm
Location: Sweden

RE: Second click on "Discover" -> services are lost

Fri Oct 28, 2005 4:38 pm

Beta 6 works much better. Thanks!

/Martin J

Return to “BlueTools”