Home AMX User Forum AMX Technical Discussion

Magewell Pro Convert for NDI to HDMI 64100 Control

Has anyone had any experience controlling this or other Magewell converters using their port 80 http protocol?

https://magewell.com/api-docs/pro-convert-decoder-api/

No matter what I send this thing from an open TCP port on Port 80 from the AMX processor, I get nothing back. And when I set up Putty or other terminal programs, I only ever get "Bad Request" as a response.

Any help would be appreciated.

Thank you.

Comments

  • "Bad request" indicates that the format of the http command is not correct.
    By the API, I would say it must be sent like (for set hdmi input)

        SEND_STRING DATA.DEVICE,"'GET /ip/mwapi?method=set-hdmi-output&enabled=false HTTP/1.1',13,10"
        SEND_STRING DATA.DEVICE,"'Host: 192.168.0.2',13,10" // the IP of the unit
        SEND_STRING DATA.DEVICE,"13,10" // empty cr/lf ends the http header
    

    By API, the data returned is JSON formatted. This is a good 3rd party axi for parsing JSON data.
    https://github.com/sentry07/netlinx-libJSON
    It's not mine, so use "as it is"

  • feddxfeddx Posts: 183

    @Marc Scheibein said:
    "Bad request" indicates that the format of the http command is not correct.
    By the API, I would say it must be sent like (for set hdmi input)

      SEND_STRING DATA.DEVICE,"'GET /ip/mwapi?method=set-hdmi-output&enabled=false HTTP/1.1',13,10"
      SEND_STRING DATA.DEVICE,"'Host: 192.168.0.2',13,10" // the IP of the unit
      SEND_STRING DATA.DEVICE,"13,10" // empty cr/lf ends the http header
    

    By API, the data returned is JSON formatted. This is a good 3rd party axi for parsing JSON data.
    https://github.com/sentry07/netlinx-libJSON
    It's not mine, so use "as it is"

    Thank you for the response.

    I am using the same general format. As for responses in the AMX code, I really don't care. All I need to do is switch which NDI input is going out of the HDMI port, and I think "set-channel" is the command I need.

    In the Online of the Data_Event I have:

    Wait 10
    {
    Send_String CAMSw01,"'GET http://10.10.1.41/mwapi?method=login&id=Admin&pass=5323c33996d5d8dd6ea2466d61238e6a HTTP/1.1',CR,LF"
    send_string CAMSw01,"'Host:10.10.1.41',CR,LF"
    send_string CAMSw01,"CR,LF"
    }

    And then to switch I am using:

    send_string CAMSw01,"'http://10.10.1.41/mwapi?method=set-channel&ndi-name=true&name=source1name HTTP/1.1',CR,LF"
    send_string CAMSw01,"'Host:10.10.1.41',CR,LF"
    send_string CAMSw01,"CR,LF"

    the device drops offline relatively easily it seems. So I might need to open the socket, send the command and then close the socket.

    Magewell seemed to indicate that I might need to send the login info EVERY time I send a command so there's that too. I am waiting on a response from them and I am doing testing on site with a guy remotely.

    Next time just buy a video switch. Really.

  • Not sure if the must be a at the host, 'Host: 10.10.1.41'

    HTTP in general works in the way to close the connect directly after the instruction is done.
    You may try to tell the server to hold the connect open for longer, by adding the line "'Connection: Keep-Alive',13,10"

  • @Marc Scheibein said:
    Not sure if the must be a at the host, 'Host: 10.10.1.41'

    HTTP in general works in the way to close the connect directly after the instruction is done.
    You may try to tell the server to hold the connect open for longer, by adding the line "'Connection: Keep-Alive',13,10"

    meant that there might be a SPACE in that host line between colon and address :)

  • feddxfeddx Posts: 183

    @Marc Scheibein said:

    @Marc Scheibein said:
    Not sure if the must be a at the host, 'Host: 10.10.1.41'

    HTTP in general works in the way to close the connect directly after the instruction is done.
    You may try to tell the server to hold the connect open for longer, by adding the line "'Connection: Keep-Alive',13,10"

    meant that there might be a SPACE in that host line between colon and address :)

    Thanks Marc. Still looking into this. I will let the forum know how it is resolved onsite.

Sign In or Register to comment.