Sending 'Hello World' message to iPhone App

4 posts / 0 new
Last post
Francesco Vandu...
Offline
Last seen:5 years 9 months ago
Expert
Joined:2014-11-24 20:33
Sending 'Hello World' message to iPhone App

Hi there,
I am working on a project where my team needs to build a heart monitor that sends data to a smartphone application via bluetooth.

我已经开发了一个简单的iPhone application which behaves as a central by looking for any advertising peripheral and read the messages available.
I ran the proximity fh_proxr_sdk on the DA14580 and my iPhone application successfully recognizes the device. My next step is to successfully send a "Hello World" type of message to my application. This is where I am stuck; From what I understood, I need to call the KE_MSG_ALLOC function and use the returned struct as a parameter for the ke_msg_send function. I am having problems on finding out what exactly to use for the KE_MSG_ALLOC parameters.

Could you please help me with this?

Thank you,
Francesco

Keywords:
JE_Dialog
Offline
Last seen:6 hours 40 min ago
Staff
Joined:2013-12-05 14:02
Hello Francesco, I would

Hello Francesco, I would suggest to look at the sample128 example.. see section 10 of UM-B-003.

Definition of the kernel messaging can be found in the following document.

http://support.dialog-semiconductor.com/system/files/resources/RW-BT-KERNEL-SW-FS.pdf

BR JE_Dialog

Francesco Vandu...
Offline
Last seen:5 years 9 months ago
Expert
Joined:2014-11-24 20:33
Hi JE_Dialog,

Hi JE_Dialog,
I followed the steps on section 10 and 11 of UM-B-003 but I am still stuck. Now these errors:

.\..\..\..\src\modules\app\api\app_task_handlers.h(187): error: #20: identifier "SAMPLE128_CREATE_DB_CFM" is undefined
{SAMPLE128_CREATE_DB_CFM, (ke_msg_func_t)sample128_create_db_cfm_handler},
.\..\..\..\src\modules\app\api\app_task_handlers.h(187): error: #20: identifier "sample128_create_db_cfm_handler" is undefined
{SAMPLE128_CREATE_DB_CFM, (ke_msg_func_t)sample128_create_db_cfm_handler},
.\..\..\..\src\modules\app\api\app_task_handlers.h(187): error: #44: expression must have pointer type
{SAMPLE128_CREATE_DB_CFM, (ke_msg_func_t)sample128_create_db_cfm_handler},
.\..\..\..\src\modules\app\api\app_task_handlers.h(189): error: #20: identifier "SAMPLE128_DISABLE_IND" is undefined
{SAMPLE128_DISABLE_IND, (ke_msg_funct_t)sample128_disable_ind_handler},
.\..\..\..\src\modules\app\api\app_task_handlers.h(189): error: #20: identifier "ke_msg_funct_t" is undefined
{SAMPLE128_DISABLE_IND, (ke_msg_funct_t)sample128_disable_ind_handler},
.\..\..\..\src\modules\app\api\app_task_handlers.h(189): error: #253: expected a ","
{SAMPLE128_DISABLE_IND, (ke_msg_funct_t)sample128_disable_ind_handler},
.\..\..\..\src\modules\app\api\app_task_handlers.h(191): error: #20: identifier "SAMPLE_VAL_IND" is undefined
{SAMPLE_VAL_IND, (ke_msg_func_t)sample128_val_ind_handler},
.\..\..\..\src\modules\app\api\app_task_handlers.h(191): error: #20: identifier "sample128_val_ind_handler" is undefined
{SAMPLE_VAL_IND, (ke_msg_func_t)sample128_val_ind_handler},
.\..\..\..\src\modules\app\api\app_task_handlers.h(191): error: #44: expression must have pointer type
{SAMPLE_VAL_IND, (ke_msg_func_t)sample128_val_ind_handler},
..\..\..\src\modules\app\src\app_task.c(374): error: #28: expression must have a constant value
const struct ke_state_handler app_default_handler = KE_STATE_HANDLER(app_default_state);
..\..\..\src\modules\app\src\app_task.c: 0 warnings, 10 errors

Besides, I am still confused on how all of this works. I would have no idea on what would be the next step in sending the "hello world" message.
Is there any tutorial or example code that show how to send a simple message to a smartphone?

JE_Dialog
Offline
Last seen:6 hours 40 min ago
Staff
Joined:2013-12-05 14:02
Hello Francesco, later in

Hello Francesco, later in March/April we will come with some simplified examples in a new SDK release. Right now we have a very open SDK... this gives great flexibility, but is more complex to navigate, no debate on that. Until that time in March/April, the other appraoch you could take is to use our custom serial profile, DSPS. This also comes with an iPhone/Android app.

It might be a bit overkill, but if you are looking for something quick and simpler out the box, it is a good starting point.

BR JE_Dialog.