XBee programming capabilities

Hello, I’m planning to develop and implement my own protocol for WSNs using XBee modules and I’m new to this area. So what’s important for me now is to know how ‘deep’ it is possible to program XBee with DigiMesh?

Is it possible to implement a protocol on top/on the same level as DigiMesh without rewriting completely the firmware?

What capabilities of the module are actually programmable? (RAM management? Frame management?

Thanks in advance :slight_smile: