简体   繁体   English

Xbee 802.15.4 Waspmote和XCTU-配置问题

[英]Xbee 802.15.4 Waspmote & XCTU - configuration issue

Hello stackoverflowers, 你好stackoverflowers,

once again I need your help. 我再次需要您的帮助。

I have a project that requires a 802.15.4 network. 我有一个需要802.15.4网络的项目。 For that I am using 1x Xbee S1 connected via USB-dongle and 1x Xbee S1 on a waspmote. 为此,我使用通过USB加密狗连接的1x Xbee S1和在​​waspmote上的1x Xbee S1。

Now heres the following problem: 现在出现以下问题:

If I configure both modules via XCTU, they can communicate. 如果我通过XCTU配置两个模块,则它们可以通信。 BUT if I configure one module via XCTU and the other one via WaspmoteIDE with the API v28 like this: 但是,如果我通过XCTU配置一个模块,而通过WaspmoteIDE使用API​​ v28配置另一个模块,如下所示:

uint8_t panid[] = {0x12, 0x34};

void setup(){ 
  xbee802.ON(SOCKET0);
  xbee802.setPAN(panid);
  xbee802.writeValues();
}

From my understandig this should write these values to the xbeemodule and set the PAN-ID to 1234. Correct me if Im wrong but as far as I know these values should be stored in xbee802.PAN_ID[0] and xbee802.PAN_ID[1]. 根据我的理解,这应该将这些值写入xbeemodule并将PAN-ID设置为1234。如果我错了,请纠正我,但据我所知,这些值应存储在xbee802.PAN_ID [0]和xbee802.PAN_ID [1]中。

But if I want to retrieve the info wheter the data was written or not with 但是,如果我想检索信息,则是否使用

xbee802.getPAN(); 

The output is 01. But if I try: 输出为01。但是,如果我尝试:

xbee802.PAN_ID[0] = panid[0];
xbee802.PAN_ID[1] = panid[1];

and then when I print xbee802.PAN_ID[0] and xbee802.PAN_ID[1] I get the PAN-ID I wanted to set which is 1234. But then when I want to check the Pan-ID again with xbee802.getPan() I get this annoying 01. 然后当我打印xbee802.PAN_ID [0]和xbee802.PAN_ID [1]时,我得到了我想要设置的PAN-ID,即1234。但是当我想再次使用xbee802.getPan()检查Pan-ID时我得到这个烦人的01。

And to confuse me a little more.. when I put the xbee module from the waspmote into the usb gateway and check the settings via XCTU, the changes I thought I made via the waspmote were not written and no communication is possible. 还有一点让我感到困惑..当我将wasbee中的xbee模块放入usb网关并通过XCTU检查设置时,我以为我通过waspmote所做的更改未写入,因此无法进行通信。 Communication is only possible when I write the Settings to Both xbeemodules via XCTU. 仅当我通过XCTU将设置写入两个xbee模块时,才可以进行通信。

On the other hand, when I configure the xbee module connected via usb dongle with the java driver and then check the settings in XCTU, they take effect. 另一方面,当我通过Java驱动程序配置通过usb加密狗连接的xbee模块,然后检查XCTU中的设置时,它们将生效。 so no problems manipulating the parameters via java-driver. 因此通过Java驱动程序操作参数没有问题。

What am I doing wrong that I cannot configure the xbee module through my waspmote. 我做错了我无法通过waspmote配置xbee模块。

Both modules: product family: XB24 function set: xbee 802.15.4 firmware version: 10ef 两个模块:产品系列:XB24功能集:xbee 802.15.4固件版本:10ef

Any help appreciated, 任何帮助表示赞赏,

Cheers 干杯

For anyone interested in using a xbee 802.15.4 module with a waspmote and experiencing a similar problem: 对于有兴趣将xbee 802.15.4模块与waspmote一起使用并遇到类似问题的任何人:

Make sure your xbee module is set to API-Mode, otherwise it will not react to the changes that are supposed to be written through the waspmote. 确保您的xbee模块设置为API模式,否则它不会对应该通过waspmote写入的更改做出反应。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM