Hi,
I am trying to modify the empty_template_ext project to use the cust1 profile. I added my characteristics details in the user_custs1_def.h/.c files and included "custs1.h" in user_profiles_config.h
When I send the message to create the cust1 DB, I do not receive any reply. I've attached a screenshot of the messages sent and received from the host(which is a modified version of the host_proxr project).
I've tested the working of the characteristics by modifying the prox_reporter_ext project and this had worked as expected.
I'm unable to find the function which handles the UART messages on the DA14580. Is there any way to debug this function?
Thanks,
Gowtham
Keywords:
Device:
Hi tsgowtham,
My apologies but for me it’s nor clear what is the issue. Could you please clarify your question?
如果我理解正确,您想通过UART打印调试消息?如果是,请尝试使用ARCH_PRINTF()函数。查看da1458x_config_basic.h标题文件中的cfg_printf宏。
Thanks, PM_Dialog
No, I'm not trying to print debug messages.
我正在尝试使用extent_template_ext项目使用custs1配置文件。当我向DA14580发送CUSTS1_CREATE_DB_REQ消息时,我没有收到它的任何回复。
Hi tsgowtham,
My apologies - it was a misunderstanding in my side. Let me check it and I'll get back to you..
Thanks, PM_Dialog
Hi PM_dialog,
Any update on this issue?
Hi tsgowtham,
Could you please run it in debug mode and add a break porin into app_custs1_create_db() function? Is it executed properly, or the code gets stuck?
Thanks, PM_Dialog
Hi PM_Dialog,
I'm using the external UART template, so I believe that app_custs1_create_db() is not called in the external projects. I did place a breakpoint in custs1_create_db_req_handler() but the code never hit this breakpoint
Hi PM_dialog,
Any update on this issue?
Hi tsgowtham,
My recommendation would be to follow the pxp_reporter_ext in order to add the custom profile. In the pxp_reporter_ext project, you can follow how the proximity Monitor and the DISC profiles are enabled. Then, you should run it in debug mode, try to send to send the appropriate commands over UART and check is the app_custs1_create_db() is executed. Please add a breakpoint there and check if that function is getting triggered.
Thanks, PM_Dialog
Hi PM_Dialog,
You have mentioned pxp_reporter_ext project but I couldn't find such a project under the target_apps folder. I take it that you meant the prox_reporter_ext project. I have a modified version of it where I have added the cust1 task and it works perfectly for prototyping. I don't have any issues in creating the db or connectiong to a device or sending data, it works as expected. But this is only for the prox_reporter_ext project.
But now I would like to make a project for production code and that's why I used empty_template_ext.
And as I have mentioned in one of my older comments, since this is an external program, is it required for app_custs1_create_db() to be called?? Because in user_custs_config.c when BLE_APP_PRESENT is 0 (which I believe is the case for external), app_custs1_create_db and app_custs1_enable are replaced by NULL and NULL. And the prox_reporter_ext project didn't have a definition for it.
Thanks
Gowtham
Hi PM_Dialog,
Any progress on this issue? I'm close to my deadlines and it would be great if this can be solved soon
Hi tsgowtham,
My apologies – it was a typo, I meant the prox_reporter_ext project of the SDK.
Let me ask you some questions in order to understand the steps that you have already done :
In case of prox_reporter_ext project, the custom 1 profile is not included – only the proximity Monitor and the DISC profiles are enabled.
To do so, you modified the pro_reporter_ext project and added the custom 1 profile.
在此步骤中,如果我正确地理解没有任何问题 - App_custs1_create_db()正确执行。
Did you add a break point to verify it?
So, in case of empty_template_ext, you have followed exactly the same steps in order to include the custom1 profile. Is that correct?
However, the app_custs1_create_db() is never executed – (this is the problem). Please correct me if it is anything wrong.
Can you please run the empty_template_ext project in debug mode and add a break point in that function? What is the behavior? Does the break point hit, or does the firmware get stack anywhere (WDOG, NMI , any assertion etc) ?
Thanks, PM_Dialog
Hi PM_Dialog,
Below are the answers to the questions you asked
Q : " the app_custs1_create_db() is executed correctly. Did you add a break point to verify it?"
Ans: On my proxr_reporter_ext, I am able to connect to it and view the profile. So I believe the DB creation is occuring.
About if app_custs1_create_db is executed, I had tried it sometime ago and it did not hit the breakpoint. I will verify it again tomorrow and get back to you on that.
Also, if I understood the below code snipppet correctly, app_custs1_create_db is not supposed to be called for ext project.
I believe that BLE_APP_PRESENT is 0 for external projects.
Q: "in case of empty_template_ext, you have followed exactly the same steps in order to include the custom1 profile. Is that correct?"
Ans: Yes, I have followed the same steps
Q : "However, the app_custs1_create_db() is never executed – (this is the problem)"
Ans: I believe it is not executed and am not sure if it is supposed to be executed for external projects.
I'll place breakpoints in the function and check for assertions and confirm the behaviour tomorrrow. Please do let me know if app_custs1_create_db is supposed to be called for ext projects
Thanks
Edit: I was unable to find app_custs1_create_db in my project folders. Is this function supposed to exist on the code for the DA14580 or the master MCU?
Hi tsgowtham,
Just to summarize : In case of prox_reporter_ext, did you add a BKPT into the app_custs1_create_db() ? Can you please indicate if the app_custs1_create_db() is getting triggered?
If yes, can you verify the same into the empty_template_ext() ?
I assume that the app_custs1_create_db() should be called. Would it be possible to share both projects with the modifications you have done?
Thanks, PM_Dialog
Hi PM_dialog,
对不起,the delay in replying. I got confused and was checking the target project for the definition of app_custs1_create_db. app_custs1_create_db is being called in the host project when I ran it with empty_template_ext.
我明天会分享项目
Thanks
Hi PM_Dialog,
I'm attaching the link to the 2 target projects for proxr_reporter_ext and empty_template_ext and the host windows proxr project.
https://drive.google.com/file/d/1LUbIPkL4PQhfg8T8tT-a_YadCQJolqZm/view?u...
I couldn't upload them as it exceeded the size limit.
Thanks
Gowtham
Hi PM_Dialog,
Were you able to try the projects I have shared? Any updates on this?
Thanks
Hi tsgowtham,
Apologies for my late response. Just run your projects, so find below my comments :
In case of prox_reporter_ext, the project is running properly ( as you have already mentioned ) – the device starts advertising - I can connect and see the PROXR, DISS , SPOTAR and CUSTS1 profiles. I am running both \binaries\host\windows\proximity\reporter\host_proxr_sdk.exe and your provided application.
In case of empty_template_ext, the device cannot start advertising neither with the usage of SDK host_proxr_sdk.exe nor your provided Windows application.
你能请检查in your side if it is starts advertising?
This can be replicated in the prox_reporter_ext if you comment out the following includes in the user_profiles_config.h :
#include "proxr.h"
#include "diss.h"
#include "spotar.h"
This is expected because the host_proxr_sdk.exe send GTL commands for the creation of the aforementioned profiles too. If you include all the above profiles in your provided empty_template_ext project, you will see that the device will start advertising and the Custom 1 profile is also included.
If you are interested in including only the Custom 1 profile, then you should modify the host_proxr_sdk.exe by yourself and send the GTL commands only for the specific profile. This is not a straight forward implementation because you should remove many GTL commands. For example you could use a logic analyzer on the UART signals and check what commands you should send or not. To do so, my suggestion would be to base your project on the prox_reporter_ext.
Thanks, PM_Dialog