Cannot connect to sensor using Zigmo/router


#43

okay thanks for the update

Did you guys have any issues with this:
I have the batteries in my sensor and I see that the sensor data is coming in
Remove the batteries and put the batteries back in but I don’t see any data coming in.


#44

whats the delay value?
does the data start coming once you hit reset the device?


#45

Hi Jacob,

any updates?

Best, Ida


#46

I just cracked the issue with the Digi Library today. My current work-around is a bit hacky, but its worked so far. Let me organize a bit more and get back to you.


#47

sure thing thanks Jacob


#48

Hi I am also seeing an issue where I write to the set parameters like PAN ID and Encryption Key but these values do not stick when I click the reset button (goes back to 7FFF and default key)…
I set it up in python like this:

    remote_xbee.set_parameter(PARAM_NETWORK_ID, bytearray.fromhex(pad_hex(num_char=None,hexed="7AAA")))
    time.sleep(0.25)
    remote_xbee.set_parameter(PARAM_ENCRYPTION_KEY, CUSTOM_ENCRYPTION_KEY)
    remote_xbee.write_changes()

#49

Hi @jacob

Do you have any updates?


#50

Yes, while its not in the library itself, the library now supports it. I’ve got the code in a dev branch: https://github.com/ncd-io/NCDEnterpise-Python/tree/dev

You’ll need to update the base ncd_enterprise.py file and look at the new EnterpriseNCD-Configuration-Examply.py file.

Let me know if this breaks anything on your existing application and if it works for you. This version opens up a lot more functionality to the user including support to directly access the digi object for the modem and all the options that brings.


#51

Also as was mentioned in another thread the sensors override certain settings written directly to the module so they must be set using the protocol outlined at: https://ncd.io/ncd-io-wireless-sensor-raw-commands/

If you have any feedback on this let us know and we’ll take it into consideration. We love feedback.


#52

Okay thank you!

Will test this and let you know if I have any questions.


#53

Awesome,

let me know what you think or any weirdness you see.

I’m the only person that’s tested it and sometimes you get dev blind on wonky features.


#54

Do you have any example for setting encryption key?

It’s not here: https://ncd.io/ncd-io-wireless-sensor-raw-commands/

Tried this

device.send_data(remote_device, bytearray.fromhex('f20300000011111111111111111111111111111111'))

I’m a little confused by what you wrote here:

        # 07 will be the node id in hex. a7 = 167
        # 01a2 will be the sleep duration in seconds 01 = 256 seconds (MSB) a2 = 162 (LSB). Sleep duration in seconds = MSB*256+LSB
        ncdModem.send_data_to_address(sensor_data['source_address'], bytearray.fromhex('f702000000a701a2'))

Where did you get a7 from?


#55

The 07 is a typo. I’ll get that part fixed, the Node-ID in the command as shown will be a7. These two characters can be any hex value.

Working on the encryption key change example.


#56

Ah okay

Sweet thanks!

Ida


#57

And I’ve got to clarify something with a design engineer on the encryption key.


#58

okay

Question: Should this write 5 seconds to the sleep time?

device.send_data(remote_device, bytearray.fromhex('f702000000000005')) 

#59

Yes, it should.

I updated the configuration example to display how to change the KY property of the module.

I left it commented out because it is a dangerous command. The only way to recover a lost key is a factory reset.


#60

Okay so this file is sending the same commands are yours but I don’t seem to be able to connect to the device in XCTU.

If you change the address in the code to a mac address of one of the sensor you have you can test this too. Basically you run and it will configure the receiver to config mode, then waits until the sensor with the correct address is factory reset and connected with the receiver. Then the receiver sends those data commands that you have in your file. Now I press reset which should switch the sensor back into run mode but with the new network id and encryption key. However, in XCTU when I set the network id and encryption key to what I think I have set it as it doesn’t connect to the device. It appears as though the network id (‘7777’) was set but not the encryption key (‘a701a2a915164785f7160ad7a55a1f29’) Please let me know if I am missing something here.

config.py (3.2 KB)


#61

XCTU won’t show the encryption key even if manually set.

You can test this by manually entering in the default key (KY) 55aa55aa55aa55aa55aa55aa55aa55aa writing it in XCTU and then reading it back.


#62

I am not testing to see if the encryption key reading it from the device. I am testing it by seeing whether or not the receiver is able to connect. So if I set the receiver to match the values I set on the sensor then I should be able to connect with the sensor no?