This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: WEBENCH® Design Tools
Hi TI team,
If the ZED join the ZC(it had a fix panid,eg:0x1122),what it can do it?
In addition to dynamic settings panid, what other ways?
Thanks!
When ZC responds beacon request of a device, it will have permit join information in ZC's beacon frame and ZED can check this information to know if ZC is opened for joining.
Hi YiKai Chen
But if the ZED is the random panid, no the same as the ZC fixed panid.
The ZED can not join the ZC network.
And I found the post, I had a same views about this, follow this?
Thanks!leaving and joing in a new PAN - Zigbee & Thread forum - Zigbee & Thread - TI E2E support forums
Thanks!
If ZED hasn't joined any Zigbee network, it won't have any specific PANID and it will pick one with permit join enable to join. If ZED joins successfully, it will keep the PANID in its RAM/Flash.
Hi YiKai Chen
So,for example,the ZC panid is 0x2222,the ZED panid default random values,
If the ZC permit the network,the ZED beacon join the ZC,ZED will judge the ZC response beacon frame,if right,it will join the ZC,if wrong,it will not join,and we can set it as the same panid as ZC,so ZED can join the ZC?
right?
Thanks
It's basically correct except ZED uses 0xFFFF(not random) as PANID initial value.
Hi YiKai Chen
And I had a doubt: If ZC had a fixed panid, how did ZED know the ZC panid,so it can join to ZC?
Use this API[ZDP_MgmtNwkDiscReq] scan the network?this case [Mgmt_NWK_Disc_rsp ]return a IEEE Address.
IEEE Address can generate a network panid?
So the ZC can read itself panid from the NVflash, what is the ZC tell the panid to ZED,use a Beacon API,
What kind Beacon API?
Thanks!
Hello userjiabo,
Beacon responses include the ZC's Pan ID and Association Permit bit:
This is all automatically handled by the MAC layer and cannot be controlled by the user. You can use Zstackapi_bdbNwkDescFreeReq to pre-determine networks which you do not want to join: http://dev.ti.com/tirex/content/simplelink_academy_cc13x2_26x2sdk_3_30_01_00/modules/zigbee/zigbee_04_security/zigbee_04_security.html
Regards,
Ryan
Hi Ryan Brown1
I had read and check what you said these days.
But what zstack3.0.2 had no this API(Zstackapi_bdbNwkDescFreeReq and Zstackapi_bdbFilterNwkDescComplete),and I can not find the Beacon responses where describe in the zstack3.0.2 source code.
I am not too understanding the process join network between ZC and ZED,
for example, I can find the source code Beacon responses and Association Request Response,even after ZED join the ZC zigbee network ,short address assigned.and so on.
these information where I can find in the zigbee specification.
Thanks!
Hi Ryan Brown1
This API scan the network ZDP_MgmtNwkDiscReq() ,I found the ZED source code had deal with this Req,but I had not found this ZDO_NetworkDiscoveryConfirmCB API callback.
Thanks!
Hi YiKai Chen
I mean that my ZC had a stable panid, the ZED[ 0xff panid ], But the ZED want to join this stable panid. So what can it know the ZC panid?
The post above support a API [ZDP_MgmtNwkDiscReq].
This API can set manually can deal with it.
From the Brown1 packet log,I can learn the ZC Becaon Response[had a ZC panid],So what kind of API used in this Becaon Response on the zstack3.0.2?
This API[ZDO_ProcessMgmtNwkDiscReq] is dealed by the ZED because the ZC send a command ZDP_MgmtNwkDiscReq[Mgmt_NWK_Disc_req].
But the ZED had not Mgmt_NWK_Disc_req to ZC automatically,This must users set it by themselves in the zstack3.0.2?
Thanks!
Yes, ZDApp_NwkDescListProcessing is where application uses for selecting a network to join.
Hi YiKai Chen
This API[ZDApp_NwkDescListProcessing] used on the ZED/ZR,right?
And what about the Becaon Response,which API?
expand panid[8bytes] is equal to expand address[8bytes]?
I can set this on my zigbee zstack3.0.2 as follows.
1.I use API[ZDP_MgmtNwkDiscReq] generate a the request for the destinationevice to perform a network scan,
2.ZED receive this request,Parsing the request on the ZDO_ProcessMgmtNwkDiscReq and manual callback the Mgmt_NWK_Disc_rsp generate the response.
3.ZC receive this response[Mgmt_NWK_Disc_rsp],callback API[ZDO_ParseMgmNwkDiscRsp] judge the panid if right or wrong,
Thanks!
userjiabo said:This API[ZDApp_NwkDescListProcessing] used on the ZED/ZR,right?
Yes
userjiabo said:And what about the Becaon Response,which API?
There is not a Z-Stack API for this MAC-layer communication
userjiabo said:expand panid[8bytes] is equal to expand address[8bytes]?
These can be different values but Z-Stack initializes the extended PAN ID as its own extended address
I don't understand the steps you've outlined, but as YK said the ZDApp_NwkDescListProcessing function is used by the ZED/ZR to select a network to join.
Regards,
Ryan
Hi Brown1
I mean that because from the zigbee packet wireshark log,I can learn the Becaon Response with a ZC panid.
But you said MAC layer automatically response.
So where the ZED get this panid which is contained on the Becaon Response Frame?
And where the ZED receive the Becaon Response Frame can call the API[ZDApp_NwkDescListProcessing] to select a panid network to join?
understand on follows steps base on my point:
If ZC1 want ZED(1-3) to join,ZC2 want ZED(4-5) to join, I mean that ZC can select which ZED can join,
I can do it as follows.
1.the ZC use API[ZDP_MgmtNwkDiscReq] to generate a request for the destinationevice to perform a network scan.
2.ZED receives this Mgmt_NWK_Disc_req,call the API[ZDO_ProcessMgmtNwkDiscReq ] to parse the message and then generate a Mgmt_NWK_Disc_rsp.
3. ZC receive this response[Mgmt_NWK_Disc_rsp],call API[ZDO_ParseMgmNwkDiscRsp] judge the Mac Address,if wrong.let it leave.if right, let ZC use API[NLME_JoinRequest] to let it join.
typedef struct
{
uint8 status;
uint8 networkCount;
uint8 startIndex;
uint8 networkListCount;
mgmtNwkDiscItem_t list[];
} ZDO_MgmNwkDiscRsp_t;
typedef struct
{
uint8 extendedPANID[Z_EXTADDR_LEN]; // The extended PAN ID
uint16 PANId; // The network PAN ID
uint8 logicalChannel; // Network's channel
uint8 stackProfile; // Network's profile
uint8 version; // Network's Zigbee version
uint8 beaconOrder; // Beacon Order
uint8 superFrameOrder;
uint8 permitJoining; // PermitJoining. 1 or 0
} mgmtNwkDiscItem_t;
Thanks!
Yes, ZED gets this panid which is contained on the Becaon Response Frame. After ZED collects all beacon response frame, ZDApp_NwkDescListProcessing will be triggered to decide which network to join.
Hi YiKai Chen
So how can I use this API[ZDApp_NwkDescListProcessing],
My thoughts is that I should know the ZED deal with Becaon Response Frame where on the zstack source code,
if know, I can call this API.
I had found the zstack source code,I can not find deal this Becaon Response. maybe MAC-layer communication.
Thanks!
Basically, you can revise logic inside "for ( i = 0; i < ResultCount; i++, pNwkDesc = pNwkDesc->nextDesc )..." in ZDApp_NwkDescListProcessing to chose a network to join.
Hi YiKai Chen
I had read the source code at night.But I am not understand what you said.
Thanks!
If you cannot understand source codes by reading them, I would suggest you to debug and trace it to know it better.