Home AMX User Forum AMXForums Archive Threads AMX Hardware MAX by AMX

Do not connect with MAX

It is not possible to establish connection with MAX.

dvMax = 0:5:0 // real MAX device
vdvMAX = 41001:1:0 // virtual MAX device (main unit / recorder)
vdvAVM1 = 41001:2:0 // AVM 1 or Player 1 or Room 1


DEFINE_START // Place define_module calls to the very end of the define_start section.

DEFINE_MODULE 'AMX_MAX_Comm_dr1_0_0' duet_code(vdvMAX,dvMAX)

SEND_COMMAND vdvMAX, "' PROPERTY-IP_ADDRESS, 192.168.0.30 '"
SEND_COMMAND vdvMAX, "' REINIT '"

How it is set real MAX Device? Why 0:5:0???

Comments

  • ericmedleyericmedley Posts: 4,177
    BeatlJS wrote: »
    It is not possible to establish connection with MAX.

    dvMax = 0:5:0 // real MAX device
    vdvMAX = 41001:1:0 // virtual MAX device (main unit / recorder)
    vdvAVM1 = 41001:2:0 // AVM 1 or Player 1 or Room 1


    DEFINE_START // Place define_module calls to the very end of the define_start section.

    DEFINE_MODULE 'AMX_MAX_Comm_dr1_0_0' duet_code(vdvMAX,dvMAX)

    SEND_COMMAND vdvMAX, "' PROPERTY-IP_ADDRESS, 192.168.0.30 '"
    SEND_COMMAND vdvMAX, "' REINIT '"

    How it is set real MAX Device? Why 0:5:0???


    Well, first make sure that your MAX's IP address matches the one in your code. The MAX will have to be configured with the proper settings for the network it's connected to. You can make sure the AMX Master can see the MAX by pinging it from the Netlinx master in a telnet session.

    Concerning your question about 0:5:0: That device : port : system comination is indicating that you wish to use one of the Netlinx master's IP ports for communication. The comm module uses the port you specify to talk to the MAX. You should make sure that no other part of your program is trying to use port 5.

    one more thing. Although it probably doesn't matter in this case, it's a good idea to put device setup commands
    SEND_COMMAND vdvMAX, "' PROPERTY-IP_ADDRESS, 192.168.0.30 '"
    SEND_COMMAND vdvMAX, "' REINIT '"
    in a data_event[] - Online: instead of at startup. There's no guaranty that the device will be online at startup to recieve the command in the first place. If it were me, I'd do this:
    data_event[vdvMAX]
    {
    online:
      {
      SEND_COMMAND vdvMAX, "' PROPERTY-IP_ADDRESS, 192.168.0.30 '"
      SEND_COMMAND vdvMAX, "' REINIT '"
      }
    }
    

    hope that helps
    e
  • BeatlJSBeatlJS Posts: 5
    IP MAX address is really 192.168.0.30.

    WinMax connect to MAX, load films and music on it.

    From the command shell on MAX ping is passed to 192.168.0.30
    (64 bytes from 192.168.0.100: icmp_seq=75 ttl=64 time=0.240 ms)

    From telnet (Netlinx NI-4100)

    >show tcp
    Show TCP List
    The following TCP connections exist(ed):
    1: IP=192.168.0.30:1319 Socket=0 (Dead) Last[MsgsInQ=0]

    ping 192.168.0.30
    192.168.0.30 is alive


    At first has tried this example:

    http://www.amx.com/techcenter/downloadConfirm.asp? fn =/assets/deviceModules/AMX_MAX_v1_0_8_dr1_0_0.zip

    Now I try to write the program on this sample, but does not connect with MAX too

    PROGRAM_NAME='Contol_MAX_AVP'

    DEFINE_DEVICE

    DvTP= 10001:1:0 // MVP-5200i
    dvMAX = 0:5:0 // Real MAX device
    vdvMAX = 41001:1:0 // The virtual MAX device
    vdvAVM1 = 41001:2:0 // AVM 1 connected to the MAX

    DEFINE_CONSTANT

    DEFINE_TYPE
    DEFINE_VARIABLE
    DEFINE_LATCHING
    DEFINE_MUTUALLY_EXCLUSIVE

    DEFINE_START
    DEFINE_MODULE 'AMX_MAX_Comm_dr1_0_0' duet_code(vdvMAX,dvMAX)

    DEFINE_EVENT

    BUTTON_EVENT [DvTP,5]
    {
    PUSH:
    {
    // Connect to the MAX server...
    send_command vdvMAX,'PROPERTY-IP_Address,192.168.0.30' // ... set the IP to be used
    send_command vdvMAX,'REINIT' // reinitialize. This will connect you to the server....

    ON [vdvAVM1,27] // Set Power On MAX-AVP_1
    ON [vdvAVM1,255] // Power on – allow sufficient time for this command to complete. REINIT when complete.
    ON [vdvAVM1,301] // Disc Tray Open – feedback only
    ON [vdvMAX,301] // Disc Tray Open MAX-HT
    ON [dvMAX,301] // Disc Tray Open MAX-HT
    }
    }
    DEFINE_PROGRAM

  • ericmedleyericmedley Posts: 4,177
    ON [vdvAVM1,27] // Set Power On MAX-AVP_1 
    ON [vdvAVM1,255] // Power on – allow sufficient time for this command to complete. REINIT when complete.
    ON [vdvAVM1,301] // Disc Tray Open – feedback only 
    ON [vdvMAX,301] // Disc Tray Open MAX-HT
    ON [dvMAX,301] // Disc Tray Open MAX-HT
    

    I don't know off the top of my head how the module ques commands. But the command REINIT
    will disconnect the connection. Howver, you then immediately try to send it commands by changing the channel states. So, it seems to me that you're trying to send commands to a connection you've closed. The REINIT will take some time to re-establish connection to the MAX.

    Here again, from memory, I think there's a channel state that indicates the status of the module itself and then a channel state for the status of the connection from the program to the MAX server.

    Rather than testing the connection by trying to do stuff, just REINIT and then look for that channel state to go on.
  • mpullinmpullin Posts: 949
    When I first saw this I thought the thread title was a suggestion.
  • BeatlJSBeatlJS Posts: 5
    The problem of connection and is not solved !
  • DHawthorneDHawthorne Posts: 4,584
    I've only done one MAX system, but it was a big one, and at one time I thought I had run against all the possible problems it could throw. But my memory is a big vague, so bear with me.

    Is it truly not connecting, or are you just not getting responses on the touch panel?

    There is a series of buttons that must be pressed in order for the panels to show any responses in the stock module. Again, from the stock module, they are the channels defined at TP_BUTTONS[14], and TP_BUTTONS[271 + ZONE]. These are what sync the panel feedback to the zone you are using. If you don't do this in some form, it will never show anything. So, it may look like it's not connected, but really is and not showing anything.

    If it is truly not connecting, make sure you are on the right NIC. The MAX has two - one for the media network, and another strictly for control, and the two do not bridge in any way inside the MAX server. If your NetLinx is plugged into the media NIC, it can't connect to the control network at all.
  • mpullin wrote: »
    When I first saw this I thought the thread title was a suggestion.

    LOL

    I would try with the Netlinx version of the module not the duet version. I don't know if they ever fixed the duet module but tech support and sales kept recommending the Netlinx version. In the Netlinx module you would define the _comm module with the IP address as a string like so:
    DEFINE_MODULE 'AMX_MAX4Plus_Comm' AMX_MAX_Comm1 (vdvMEDIAPLAY, dvMEDIAPORT, strIP_ADDRESS)

    Where
    vdvMediaPlay is the virtual device for the Max
    dvMediaPort is the IP Port defined for the Max (0:5:0 in your example)
    and strIP_Address[12] is defined as "'192.168.0.30'"



    -John
  • BeatlJSBeatlJS Posts: 5
    Thanks all for answers, problem of connection with MAX it is solved.
Sign In or Register to comment.