The brand-new PN400 Phase Noise Test System is available for purchase! →

Reply To: SM API: smGetDeviceList() & smNetworkConfigGetDeviceList() bug

Forums › SM Series Discussions › SM API: smGetDeviceList() & smNetworkConfigGetDeviceList() bug › Reply To: SM API: smGetDeviceList() & smNetworkConfigGetDeviceList() bug

#254724
RogerRoger
Moderator

Hi tschmitz,

The issue appears to be that the net_count variable is uninitialized. The smNetworkConfigGetDeviceList function uses its pararameter deviceCount to determine how large the serials array is, so it can return a maximum of that many devices (zero in this case).

In other words, the second line of code should be: int net_serials[SM_MAX_DEVICES], net_count = SM_MAX_DEVICES;

I know it is odd that the seemingly equivalent function for USB devices (SM200B/SM435B) does not have this requirement.

Let me know if this doesn’t fix it.

– Roger

  • This reply was modified 7 months, 3 weeks ago by RogerRoger.