找回密码
 立即注册

微信扫码登录

查看: 272|回复: 5

How to disable mesh function when zigbee commissioning only ?

[复制链接]

2

主题

2

回帖

38

积分

新手上路

积分
38
发表于 2024-9-9 07:25:08 | 显示全部楼层 |阅读模式
Dear Sir.


I use Zigbee_BLE_Concurrent_SDK_2.3.2.1.
I want that SDK not use mesh function when zigbee commissioning process is running.
I want that Cordinator commission router and end device via direct connection.
How to dsable zigbee mesh function while zigbee comissioning only ?

0

主题

3

回帖

22

积分

新手上路

积分
22
发表于 2024-9-9 17:04:28 | 显示全部楼层
Hi,
Which platform are you using,8258 or b91?
Do you want to turn off BLE when zigbee commissioning process is running?
If that's the case, if the device is in the broadcast state you need to turn off the broadcast, if it is in the connected state, you need to disconnect.
You can judge the BLE state by APP_BLE_STATE_GET().
Use bls_ll_setAdvEnable(0) to trun off the broadcast and bls_ll_terminateConnection(HCI_ERR_OP_CANCELLED_BY_HOST) to terminate ble connection.

2

主题

2

回帖

38

积分

新手上路

积分
38
 楼主| 发表于 2024-9-9 17:24:48 | 显示全部楼层
TL_zbhuanli 发表于 2024-9-9 17:04
Hi,
Which platform are you using,8258 or b91?
Do you want to turn off BLE when zigbee commissioning  ...

I use 8258.
I mean that MESH is zigbee mesh (not BLE Mesh).
When I commission zigbee light(router)s, A light is commissioned via B light.
(example, A light is in long distance, B light is short distance.
A light is not commissioned when B light is not existed.
But A light is commissioned when B light is existed.)
I want that A light is not commissioned even if B light is existed.
How to make it ?

0

主题

3

回帖

22

积分

新手上路

积分
22
发表于 2024-9-10 16:46:52 | 显示全部楼层
Hi,
When the A light try to join into the network, it will choose a best parent to associate.
Because of the B light is closer so the A light choose the B light as a parent to join into the network to increase the probability of successful network access.
If you only want A lights to select coordinator as the parent node, you can register callback function to do filtering.

You can register the macAppIndCbList in stack_init, and add the code below in zb_appCb.c.
bool sampleLight_beaconIndHandler(void *arg);
mac_appIndCb_t macAppIndCbList = {NULL, sampleLight_beaconIndHandler, NULL};

bool sampleLight_beaconIndHandler(void *arg){
        u8* payload = arg;

        u16 fcf = ((*(payload+1)) << 8) | (*payload);

        u16 srcAddr = 0;
        if((fcf & 0x8000) == 0x8000){
                srcAddr = ((*(payload+6)) << 8) | (*(payload+5));
                if(srcAddr == 0x0000){                //the network address of the coordinator
                        return TRUE;
                }
        }
        return FALSE;
}

2

主题

2

回帖

38

积分

新手上路

积分
38
 楼主| 发表于 2024-9-10 20:45:43 | 显示全部楼层
本帖最后由 jylee@kme21.com 于 2024-9-11 08:34 编辑
TL_zbhuanli 发表于 2024-9-10 16:46
Hi,
When the A light try to join into the network, it will choose a best parent to associate.
Becau ...

Dear Sir.

I added it.
And I added it to stack_init().
mac_appIndCbRegister((mac_appIndCb_t *)&macAppIndCbList);

I am testing it......

0

主题

3

回帖

22

积分

新手上路

积分
22
发表于 2024-9-13 10:54:43 | 显示全部楼层
Ok, hope my reply is helpful to you. Please let us know if there are any questions.
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Telink forum ( 沪ICP备17008231号-1 )

GMT+8, 2024-10-9 21:12 , Processed in 0.075563 second(s), 18 queries .

Powered by Telink 隐私政策

泰凌微电子版权所有 © 。保留所有权利。 2024

快速回复 返回顶部 返回列表