Hyperdeck commands via TCP does not work

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

svetotehnik

  • Posts: 5
  • Joined: Mon Nov 01, 2021 6:11 am
  • Real Name: Sergey Rodionov

Hyperdeck commands via TCP does not work

PostMon Nov 01, 2021 6:20 am

There is code, that sending "record" command to Hyperdeck, but it doesn't work
If I change IP or PORT it returns exception, from which I conclude that the request is being sent, but not executed. where could the error be?

Code: Select all
Dim clientIP as String = "192.168.11.233"
Dim clientPort as String = "9993"
Dim message as String = "record"

Dim client As New System.Net.Sockets.TcpClient(clientIP, clientPort)
client.SendTimeout = 1000
client.ReceiveTimeout = 1000

' Translate the passed message into ASCII and store it as a Byte array.
Dim data As [Byte]() = System.Text.Encoding.ASCII.GetBytes(message)

' Get a client stream for reading and writing.
Dim stream As System.Net.Sockets.NetworkStream = client.GetStream()

' Send the message to the connected TcpServer.
stream.Write(data, 0, data.Length)

' Receive the TcpServer.response.
' Buffer to store the response bytes.
data = New [Byte](256) {}

If stream.CanRead Then
    Dim myReadBuffer(1024) As Byte
    Dim myCompleteMessage As System.Text.StringBuilder = New System.Text.StringBuilder
    Dim numberOfBytesRead As Integer = 0

    ' Incoming message may be larger than the buffer size.
    Do
        Try
            Threading.Thread.Sleep(100)
            numberOfBytesRead = stream.Read(myReadBuffer, 0, myReadBuffer.Length)
            myCompleteMessage.AppendFormat("{0}", System.Text.Encoding.ASCII.GetString(myReadBuffer, 0, numberOfBytesRead))
        Catch ex As Exception
            stream.Close()
            client.Close()
            Exit Sub
        End Try
    Loop While stream.DataAvailable

    ' Close everything.
    stream.Close()
    client.Close()
    Exit Sub
Else
    Exit Sub
End If
Offline

Ian Morrish

  • Posts: 580
  • Joined: Sun Jan 18, 2015 9:24 pm
  • Location: New Zealand

Re: Hyperdeck commands via TCP does not work

PostThu Nov 04, 2021 5:19 pm

Did you enable "Remote" on the Hyperdeck?
Regards,
Ian Morrish
Video Integrated Scripting Environment
(Windows PowerShell with ATEM driver + more)
https://ianmorrish.wordpress.com
Offline

svetotehnik

  • Posts: 5
  • Joined: Mon Nov 01, 2021 6:11 am
  • Real Name: Sergey Rodionov

Re: Hyperdeck commands via TCP does not work

PostThu Nov 04, 2021 6:51 pm

Yes its enabled, and it works with python script from example, although the same command is sent from both scripts
Offline

Ian Morrish

  • Posts: 580
  • Joined: Sun Jan 18, 2015 9:24 pm
  • Location: New Zealand

Re: Hyperdeck commands via TCP does not work

PostFri Nov 05, 2021 3:04 am

Try
Dim message as String = "record" & ControlChars.CrLf
Regards,
Ian Morrish
Video Integrated Scripting Environment
(Windows PowerShell with ATEM driver + more)
https://ianmorrish.wordpress.com
Offline
User avatar

Xtreemtec

  • Posts: 5391
  • Joined: Wed Jan 02, 2013 11:48 am
  • Location: The Netherlands

Re: Hyperdeck commands via TCP does not work

PostMon Nov 08, 2021 9:59 am

svetotehnik wrote:Yes its enabled, and it works with python script from example, although the same command is sent from both scripts

Keep in mind that the Hyperdeck ONLY connects to 1 device. So if you have the Python script running or did not disconnect correctly... THe hyperdeck still has a tie to Python. ;)
Daniel Wittenaar .:: Xtreemtec Media Productions ::. -= www.xtreemtec.nl =-
4K OBV Trailer, ATEM TVS HD, 4M/E Broadcast Studio 4K, Constelation 8K, Hyperdeck Studio 12G, Ursa Broadcast 4K, 4K fiber converters with Sony Control
Offline

svetotehnik

  • Posts: 5
  • Joined: Mon Nov 01, 2021 6:11 am
  • Real Name: Sergey Rodionov

Re: Hyperdeck commands via TCP does not work

PostTue Nov 09, 2021 11:49 am

Ian Morrish wrote:Try
Dim message as String = "record" & ControlChars.CrLf


it returns exception "Name ControlChars not declared"
Offline

svetotehnik

  • Posts: 5
  • Joined: Mon Nov 01, 2021 6:11 am
  • Real Name: Sergey Rodionov

Re: Hyperdeck commands via TCP does not work

PostTue Nov 09, 2021 11:52 am

Xtreemtec wrote:
svetotehnik wrote:Yes its enabled, and it works with python script from example, although the same command is sent from both scripts

Keep in mind that the Hyperdeck ONLY connects to 1 device. So if you have the Python script running or did not disconnect correctly... THe hyperdeck still has a tie to Python. ;)


started to use python script after understood that vb.net not working, so not think that they are interfering
Offline

svetotehnik

  • Posts: 5
  • Joined: Mon Nov 01, 2021 6:11 am
  • Real Name: Sergey Rodionov

Re: Hyperdeck commands via TCP does not work

PostTue Nov 09, 2021 12:43 pm

Ian Morrish wrote:Try
Dim message as String = "record" & ControlChars.CrLf


dim message as String = "record" & Convert.tochar(13) & Convert.tochar(10) is more suitable for vmix interpretator

Yes, its alive! Thank you, Ian!!!
Offline

carlos_dias

  • Posts: 1
  • Joined: Fri Nov 17, 2023 6:54 pm
  • Real Name: Carlos Eduardo

Re: Hyperdeck commands via TCP does not work

PostFri Nov 17, 2023 6:55 pm

Hi, I'm new here and would like some help.
How about creating an application to remotely choose between 2 transmission inputs, which one will be sent to the output?

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 17 guests