Part Number: CC2650EM-7ID-RD
Other Parts Discussed in Thread: BLE-STACK
CC2650EM-7ID cannot connect to central by using ProjectZero project.
ProjecZero for CC2650EM-7ID is downloaded from software-dl.ti.com/.../setup_simplelink_academy_01_11_00_0000.exe.
The apprication "BLE Scanner" on Android is used as central.
When the test is done with original ProjectZero, connection works well.
However, when some modification are incleded into ProjectZero to enable "ICALL_EVENTS", advertising is fine,
but connection does not work. The test stops around "Discovering Services...".
Could you please give advices to enable "ICALL_EVENTS" in the project.
The modification points in the project are:
- Add predefine "ICALL_EVENTS" to the project
- Add below lines into project_zero.c
#define TASK_BLE_ICALL_EVT ICALL_MSG_EVENT_ID // Event_Id_31
#define TASK_BLE_QUEUE_EVT UTIL_QUEUE_EVENT_ID // Event_Id_30
#define TASK_BLE_ALL_EVENTS (TASK_BLE_ICALL_EVT | TASK_BLE_QUEUE_EVT)
- Add below lines just after "for(;;)" in the function "void ProjectZero_taskFxn()" in project_zero.c
uint32_t events;
events = Event_pend(syncEvent, Event_Id_NONE, TASK_BLE_ALL_EVENTS, ICALL_TIMEOUT_FOREVER);
if (events) { ...
- Add below lines aroun the line #60 in project_zero.c
if (events & TASK_BLE_QUEUE_EVT) {
// Process messages sent from another task or another context.
while (!Queue_empty(hApplicationMsgQ)) {...
- Replaced below lines in the function "void user_enqueueCharDataMsg()" and "void user_enqueueRawAppMsg()" of project_zero.c
from
// Enqueue the message using pointer to queue node element.
Queue_enqueue(hApplicationMsgQ, &pMsg->_elem);
// Let application know there's a message.
Semaphore_post(sem);
to
Util_enqueueMsg(hApplicationMsgQ, syncEvent, (uint8_t *) pMsg);
Best regards,
Haruko.