API-Mode 64-Bit Addressing Unicast

Hi,

I’m trying to write my own Library to Interface with my Series1 XBees. Sending Multicast Packets works quite nice. But I have Problems with the 64-Bit Unicast Addressing.

16-Bit Addressing, Unicast to MY=1234:
7e 00 16 01 00 12 34 00 48 65 6c 6c 6f 20 63 72 75 65 6c 20 57 6f 72 6c 64 61

works fine.

64-Bit Addressing, Unicast to DH=0013A200, DL=4033D843
7e 00 1c 00 00 00 13 a2 00 40 33 d8 43 00 48 65 6c 6c 6f 20 63 72 75 65 6c 20 57 6f 72 6c 64 65

nothing is received.

Both Modules are on Firmware 10E6 with Default Settings (PAN ID=3332, Channel C). Only change is the MY on the Receiving Modul and the API Mode is set to 2 on the Sender.
The Receiver is Monitored using X-CTU.

Am I missing something.

Bonus Question: Am I right to assume that the DH and DL Registers are only used if I don’t use the API where I explicitly specify a Destination?

So long,
Duckula

Hi

I have similar problem with xbee pro modules series 2
I am sending the followin packet to the module using XCTU

7E 00 10 00 2D 00 7D 33 A2 00 40 31 20 E8 00 74 65 73 74 00 E4

However I am not getting any response from the module (not even a response that shows some problem…)

@Duckula

The packet is valid:

[john@eccles ~]$ packet-check
API Packet analyzer version 1.2 for XBees (802.15.4, DigiMesh, ZNet, ZB)
Note: if it prompts for more bytes and you’re done, hit return
Enter packet: 7e 00 1c 00 00 00 13 a2 00 40 33 d8 43 00 48 65 6c 6c 6f 20 63 72 75 65 6c 20 57 6f 72 6c 64 65

Packet: 7E 00 1C 00 00 00 13 A2 00 40 33 D8 43 00 48 65 6C 6C 6F 20 63 72 75 65 6C 20 57 6F 72 6C 64 65
7E // Correct packet header byte
00 1C // payload length (decimal 28)
00 // Packet type: TX request with 64-bit address
// Valid for 802.15.4
00 // frame id: 00 so no response packet will be sent
00 13 A2 00 40 33 D8 43 // 64-bit destination address
00 // TX options
// TX data (17 bytes) [1]
48 // transmitted data ‘H’
65 // transmitted data ‘e’
6C // transmitted data ‘l’
6C // transmitted data ‘l’
6F // transmitted data ‘o’
20 // transmitted data ’ ’
63 // transmitted data ‘c’
72 // transmitted data ‘r’
75 // transmitted data ‘u’
65 // transmitted data ‘e’
6C // transmitted data ‘l’
20 // transmitted data ’ ’
57 // transmitted data ‘W’
6F // transmitted data ‘o’
72 // transmitted data ‘r’
6C // transmitted data ‘l’
64 // transmitted data ‘d’
65 // checksum - correct

Notes:
[1] Max 100 bytes on 802.15.4, or 72 on DigiMesh or ZNet2.5

The frame id is 0 so you’re telling the XBee not to achnowledge the transmission. You could try setting it to a non-zero value and see what comes back by way of a TX Response message.

Okay, I’m narrowing down the problem, but im not quite there.

it seems to have somethin to do with the 2nd byte in the 64 bit address. In my Address it is 0x13. If i change it I get a Status response (of course 1, because there’s no device there with this address). Same effect with the Address gkarv1976 mentioned. If I take my Address and change the second bit to 0x7D I also don’t get a response. I’m not seeing a pattern here.

Question is, if the Modem is even trying to send the packet or discarding it for some reason (error in checksum calculation or something).

Edit: okay, just wrote some code that iterates the 2nd Byte
The Error happens wenn it is one of these 0x11, 0x13, 0x36, 0x7D, 0x7E, 0xA1, 0xA3

Because you have AP set to 2, you are using escaped characters. x13 is a byte that needs to be escaped. To do this, replace the x13 with the x7D. The next byte will then be the escaped byte XORed with x20 (x13 XOR x20 = x33). This byte needs to be included in your packet when working with escaped characters.

Stupid me. I actually implented the escaping in my code. But I had the Modem in API Mode 1 (/wo escaping).

Thx, that was a big help.
Have a nice weekend :slight_smile:

P.S.: the ones where the address didn’t contain escaped characters had a escaped checksum…