协调器已经加满了,运行一段时间后,某个终端坏了,
直接更换成新的终端,此时加不进去,
现在协调器里需要踢出原来坏的终端,请问用什么指令?
用leave request吗?但是此时坏的终端已经不在线了,
leave request发出去终端是不会有应答的,这样可以踢出该终端吗?
如果可以,请告知leave request具体是用什么指令去控制?只知道终端的MAC地址是否可以踢出他?
YiKai Chen:
這種情況下也不需要踢出原来坏的终端,只能透過Child Aging讓终端自行從關聯表中移除
user5367314:
回复 YiKai Chen:
1.发送leave request的时候终端必须是在线的吗?
2.还有一种情况,终端已经正常入网,直接把该终端断电后重新刷一遍固件,
此时再去加入之前的协调器,发现被踢,这样的情况,是不是给协调器发一次
leave request即可解决?
Kevin Qiu1:
回复 user5367314:
How to make a device leaving the network
Use the NLME_LeaveReq() function.
For making a remote node to leave the network, the extAddr pointer of the NLME_LeaveReq_t parameter shall be assigned to the remote node 64 bit IEEE address. The address of a remote node can be retrieved during association process by processing the Device_annce message as shown in "#How to get the address of new devices joining the network".
For making the local node to leave the network, the extAddr pointer of the NLME_LeaveReq_t parameter shall be assigned as NULL.
看下协议栈9.4节关于离开网络的说明
YiKai Chen:
回复 user5367314:
1. 式的,不然不會有response就沒用了
2. 這種情況你协调器應該要重新使能permit join才能讓终端重新入網
user5367314:
回复 YiKai Chen:
如果我想把网络中坏的终端移除网络,
可以直接在association 表里删除该设备吗?
这样是不是就腾出一个位置该新设备加入了?
如果可以的话怎么在association 表里删除某个设备?用什么API?
YiKai Chen:
回复 user5367314:
可以用AssocRemove從association 表里删除该设备
/** Remove a device from the list. Uses the extended address.*/
extern byte AssocRemove( byte *extAddr );
user5367314:
回复 YiKai Chen:
AssocRemove( byte *extAddr )函数的参数extAddr 是什么地址?
我只知道终端的MAC地址可以使用该函数吗?
另外AssocRemove和leave request的效果是不是一样的?
YiKai Chen:
回复 user5367314:
extAddr就是终端的MAC地址,AssocRemove是直接從關聯表把設備移除leave request是送出leave封包,如果有收到response才會從關聯表把設備移除
user5367314:
回复 YiKai Chen:
请问如果我只知道终端的网络地址,请问如何在AssociatedDevList直接删除此终端?
YiKai Chen:
回复 user5367314:
必須要知道终端的IEEE address