문제

I am using Java XBEE API with Zigbee modules to send data to remote zigbee. I am using 64 bit address of remote zigbee module like this:

XBeeAddress64 destination = new XBeeAddress64(0x00, 0x13,0xa2,0x00,0x40,0xa9,0xd0,0xd1);

It works fine but I don't have any idea what 0x00 means in JAVA whether it is hex, integer or string. I have a string containing remote address and i want to use this as remote address like this:

address_64 = "0x00 0x13 0xa2 0x00 0x40 0xa9 0xd0 0xd1";
destination = new XBeeAddress64(address_64);

But this time it gives error. Does anyone know hoe to solve it?

도움이 되었습니까?

해결책

According to the documentation this is possible when you omit the 0x in the address.

Your address string should then look like this:

String address_64 = "00 13 a2 00 40 a9 d0 d1";
destination = new XBeeAddress64(address_64);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top