as described in the “XBee ZB OEM RF Modules” manual a XBee module has (page 38ff, Application-layer Addressing) following endpoints:
0xDC-0xEE Reserved for Digi Use
0xE6 Command Endpoint
0xE8 Data Endpoint
0xEF-0xF0 Reserved for Ember Use
The endpoints 0x01-0xDB are free to use.
I would like to know, how i “register” an own endpoint (with cluster id, profile id), so my application can receive messages from other ZigBees.
You would need to partition the ZigBee Alliance at www.zigbee.org
I’m looking for something like “AF_REGISTER” or “AF_REGISTER_ENDPOINT” on modules from other vendors.
I’m getting something like this from my XBee module (coordinator)
Active_EP_rsp [ Status=SUCCESS, NWKAddrOfInterest=0x0000, ActiveEPCount=2, ActiveEPList=0xE6(230), 0xE8(232) ]
So i can discovery the two default endpoints from Digi. But i want to add an own endpoint.
i don’t want to register a public endpoint, cluster id, or profile id at the ZigBee Alliance.
I thought endpoints are something like TCP port numbers. So Digi has some in use for their own purposes, and i would like to have an endpoint for mine.
I thought everybody can use any free endpoint for private profile…
So, how i use endpoints with XBee modules?
I’m looking for something to open/register an endpoint, like you open a port for TCP/IP.
If you are using one of our gateway products (such as a ConnectPort X4) you may bind to and endpoint using socket semtantics. See: http://www.digi.com/wiki/developer/index.php/Zigbee_Extensions_to_the_Python_socket_API
The appropriate example would be:
This example binds to application endpoint 0xe8,
receives a single frames at this endpoint and then# sends the frame’s payload back to the originator
using the radio’s proprietary mesh transport.
include the sockets module into the namespace:
from socket import *
Create the socket, datagram mode, proprietary transport:
sd = socket(AF_ZIGBEE, SOCK_DGRAM, ZBS_PROT_TRANSPORT)
Bind to endpoint 0xe8 (232) for ZB/DigiMesh, but 0x00 for 802.15.4
sd.bind((“”, 0xe8, 0, 0))
Block until a single frame is received, up to 255 bytes:
payload, src_addr = sd.recvfrom(255)
Send the payload back to the source we received it from:
sd.sendto(payload, 0, src_addr)
Otherwise, if you only have a module to appropriate thing to do is to attach an MCU and enable Explicit-RX frames using the AO parameter. Then you will receive frame with the endpoint, profile, and cluster information.
If you want to process bindings yourself you may also enable second bit in the AO register that will propigate ZDP information to you.