Home AMX User Forum AMX Technical Discussion

Intercept Java Module Strings

Hi,

I am using an Extron Crosspoint switcher that sends RS232 over XTP (cat cable) to Extron receivers that then pass the RS232 commands to a device. From reading the documentation and talking with tech support. It seems that you have to create a telnet session to the Crosspoint on a specific Port (the Port corresponds to the Output Port that the RS232 command will get sent on), then everything that you enter in the telnet session will be passed as an RS232 command.

So what I'm trying to do is use Java Modules to handle creating the strings for the commands, but I'm trying to figure out how I can PULSE a Channel on the Java Virtual Device, and instead of having it send the string to a physical device. I will Intercept that string, and create a telnet session to the Crosspoint and then send the string to it, and hopefully whatever I receive from the telnet session, I would want to pass back to the Java Module to process and activate appropriate channels for feedback.

Does anyone know how to accomplish this? or maybe a better way of doing it?

Thanks,

Javed

Comments

  • JasonSJasonS Posts: 229
    Pass the Duet Module a Virtual Device instead of the Physical RS232 device. This virtual device could be part of a module that manages the IP connection. Be careful doing this because it essentially doubles the amount of messages that are presented to the internal message queues. You can basically make a serial to IP converter module, the duet module does not care (at least it shouldn't, I don't know, I never use them) whether it gets an actual RS232 device or a virtual device.
  • JasonS wrote: »
    Pass the Duet Module a Virtual Device instead of the Physical RS232 device. This virtual device could be part of a module that manages the IP connection. Be careful doing this because it essentially doubles the amount of messages that are presented to the internal message queues. You can basically make a serial to IP converter module, the duet module does not care (at least it shouldn't, I don't know, I never use them) whether it gets an actual RS232 device or a virtual device.

    My understanding on passing rs232 on XTP crosspoint is to configure first the port on the switcher and assigned that port to its corresponding output, its like you are passing through a DTP Transmitter to DTP receiver, If TS says that you have to build a telnet session, the easiest way it to use IP_Client communication.
  • JasonS wrote: »
    Pass the Duet Module a Virtual Device instead of the Physical RS232 device. This virtual device could be part of a module that manages the IP connection. Be careful doing this because it essentially doubles the amount of messages that are presented to the internal message queues. You can basically make a serial to IP converter module, the duet module does not care (at least it shouldn't, I don't know, I never use them) whether it gets an actual RS232 device or a virtual device.

    I tried this, I had created 2 devices

    vdvDisplay 41001:1:0 // this is the java virtual device
    vdvDisplayCatcher 33001:1:0 // this is to replace thy physical device

    Then I did this

    DEFINE_MODULE 'Some_Module_Name' comm(vdvDisplay, vdvDisplayCatcher)

    and

    DATA_EVENT [vdvDisplayCatcher]
    {
    STRING:
    {
    SEND_STRING 0,"DATA.TEXT"
    }
    COMMAND:
    {
    SEND_STRING 0,"DATA.TEXT"
    }
    }

    I thought this would catch the strings coming out of the Java module that were supposed to go to the physical device, but this never fired.

    When I watched the Notification window, I would see it report that String To: 33001:1:0 [Some string] and String From: 33001:1:0 [Some string], but it would never print to the diagnostics window

    I even tried adding PASSBACK-1 on the Java module, but still didn't get those data events to fire.

    Am I doing something wrong here?

    Thanks for the input,

    Javed
  • JasonSJasonS Posts: 229
    I don't use notification very much but I am pretty sure system 0 does not work, you have to specify 33001:1:1, if the NetLinx is system 1. Also, I would telnet into the master to see if the Duet module is throwing any errors, it may be expecting a physical device and be unhappy with a virtual. I do IP converter redirection like this with my modules fairly often, but haven't tried it with a Duet module.
  • you can try making a function:

    define_function sendXTPCPString (char swString[100])
    {
    if (!SwitchOnline)
    {
    ip_client_open (dvXTPSwitch, 'device ip address', 23, ip_tcp)
    wait_until (SwitchOnline)
    {
    send_string dvXTPSwitch_1, swString
    }
    }
    else if (SwitchOnline)
    {
    send_string dvXTPSwitch, swString
    }
    }
  • JasonSJasonS Posts: 229
    I believe that Javed is trying to use a Duet module to control a device thru an XTP serial port, over IP.
  • JasonS wrote: »
    I don't use notification very much but I am pretty sure system 0 does not work, you have to specify 33001:1:1, if the NetLinx is system 1. Also, I would telnet into the master to see if the Duet module is throwing any errors, it may be expecting a physical device and be unhappy with a virtual. I do IP converter redirection like this with my modules fairly often, but haven't tried it with a Duet module.

    I tried changing it to 33001:1:1, but it still didn't work. I am probably just going use direct IP connections to the devices and keep them open. Since I can't get this to work.

    Thanks for everyone for the input.

    Javed
Sign In or Register to comment.