Other Parts Discussed in Thread: Z-STACK
Hi. I need to implement automatic commissioning on a router device, so that no pressing of a button to start commissioning is needed. I'd like it to work with touchlink, too.
Please help me turn the following pseudo-code into an actual code:
void zclMyApp_Init( byte task_id ) {
...
if ("previously connected to a coordinator or touchlink") {
bdb_StartCommissioning("rejoin");
if ("could not find the network anymore") {
bdb_StartCommissioning("join another touchlink or coordinator");
}
} else {
bdb_StartCommissioning("join touchlink or coordinator");
}
...
}