Cannot connect to sensor using Zigmo/router

If the encryption key, encryption enable, network ID, and preamble ID are all the same then you should see the data from the sensor on the receiver.

You won’t be able to send data to the sensor while it is in RUN mode because it will be asleep.

Okay so I put the receiver in config mode (setting the network ID to 0x7BCD), then put the sensor I want to configure in configuration mode by doing a factory reset. Then I write specific values to encryption key and network ID using that file. Then I click the reset to put the sensor back into run mode because now I want to start receiving sensor data from the sensor. I then switch the network ID and the encryption key on my receiver to the same specific values I set on the sensor. I should be able to see the data from the sensor on the receiver? I have not changed the encryption enable (seems like it is always 1/True) and the preamble ID on either device.

Are you able to see the sensor on the receiver after you’ve changed the encryption key and the network ID?

Best,
Ida

This is the Jacob above, I’m out of the office due to inclement weather.

Yes, the library and example code I wrote alters my sensor’s settings properly and I can receive data from it after a reset.

I don’t see anything wrong with your code, but I had to work around some strangeness with how the digi library handles serial ports in the library. It doesn’t sound like you’re running into that.

Can you try the library and example code and see if that works? Just run the example config with the proper modem settings and put the sensor in config mode. It will automatically write the settings.

You might also try a factory reset on the device, hold config, press release, release config after ~15 seconds. It will boot up in PGM mode automatically once it has reset.

Okay tried it and this is what I see in terminal

full return: {'nodeId': 0, 'sensor_type': 4, 'mode': 'PGM', 'source_address': '0013A200418E9E29'}

nodeId 0

sensor_type 4

mode PGM

source_address 0013A200418E9E29


send address

full return: {'nodeId': 0, 'counter': 1, 'mode': False, 'sensor_type': 4, 'source_address': '0013A200418E9E29', 'config_response': bytearray(b'\x00\x02X\x00\x00\x00\x00\x00\x00')}

nodeId 0

counter 1

mode False

sensor_type 4

source_address 0013A200418E9E29

config_response bytearray(b'\x00\x02X\x00\x00\x00\x00\x00\x00')

full return: {'nodeId': 167, 'sensor_type': 4, 'error': 10, 'mode': False, 'error_message': 'Invalid/Incomplete Packet Received'}

nodeId 167

sensor_type 4

error 10

mode False

error_message Invalid/Incomplete Packet Received

Can you replace the set node id and sleep duration line to this: ncdModem.send_data_to_address(sensor_data[‘source_address’], bytearray.fromhex(‘f702000000a70001a2’))
and see if that fixes that error?

@jacob that doesn’t seem to fix it

Here is what I am seeing/

Admins-MacBook-Pro:NCDEnterpise-Python-dev idahuang$ python EnterpriseNCD-Configuration-Example.py 

full return: {'nodeId': 167, 'sensor_type': 4, 'mode': 'PGM', 'source_address': '0013A2004191540C'}

nodeId 167

sensor_type 4

mode PGM

source_address 0013A2004191540C

in config

read sleep duration

set node id

send address

full return: {'nodeId': 167, 'counter': 1, 'mode': False, 'sensor_type': 4, 'source_address': '0013A2004191540C', 'config_response': bytearray(b'\x00\x01\xa2\x00\x00\x00\x00\x00\x00')}

nodeId 167

counter 1

mode False

sensor_type 4

source_address 0013A2004191540C

config_response bytearray(b'\x00\x01\xa2\x00\x00\x00\x00\x00\x00')

full return: {'nodeId': 167, 'sensor_type': 4, 'error': 10, 'mode': False, 'error_message': 'Invalid/Incomplete Packet Received'}

nodeId 167

sensor_type 4

error 10

mode False

error_message Invalid/Incomplete Packet Received

I think the packet is slightly off.
I sent this which is in your example file

ncdModem.send_data_to_address(sensor_data['source_address'], bytearray.fromhex('F7020000000100012C'))

/dev/cu.usbserial-AC4609Q2SENT        OperatingMode.API_MODE7E 00 17 10 10 00 13 A2 00 41 91 54 0C FF FE 00 00 F7 02 00 00 00 01 00 01 2C D4

There is an 10 from the frame id instead of 0?

Also why do you call this and open and close the device?

def ncd_xbee_serial_open_override(self):
        self.device.close()
        self.device.open()
        self.device.add_packet_received_callback(self.parse)

The digi library was holding the serial port without giving me access to it during a listener callback. It was the issue I was having with their library.