Home AMX User Forum AMX General Discussion

Dedicated Micros DS2 IP programming

I have only begun messing around with IP control, some of it is pretty simple but I am having some issues with the IP control of the DS2. The 232 protocol manual has the following command to select which camera to view for example:

http://<IP Address>/mci.cgi?command=M\SEL_CHAN\<channel number>

If you type that into a browser and hit go the video output of the DS2 switches to whatever camera # you enter. I have tried different variations of the following:


BUTTON_EVENT[dvTP2H,nCAMERA_SELECT]{
PUSH:{
IP_CLIENT_OPEN(dvCAMERA.PORT,cCAM_IP,80,1)
WAIT 2 SEND_STRING dvCAMERA,"'http://192.168.1.175/mci.cgi?command=M\SEL_CHAN\',ITOA(GET_LAST(nCAMERA_SELECT))&quot;
}
}

Where might I, or am I going wrong here? .. anyone?..

Comments

  • alexanboalexanbo Posts: 282
    The string you send out the ip socket should probably be something like:

    "'GET /mci.cgi?command=M\SEL_CHAN\',ITOA(GET_LAST(nCAMERA _SELECT))',13,10,13,10"

    Or it might be a POST.. I'm a little fuzzy on that.
  • alexanbo wrote:
    The string you send out the ip socket should probably be something like:

    "'GET /mci.cgi?command=M\SEL_CHAN\',ITOA(GET_LAST(nCAMERA _SELECT))',13,10,13,10"

    Or it might be a POST.. I'm a little fuzzy on that.

    That may be still not enough HTTP overhead :)
    "'GET /mci.cgi?command=M\SEL_CHAN\',ITOA(GET_LAST(nCAMERA _SELECT))',13,10,13,10,'HOST: <Netlinx IP>',13,10,13,10"
    
    Or another real working line:
    SEND_STRING dvIP_CLIENT,"'GET /cgi-bin/dial?rc=@&A=D1&rd=status http/1.1',13,10,13,10,'HOST: 192.168.0.254',13,10,13,10"
    

    The WAIT 2 after the IP_CLIENT_OPEN() also may be too short. Better is to wait until IP connect is established and then send (IP_CLIENT_OPEN() just tries to get the connect)
    The following is a very simple way to do that:
    DEFINE_VARIABLE
    VOLATILE INTEGER nIpOnline
    
    DEFINE_EVENT
    DATA_EVENT[dvIpDevice]
    {
    ONLINE: { nIpOnline = 1 } // IP connect established
    OFFLINE: { nIpOnline = 0 } // IP Connect lost (for any reason)
    }
    
    DEFINE_PROGRAM
    PUSH[Panel,1]
    {
    IF(!(nIpOnline)) { IP_CLIENT_OPEN() }
    WAIT_UNTIL(nIpOnline)
    {
    SEND_STRING dvIpDevice,....
    }
    }
    
  • Subset Commands

    Hi,

    I was just wondering if you were working with a New DS2 - they have a black section in the front panel. I have been working on one of these recently.

    The 'new' DS2 appears to use a subset of the commands - there is no control over 'events' for example. I had to use IR control in addition, which was not very satisfactory.

    If you have a better solution, I would be grateful if you could share it.

    Cheers

    Henry
  • Spire_JeffSpire_Jeff Posts: 1,917
    Well, here is what I have found so far. The new units DO NOT support event control over the serial port. They got rid of the command for whatever reason, but I think there is an IP version of the command. (Might want to use a network sniffer to sniff commands being tossed by the web interface ;) )

    Dedicated Micros has expressed that it cannot handle supporting individual dealers in the use and development of external interfaces. They have tried to get AMX and C to work with them, but have not gotten very far. They indicated that they would prefer to support AMX and have AMX support us, but that doesn't sound like something I would be overly interested in if I were in AMX's shoes. Anyway, I will continue to work on it.

    To this point, I have been able to display the cameras on the MVP-8400 using the MJPEG display. Use the DVR's IP address for HOST, leave PATH blank and use: display_pic.cgi?cam=1&res=hi&control=PLAY for the file. Change cam=x to the appropriate cam number. I am still working on the formatting of the image, but I think I need to change the recording format to 640x480 instead of 640x240.

    Hope this helps,
    Jeff
  • SamkAMXSamkAMX Posts: 29
    dedicated micros

    I have had no luck with ip control - has anyone?


    which port is for control - ive tried 23 and 80?

    is a login required for ip connection to the dvr?

    is there anything in setup of dvr menu to enable or configure?

    any help is greatly appreciated!
  • HWeldonHWeldon Posts: 6
    DS2 over IP

    I did some work with the DS2 DVR a couple of years ago. I had to use a combination of IP and IR to get it running as I never got round to sniffing out a complete set of commands (I think this should be possible as DM use an IP based solution for a remote keyboard). I had to use IR for the event log commands as they had been removed from the serial interface at the time - don't know if that is still the case.

    IP port is 23. I believe the default login is User: dm Password: telnet Although this is configurable from the menus. I don't think that there was any other setup required. If you connect on telnet you should see the login lines and be able to handle this pretty easily in your code.

    Hope that helps,

    Henry
  • SamkAMXSamkAMX Posts: 29
    ds2

    Henry,

    I connected via telnet but port 23 were for setup commands, i just want to be able to control the cameras.
    Seems simple enough but i've never spent so much time on 232/ ir control just to move a camera.
    This is my second project with them and still no luck.

    tech support is no help at all
  • shr00m-dewshr00m-dew Posts: 394
    What camera? If it's connected via RS485/422, I usually just run AMX in addition to the DVR, having both control them.

    Kevin D.
  • HWeldonHWeldon Posts: 6
    DS2

    These are the instructions that I followed for IP control over port 23. I only used IR for event control as this was not supported for the new DS2.

    I am assuming it is a DS2 you are using.

    Regards,

    Henry
  • SamkAMXSamkAMX Posts: 29
    dedicated micros DS2 (new)

    anybody successful with controlling this via 232 or ip?

    has 4 232 ports on it bit get conflicting reports from tech support on how to configure them.

    I have the command list but no luck with initial connection
  • I am having a very hard time controlling one of the new Hybrid Digital Sprite 2 as well. In the past, I controlled the Sprites via IR, as the remote control had most of the features. Unfortunately, on the new ones, the remote control does not have discrete IR commands for split screens (4, 9, 16 way) anymore. I’ve tried connecting to Serial Port 1, Serial Port 2 and no luck. I am setting up the port using its Web interface and a null modem cable (2-3, 3-2 and 5-5) to connect to it. I’ve even tried using the old AMX Comm module, which has the same protocol to try to control it. Any suggestion or code samples… Thanks!
  • I have not worked on a DM for a while. I think the doc I posted further up has all the details you need to connect? I think there is a serial command for what you are after. I am sure that is the same protocol I use to connect on telnet also.
  • My mistake. The unit I am trying to control is actually a SD Advanced, not a Sprite 2. In the SD Adcvanced model they changed the discrete multiviewing (4 Split, 9 Split, etc) to color based menu driven controls, what makes it not discrete and you have to select a color depending on the split you want. We called DedicatedMicros and it looks like they are having problems with the Sprite 2 protocol commands and this newer units. Very frustrating experience as the serial ports show connection on Hypertherminal, but commands to it don't work. Even the Dedicated Micros tech said that a bounch of commands are not supported on the new unit. By changing the protocol Dedicaded Micros made the newer units not automation friendly and even the IR remote is confusing with no discrete split selections.
Sign In or Register to comment.