roseshade
Posts: 32
Joined: Thu Jul 17, 2008 7:33 pm

About the SimpleService of .net compact framework

Wed Oct 01, 2008 7:16 pm

Hi,

I create the simple service with .net compact framework in the pda server and advertise it successfully. In the client, this service can be found and connected successfuly, but although the client show that it has connected to the simpleservice successfuly, the server has no any response to this successful connection, that is, a new session belong to this connection hasn't been created in the server.
Why?

Best Regards!

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: About the SimpleService of .net compact framework

Wed Oct 01, 2008 7:43 pm

I don't quite follow. You mean that m_service_ClientConnected never fires?
Are you using the SimpleService unmodified or have you made any changes?
What kind of service are you advertising?

Regards,
Jonas

roseshade
Posts: 32
Joined: Thu Jul 17, 2008 7:33 pm

RE: About the SimpleService of .net compact framework

Wed Oct 01, 2008 7:51 pm

I use the SimpleService(demo) unmodified, and it seems that m_service_ClientConnected isn't fired because there 's no any session in the session list.

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: About the SimpleService of .net compact framework

Wed Oct 01, 2008 10:27 pm

Then you are probably not connecting to that service at all.

Regards,
Jonas

roseshade
Posts: 32
Joined: Thu Jul 17, 2008 7:33 pm

RE: About the SimpleService of .net compact framework

Thu Oct 02, 2008 8:14 am

Could you tell me how can I set the value of UUID and Channel of the simpleservice? And isn' it necessary for the connection of the client?

Best Regards!

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: About the SimpleService of .net compact framework

Thu Oct 02, 2008 9:08 am

You only need to set the UUID if you are creating an entirelly custom service. Then I think you should use the ServiceID.
The channel can be set when advertising, but in general that is not necessary. If you don't specify a channel BlueTools will pick an available channel.

Regards,
Jonas

roseshade
Posts: 32
Joined: Thu Jul 17, 2008 7:33 pm

RE: About the SimpleService of .net compact framework

Thu Oct 02, 2008 1:32 pm

So, if I don't set the uuid and channel, how can the client connect to this simpleservice? Is it ok if the client connect to this service with its servicename in any cases?

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: About the SimpleService of .net compact framework

Thu Oct 02, 2008 5:08 pm

If you don't set any, it will be advertised as a default service. However, by default I think the SimpleService sample advertise itself like a serial port, and if you already have a serial port service on your device, you might hit that service instead of your own service.

Regards,
Jonas

roseshade
Posts: 32
Joined: Thu Jul 17, 2008 7:33 pm

RE: About the SimpleService of .net compact framework

Thu Oct 02, 2008 5:25 pm

So, I want to creat a new service that doesn't conflict with any other existing service and can be connected by the client explicitely, how can I define this service?

Best Regards!

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: About the SimpleService of .net compact framework

Thu Oct 02, 2008 5:39 pm

Depends entirely what you are aiming to do. If you want to create a serial port you are not guaranteed that it will work since you must then disable the native serial port service.
If you are creating a custom service you need to have a client that know of this service i.e. a custom client.

Regards,
Jonas

Return to “BlueTools”