IrDa DiscoverDevices with gps bluetooth

P

Paul

Hello,

I have the same problem as the other messages with "IrDa
DiscoverDevices" in the title :

Apparently the method DiscoverDevices of IrDAClient does not work, at
least up to SP1.

I found this text at
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/wceappservices5/html/wce50conNETCompactFrameworkMigration.asp :
"Windows CE 5.0 includes the .NET Compact Framework 1.0 and the .NET
Compact Framework Service Pack 2. Windows CE .NET 4.2 did not include
..NET Compact Framework Service Pack 2."

=> Is there a way to update CE.NET 4.x to make DiscoverDevices work ??

I tried the work around described in
http://www.alexfeinman.com/download.asp?doc=IRDABeamer.zip :
I changed "listener = new IrDAListener("OBEX:IrXfer");" to
"listener = new IrDAListener("BT_GPS:SPP slave");" (I also tried it
without the BT_GPS prefix).

=> No devices are discovered ???!! How can I make this work ?

By the way : with the bluetooth manager of my PocketPc (Asus MyPal)
there is no problem in setting up a connection.

I guess there are a lot of people that need a bluetooth connection in
their application, so what is the solution to this bug in ce.net ?

Thanks for any help,

Paul
 
P

Peter Foot [MVP]

IrDAClient is for discovering Infrared devices. To discover Bluetooth
devices depends on the stack installed in your device (I'm not sure which
the Asus uses). I wrote this managed class library to work in a similar way
to the IrDA support, currently it only supports the Microsoft Bluetooth
stack:-
http://www.32feet.net

If your device uses Broadcom/Widcomm there is a wrapper available from High
Point - www.high-point.com

Peter
 
P

Paul

Thanks Peter, I tried your program, but unfortunately it did not work
(crash).

I tried the workaround (described in another message of this user
group) with GetSocketOption :

Socket sock = new Socket(AddressFamily.Irda, SocketType.Stream,
ProtocolType.Unspecified);
sock.GetSocketOption((SocketOptionLevel)0xff, (SocketOptionName)0x10,
devList.Data);

No devices are discovered.
Normally this should work ??

Could this be due to the different protocol stacks you are referring to
?
Isn't the protocol stack part of the CE.NET OS ? Does every vendor of
PocketPc's has his own protocol stack ? It is hard to believe for me
that there is no standardisation : this should cause a lot of problems.
Where can I find information about the different stacks used ?

I am stuck here. I don't see a way to make this work.
Is there someone out there who experienced a similar problem ?
Thanks for any help,

Paul
 
P

Peter Foot [MVP]

In your original message you described you were trying to discover a
Bluetooth GPS device. You can't use this code (which is for IrDA discovery)
in that case. If the code at www.32feet.net doesn't work with your device,
it probably uses the Broadcom/Widcomm stack in which case you should try the
evaluation version of the high point library. If neither of these detects
devices then it may be possible you have a rarer BT stack on your device, is
there any branding on the bluetooth screens on your device which may
indicate whose stack it uses - this comparison shows the Microsoft and
Broadcom versions:-
http://www.peterfoot.net/VisuallyIdentifyYourBluetoothStack.aspx

Peter
 
P

Paul

Thanks again Peter.
I looked it up on my MyPal : it 's the stack of WidComm.
I 'll give the High Point evaluation version a try...

Paul
 
P

Paul

Hello Peter,

I tried the GPSDemo sample application that came with the HighPoint
download.
The result was a format exception.
The only reason I can see, is that the bluetooth stack of the GPS
bluetooth device is a different one from the one on my pocketpc
(WidComm), right ?

Paul
 
L

Lonifasiko

Have you tried GPS.NET 2.0? Download the trial and try. Seems like it
deserves a lot. http://www.gpsdotnet.com/
Discovers the GPS Bluetooth device (mine was discovered without
problems) and interprets all data for you (speed, lattitude, alttitude
and so on). It costs 99 dollars but this way you avoid many headaches.

I also tried HighPoint's library but I think it's too expensive
comparing to what offers.

Another library has been released a few weeks ago but still haven't
tried. Here you have: http://franson.com/bluetools/

Try both of them and post your results if you don't mind.

Hope it helps. Regards.
 
P

Paul

I can't try out GPS.NET for the moment since I have a GPS receiver with
Microsoft bluetooth stack and a pocketpc with WidComm stack.
I ordered (not only for the incompatibility reason) another pocketpc
which has Microsoft bluetooth stack.

So, I hope gps.net supports Microsoft stack ?
Can you confirm if GPS.NET uses Microsoft stack ? (Perhaps both are
supported ??)

Thanks,

Paul
 
L

Lonifasiko

Both stacks are supported by GPS.NET component.

You can dive into GPS.NET forums, there is currently a list of devices
that have been tested with this component. In my case, my iPAQ has a
hellish Widcomm stack and works perfectly with GPS.NET 2.0 trial
example. Just download and try...

Hope it helps. Regards.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top