Hello Dialog,
I am experimenting with BLE_APP_PERIPHERAL and have included a service SVC4 (total 4 services) and one charactertistic (CHAR1);
On compiling the application and debugging,
1. Characteristic declaration "DECL" can be included
2. On adding the characteristic "Value" - the device does not advertise (based on power profiler) though the program runs in Debug mode.
May I know the steps to make changes in SDK6.0.10 for BLE_APP_PERIPHERAL or any other to increase characteristics to atleast 10 in my SVC4 .
Thanks, looking forward for your reply ASAP.
Device:
Hi rajucoolsuraj,
The most possible reason why the device stops advertising is why the code might ger stuck somewhere. Could you please run it in debug mode and hot attached the debugger? Does the code gets stuck somewhere, for example in NMI or WDOG handler or in any assertion?
Thanks, PM_DIalog
Hello Dialog,
May I know the process on how to hot attach debugger?
Thanks
Hello Dialog,
There seems to be a peculiar behavior with a characteristic.
I have been trying to debug the code example above-
When CCCD is added into DB for Data Characteristic; the device does not advertise.
On commenting out the CCCD attribute of Data Char; the device begins to advertise.
为什么奇怪的行为?
问候
Raju
Hello Dialog,
The CCCD declaratio needs the right permission,
Hence, the behavior.
Thanks
Raju
Hi rajucoolsuraj,
The device stops advertising because the code gets stuck somewhere dues to the WDOG or NMI or into any assertion due to memory allocation failure. As I have mentioned in my previous post, it would be very helpful to run the firmware with the debugger hot attached. Following this way you could identify the reason why the code stacks. For example, if the reason is the WDOG expiration, the WDOG handler will be triggered. In order to learn how to attach the debugger, please read theTutorial 8: Debugging methodstutorial.
Thanks, PM_Dialog
The code was configured incorrectly.
Its working now.
Thanks for the debugging link.
问候
Raju
Hi rajucoolsuraj,
Glad that you figured your issue out and thanks for accepting my answer.
Thanks, PM_Dialog
Hi abc1724,
In SDK5.0.4 there are 2 custom services available and you could find them under sdk\ble_stack\profiles\custom\custs SDK path. For example, in the ble_app_peripheral example, only the custom service 1 is implemented. In order to add the second service, you should do the following steps:
如果你想创建一个第三定制服务, there is no provision by the SDK and you should do it by yourself. It’s not a straight-forward implementation, as couple of SDK part mast be modified. Please find a tutorial regarding custom 1 service.
//www.xmece.com/sites/default/files/training_02_custom_profile_example_v1.2_0_0.pdf
However, if you are starting a new design or project, we recommend to start with our newest Smartbond device named DA14531. The SDK is much improved, we have a lot of code examples and improved documentation, and there is also software roadmap support. There is not any software roadmap support for DA14580 product family and SDK5.
If you have any follow up question, I would suggest you to create a new forum thread.
Thanks, PM_Dialog