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

Communicate with SM200C through API

Forums › SM Series Discussions › Communicate with SM200C through API

  • This topic has 4 replies, 3 voices, and was last updated 1 year ago by RogerRoger.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #248345
    jfer
    Participant

    Hello,

    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!

    #248346
    AndrewAndrew
    Moderator

    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.

    • This reply was modified 1 year ago by AndrewAndrew.
    #248350
    jfer
    Participant

    Hi 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

    #248353
    jfer
    Participant

    Just 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

    #248361
    RogerRoger
    Moderator

    Hi 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.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.