Bluetooth migration issues

⚠️
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.
4 posts / 0 new
Last post
邓昌永
Offline
Last seen:3 weeks 2 days ago
加入:2020-02-10 02:23
Bluetooth migration issues

Hi,

I ported the routine on the routine and I had a problem.After the transplantation, the program runs to the ble_peripheral_start () function and crashes.What may be the cause?Below is my code.

void ble_peripheral_task(void *params)
{
printf("\n*** Custom BLE Service Demonstration ***\n\n\r");

// in case services which do not use svc are all disabled, just suppress -Wunused-variable

// /* register ble_peripheral task to be monitored by watchdog */
// wdog_id = sys_watchdog_register(false);

/* Get task's handler */
//ble_task_handle = OS_GET_CURRENT_TASK();

srand(time(NULL));
//
ble_peripheral_start(); //crashes
ble_register_app ();

ble_gap_device_name_set("Custom BLE Service", ATT_PERM_READ);

user_sev_init();

void ble_peripheral_task_init(void)
{

/* Initialize BLE Manager */
ble_mgr_init();
/* Start the BLE Peripheral application task. */
OS_TASK_CREATE("BLE Peripheral", /* The text name assigned to the task, for
debug only; not used by the kernel. */
ble_peripheral_task, /* The function that implements the task. */
NULL, /* The parameter passed to the task. */
1024, /* The number of bytes to allocate to the
stack of the task. */

BLE_PERIPHERAL_TASK_PRIORITY,/* The priority assigned to the task. */
ble_task_handle); /* The task handle. */
OS_ASSERT(ble_task_handle);
}

Device:
PM_Dialog
Offline
Last seen:6 hours 41 min ago
工作人员
加入:2018-02-08 11:03
Hi There,

Hi There,

Not sure how you did the merging, but can you please run your code in debug mode and indicate where it gets stuck?

Thanks, PM_DIalog

邓昌永
Offline
Last seen:3 weeks 2 days ago
加入:2020-02-10 02:23
The problem has been solved,

The problem has been solved, thank you.

PM_Dialog
Offline
Last seen:6 hours 41 min ago
工作人员
加入:2018-02-08 11:03
Hi There,

Hi There,

Glad that you figured you issue.

Thanks, PM_Dialog