Forums › SM Series Discussions › SM API: smGetDeviceList() & smNetworkConfigGetDeviceList() bug › Reply To: SM API: smGetDeviceList() & smNetworkConfigGetDeviceList() bug
February 4, 2026 at 4:35 pm #254724
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
Roger.
