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.
你想做什么?
/*!
Channel mask used when CONFIG_FH_ENABLE is false.
Each bit indicates if the corresponding channel is to be scanned
First byte represents channels 0 to 7 and the last byte represents
channels 128 to 135.
For byte zero in the bit mask, LSB representing Ch0.
For byte 1, LSB represents Ch8 and so on.
e.g., 0x01 0x10 represents Ch0 and Ch12 are included.
The default of 0x0F represents channels 0-3 are selected.
APIMAC_STD_US_915_PHY_1 (50kbps/2-FSK/915MHz band) has channels 0 - 128.
APIMAC_STD_ETSI_863_PHY_3 (50kbps/2-FSK/863MHz band) has channels 0 - 33.
APIMAC_GENERIC_CHINA_433_PHY_128 (50kbps/2-FSK/433MHz band) has channels 0 - 6.
*/
#define CONFIG_CHANNEL_MASK { 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00 }
#define CONFIG_CHANNEL_MASK { 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, \0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00 }
你这个写法不对吧
举个例子你想设置channel 1:
#define CONFIG_CHANNEL_MASK { 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00 }----->信道0
不是啊
0xf 代表0 1 23 四个信道,分别是 1111 为F
加入你要0 和12 channel 有效则是
1 0000 0000 0001
01 10
e.g., 0x01 0x10 represents Ch0 and Ch12 are included.
0-6 111 1111 7F
如果你的sensor 不固定panid 为FFFF 则需要设置信道 ,如果你的sensor panid 和要去连接的collector 一致则设置为相同的channel 或者0-6 全部有效也可以。
设置channel 需要在config里面修改。
"我把channel设置为0x20 或者设置为5。都无法关联。只有设置为0才可以。不懂
devInFoBlock.channel。"
你去发送associate request的collector channel 到底是什么? 如果是0x20 ,你设置为channel=0不可能发送的到。
1.无法通信
2.sensor NV清掉之后可以加入任意的collector,当你sensor 清除NV加入collectorB之后又会分配一个短地址,所以无法和原来的collectorA通信。懂了没?