Forums › SM Series Discussions › Communicate with SM200C through API
- This topic has 4 replies, 3 voices, and was last updated 2 weeks, 3 days ago by
Roger.
- AuthorPosts
jferParticipantHello,
I have the SM200C using a Sonnet Solo10G SFP+ (Thunderbolt 3 Edition) going into an Intel NUC running Ubuntu 22. After going through the 10GbE Network Configuration Guide I was able to get Spike to connect to the device and even change the device network configuration through the Spike SM Network Configuration utility. However I have been unable to connect to the device through the Python API, including the networked_speed_test.py example. It just returns that no device is found. Any advice for this?
Thanks!
AndrewModerator- This reply was modified 2 weeks, 6 days ago by
Andrew.
Did you modify the network address of the SM200C and need to update the address specified in the sm_open_networked_device() function?
Sometimes we see the “ANY” address not work. You might consider changing the “ANY” 0.0.0.0 address parameter to your hardcoded NIC address.
I’m assuming Spike is not running at the same time?
Do you see any LED activity when the sm_open_networked_device() function is called?
I look forward to your response.
jferParticipantHi Andrew,
I have updated the addresses in the sm_open_networked_device() call. So currently I am trying to run:
handle = sm_open_networked_device(“192.168.2.2”, “192.168.2.20”, 56120)[“device”]
and getting “Device not found”. When running this I do not see any change in the LED (it stays green) and I do not see any activity on Wireshark.I can confirm that Spike is not running at the same time while running these commands. I will note that when running Spike the LED tends to flash between green and red about every half a second. Is this expected?
Thanks
jferParticipantJust a quick update on this, I was just able to get the sm_example_open_networked_device C++ example to work with my network configuration, so it’s only the Python API I am currently having trouble with
RogerModeratorHi jfer,
The first two arguments passed to sm_open_networked_device() must be byte strings, defined in Python by prefixing a string literal with “b”. So the function you quoted above would be written as:
sm_open_networked_device(b“192.168.2.2”, b“192.168.2.20”, 56120)
Let me know if this does not fix it.
- This reply was modified 2 weeks, 6 days ago by
- AuthorPosts
You must be logged in to reply to this topic.