I’ve programmed some of your enterprise sensors with custom parameters (encryption key and PAN ID) and I’ve noticed that these values do not survive a device reset i.e., I press the reset button once and the values I set revert back to 7FFF for the PAN ID and the default encryption key.
Here’s the Python code that I’m using to set the values:
Hi Ida,
I think you are trying to send data to the xbee. This wont work. You will need to send complete command to the sensor and sensor will set these parameters.
for example to set pan id you will need to send this command
7E 00 15 10 00 00 00 00 00 00 00 FF FF FF FE 00 00 F7 05 00 00 00 7C DE 9E
The command structure can be found here
Currently this is whats happening
You are setting the parameter in the xbee but as soon as you reset the device the controller will over write those parameters with the stored values.
Thanks for your advice. Following it, I am now sending a complete command to the sensor to set the wireless network ID based on the example from https://ncd.io/ncd-io-wireless-sensor-raw-commands/
However, I’ve noticed that these values do not survive a device reset i.e., I press the reset button once and the values I set revert back to 7FFF.
This is the logger from XBee I am seeing in my terminal and so I can see that the complete command is being sent as it matches the one on your website.
/dev/cu.usbserial-A106B3U5SENT OperatingMode.API_MODE7E 00 15 10 00 00 00 00 00 00 00 FF FF FF FE 00 00 F7 05 00 00 00 7C DE 9E
I also just tried to send that command over the serial console in XCTU. Whereas before I was getting the expected return value of
Without digging through more digi source code than is healthy for me. Does the device.sendpacket wrap anything in the digi API by default?
If it doesn’t then you will need to make sure you do this manually. Or just use their remote_device objects and let the library handle the API. Also my documentation is showing the packets must start with a “Delimiter” value followed by two bytes for the length before the 10 00 will be put in the packet.