Barco Clickshare api ssl/https 🤔

pyromaniakpyromaniak Posts: 7
edited December 2018 in AMX Technical Discussion
Hello guys

I am blocked on a Barco clickshare cse800 !

I only need to change one setting from one to two screen.

There is an api but only ssl (https).

Manual here https://www.barco.com/services/website/en/TdeFiles/Download?FileNumber=R5900056&TdeType=1&Revision=01&ShowDownloadPage=False

Does someone know how to connect to it via https? I looked everywhere and didn't find a hint!!

Thanks a lot in advance!

Best regards

Comments

  • HARMAN_icraigieHARMAN_icraigie Technical Trainer II, Harman Professional University Posts: 454

    TLS_CLIENT_OPEN
    Opens a port for TLS communication with a remote device.

    Syntax:

    integer TLS_CLIENT_OPEN(LocalPort, hostname, port, mode)

    Parameters:

    LocalPort- A user-defined (non-zero) integer value representing the local port on the client machine to use for this conversation. This local port number must be passed to TLS_CLIENT_CLOSE to close the conversation.

    hostname - The host name or IP address of the remote host.

    port - The connecting port on the remote host, usually port 443 for standard HTTPS connections.

    mode - 0: TLS_VALIDATE_CERTIFICATE (perform certificate validation), 1: TLS_IGNORE_CERTIFICATE_ERRORS (connect to the remote site while ignoring certificate errors or mismatches)

    Returns:

    This function returns 0 is all parameters are accepted, or a positive value indicating the offending parameter if there is an error.

    Example:

    TLS_CLIENT_OPEN(5000, '192.168.0.1', 443, 0)

    Note - when using mode = TLS_VALIDATE_CERTIFICATE the server certificate must be imported into the NetLinx masters CA.

  • MLaletasMLaletas Junior Member Posts: 219

    As Ian said use TLS, I use mode of 1 and it works with no problem the port number is 4001 now, and you will need to do basic authentication.

  • Thanks guys!!! Can't wait to test it out! Thanks a lot
  • Sorry for bothering you again but I fail miserably to make it work!

    I can now connect to it with the TLS mode 1.

    But I struggle with the basic authentification and header.

    I never have an answer from the device.

    I tried a GET command with:
    SendCommand ("'GET /v1.0/OnScreenText/Location HTTPS/1.1',13,10")
    SendCommand ("'Authorization: Basic ',fnBase64('integrator:integrator'),13,10,13,10")

    The SendCommand function is just for connecting first and stacking commands:

    DEFINE_FUNCTION SendCommand(CHAR sCmd[]){
    IF(nIpConneted)
    SEND_STRING dvIP, sCmd
    ELSE {
    PushStack(sCmd);
    ConnectIP();
    }
    }

    Can someone help me ? Thanks a lot in advance!

    Best Regards

  • HARMAN_icraigieHARMAN_icraigie Technical Trainer II, Harman Professional University Posts: 454

    See if it works with changing the HTTPS/1.1 to HTTP/1.1 as the HTTP commands are independent from TLS

    https://github.com/hypery2k/owncloud/issues/60

  • Thanks a lot! now I have an Answer! thanks !! :D

  • Hella again :s

    Get works perfectly but I can't set a Parameter. I tried many hours.

    I tried many ways, even the example in the API manual from barco...

    Did someone already made it works ?

    Thanks a loooooot !!

    When i send this request : // this is the output from what I send.
    POST /v1.0/OnScreenText/Location HTTP/1.1
    Authorization: Basic aW50ZWdyYXRvcjppbnRlZ3JhdG9y
    Content-Length: 19
    Content-Type: application/json; charset=utf-8

    { "value": "test" }

    I Get the answer :
    HTTP/1.1 404 Not Found
    X-Powered-By: Express
    Content-Type: application/json; charset=utf-8
    Content-Length: 59
    Date: Tue, 08 Jan 2019 16:49:09 GMT
    Connection: keep-alive

    {
    "status": 404,
    "message": "Resource does not exist"
    }

  • MLaletasMLaletas Junior Member Posts: 219

    first thing is I dont see the host portion of the header (Host: IP_ADDRESS:4001). Add that in and see where that gets you

  • Thanks for the answer.

    I tried but nothing changes.
    And it works with the GET. should be the same as the PUT no ?
    Thanks a lot !

    POST /v1.0/OnScreenText/Location HTTP/1.1
    Authorization: Basic aW50ZWdyYXRvcjppbnRlZ3JhdG9y
    Host: 192.168.2.68:4001
    Content-Length: 17
    Content-Type: application/json; charset=utf-8

    {"value": "test"}

Sign In or Register to comment.