Page 2 of 2

RE: Exception thrown

Posted: Wed Apr 12, 2006 2:30 pm
by johan
If your variable rd is null you will get a "Null Reference Exception". You can only use pointers that points to an object, you can not use pointers that has only been declared, but not yet points to an object. (Differ between pointer variables and objects)

Note that ConnectService() has nothing to do with advertising services. To advertise a service and to connect to a service are two completely different things.

To undserstand how to connect to a service on remote device, take a look at the FindAndConnect sample in the SDK. Start there and see how it works.

To understand how you create and advertise your own services, please take a look at the SimpleService sample in the SDK. When you get that sample working, you have a good platform to go on from.

Regards,
Johan

Franson Support

RE: Exception thrown

Posted: Wed Apr 12, 2006 2:55 pm
by henryhui
thank you ! i will try it out

when i perform a soft reset, there is an error message "Sorry! Bluetooth can no loonger be used because the license is expired". but my license key is still valid.

what's going wrong?

RE: Exception thrown

Posted: Wed Apr 12, 2006 3:03 pm
by johan
Is that the exact error message? BlueTools does not generate any error message phrased like that.

Does it come when you run one of the samples from the SDK? And in that case on which exact line does it happen?

Regards,
Johan

Franson Support

RE: Exception thrown

Posted: Wed Apr 12, 2006 6:19 pm
by henryhui
thank you for yr reply.

this is the exact message. when i perform a soft reset, it comes out

RE: Exception thrown

Posted: Wed Apr 12, 2006 6:23 pm
by henryhui
in response yr suggestion, "If your variable rd is null you will get a "Null Reference Exception". ".

as i stated b4, i have 2 devices. for x50v -> x51 , "rd.ConnectService(12, "Connection Service");" throws null reference exception. but x51 -> x50v, there is no such exception thrown.

what is the reason? thank you

RE: Exception thrown

Posted: Wed Apr 12, 2006 6:23 pm
by Jonas
As Johan says BlueTools don't generate that kind of message. Have you installed some other Bluetooth related applications or development kit lately?

Regards,
Jonas
Franson Support

RE: Exception thrown

Posted: Wed Apr 12, 2006 7:06 pm
by henryhui
i created a service, i found that even i use sample progrm "Find and Connect", the service can't be discovered each time (sometimes it works, sometimes fail).

i advertised the service already, and i can verify it by printing some message in service_advertise method.

i want to make sure that i can connect to other PPC successsfully, when i attenpt to do so, what can i do next?

Many thanks for yr help!!!!

RE: Exception thrown

Posted: Wed Apr 12, 2006 7:10 pm
by henryhui
i created a service, i found that even i use sample progrm "Find and Connect", the service can't be discovered each time (sometimes it works, sometimes fail).

i advertised the service already, and i can verify it by printing some message in service_advertise method.

i want to make sure that i can connect to other PPC successsfully, when i attenpt to do so, what can i do next?

Many thanks for yr help!!!!

RE: Exception thrown

Posted: Thu Apr 13, 2006 2:45 pm
by henryhui
i found that the problem of "Sorry! Bluetooth can no loonger be used because the license is expired" is due to erro from dell Pocket PC problem, thank you very much for yr help!