intrepidcs / python_ics

Library for interfacing with Intrepid devices in Python
MIT License
62 stars 31 forks source link

Failed to enable the Fire2 network HSCAN6 & HSCAN7 #90

Closed eric-qianfeng closed 3 years ago

eric-qianfeng commented 3 years ago

There is a function in python lib: ics.set_device_settings(device, Settings, save_to_eeprom, vnet_slot)

But the parameter Settings (ics.DeviceSettings) doesn’ t have the property “fire2”, I guess maybe it is “cyan”, but when I try to use ics.get_device_settings(device) to test it, I failed to get the baudrate value.

device = ics.open_device() s = ics.get_device_settings(device)

The following is the return value s: DeviceSetting

And all the value network_enables, network_enables_2, network_enables_3 are also 0. So I think my guess for Fire2 is wrong.

I think for Fire2, something wrong with get_device_settings(). So how to enable the Fire2 network HSCAN6 & HSCAN7?

drebbe-intrepid commented 3 years ago

@eric-qianfeng Can you provide me with the following:

  1. OS version
  2. Python version
  3. icsneo40.dll version
  4. license level in explorer.
  5. network enables are not enabled in explorer.
  6. baudrate in explorer (default is 8 (500000)). This is a enum representation of the baudrate and not the actual value.
  7. Firmware version in explorer (are any red?)
  8. does ics.load_default_settings() result in the same behavior?

Cyan is a left over code name that never was updated upstream, FIRE2 is cyan. https://github.com/intrepidcs/python_ics/blob/master/include/ics/icsnVC40.h#L1692

eric-qianfeng commented 3 years ago

@drebbe-intrepid , the following is my answer:

  1. OS version
    • Windows 10
  2. Python version
    • V3.6.8 (32-bit)
  3. icsneo40.dll version
    • V3.9.3.17
  4. license level in explorer.
    • Do you mean neoVI explorer? I am not sure its license level, is it not free? But my VSpy3 is enterprise.
  5. network enables are not enabled in explorer.
    • I use Load Default Settings in explorer first, after quit the explorer, I call the function in Python, and get the upper snapshot.
  6. baudrate in explorer (default is 8 (500000)). This is a enum representation of the baudrate and not the actual value.
    • Yes, I understand, unfortunately, the baudrate value is 0, so I think it is wrong.
  7. Firmware version in explorer (are any red?)
    • No red(MCHIP: 6.176; ZCHIP: 3.53; Core: 1.7), I always open Enable Auto Update, to make environment clean, I only install one version of VSpy3. Just now I manual refresh again.
  8. does ics.load_default_settings() result in the same behavior?
    • Yes, the same.
    • BTW, about the load_default_settings(), in the help doc, the sample code return value assign to a variable "settings", but according to the text, the return is NONE, I think it will cause misunderstanding. load_default_settings
drebbe-intrepid commented 3 years ago

@eric-qianfeng Thanks for catching that, the example is wrong. That is a failed copy and paste.

Even when you load defaults in neoVI Explorer if the license level in the hardware is not set correctly the network enables will not be set. It should be able the firmware versions when you first connect to the device for the license level.

ics.load_default_settings() directly tells the firmware to reset to defaults and the only thing that should impede that is the hardware license I believe.

drebbe-intrepid commented 3 years ago

I was unable to reproduce this here and I looks like you are in contact with our support department. I'm going to close this out, if you find there is an issue with the API please re-open this issue please!

Documentation bug with ics.load_default_settings() will be in the next releases.