如何知道which service is active

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
2 posts / 0 new
Last post
Tony Poon
Offline
Last seen:1 year 3 months ago
加入:2017-04-12 15:25
如何知道which service is active

Dear Supports,
SDK 5.0.3:
Now my DA14580 project has used Custom1 Server(custs1) and Custom2 Server(custs2). And our iOS software has 2 versions to receive data from DA14580, one only use to connect CUSTS1 service, another to CUSTS2 service.
1. When DA14580 on connection has done, How to get the message which server is active now?
2. When DA14580 runs default_app_on_connection() or default_app_on_db_init_complete(), We can get the message now?

Thanks,

Device:
MT_dialog
Offline
Last seen:2 months 3 weeks ago
工作人员
加入:2015-06-08 11:34
Hi Tony Poon,

Hi Tony Poon,

I am not sure that i understand your questions, please correct me if i got something wrong,

1. The connection of the 580 is completed as soon as the app_on_connection callback (the user_app_connection() function) is triggered, regarding the how to get message which server is active i am not sure i understand what exactly you are trying to implement, can you please clarify your question ?

2. The callback functions that you mention are triggered as soon as the connection is established (default_app_on_connection, you are able to change all the default functions in the user_callback_config.h file and place user defined functions) and as soon as the creation of the database completes (default_app_on_db_init_complete). The database completion message comes to your application as soon as the 580 boots up gets configured for the corresponding GAP role and then it starts initializing the databases that you have placed in your fw, when the databases are created a message is send, that message is what triggers the default_app_on_db_init_complete function.

Thanks MT_dialog