Jump to content

Controlling an Epson projector with Network Resources and need help


Recommended Posts

Posted

I am trying to send command strings to an Epson PJ using TCP via Network Resources.  The strings can be ASCII or hex and I am struggling to figure out the formatting to send/receive either.

For instance ASCII is "ESC/VP.net<DLE><ETX><NUL><NUL><NUL><NUL>"  or HEX "45 53 43 2F 56 50 2E 6E 65 74 10 03 00 00 00 00"

If accepted a colon is the response.

I can communicate fine with Hercules.  What Network Resources "Mode" do I use and how do I specify the ASCII special characters? Or should I use HEX and how do I format that?

I've looked at the WIKI and the links for examples seem dead. Any help would be greatly appreciated or please point me to some reference material.

Posted

Duh, found the answer to my own question as far as hex in the previous post.  Convert to binary.  Can I use ASCII?  Are there any ISY  programming examples for parsing responses and acting on them?  

Posted

So I am still stuck.  Using a terminal program (Hercules) I can send commands in HEX or ASCII to the projector and everything works fine.

Using the ISY I can send the initialization string using decimal characters in binary mode.  I even get the correct response from the projector. Try to send any command, again using decimal characters/binary mode and I get the TCP error.

I've double checked my HEX to decimal conversion but I still cannot get this to go.  The IP is correct, the port is correct and the command example here is ASPECT 30 

41 53 50 45 43 54 20 33 30 0d  hex

65;83;80;69;67;84;32;51;48;13  decimal

Any ideas at all?  I've been obsessed with sorting this out.  I'd like to try ASCII using the C Escaped mode but I don't know the format for unprintable ASCII characters. In particular NUL and CR/LF.

 

image.png.ab0a968a791ee21451417a963abc27d5.png

ISY.docx

Posted

Here's an ASCII table with CR/LF and Null. I'm not sure how to help with the issues your having. But I thought you might give ASCII a go and see if that works any better.

1280px-ASCII-Table-wide_svg.thumb.png.099e88186821d4d1423db1b383f45939.png
 

  • Like 1
Posted

 

11 minutes ago, dbencivengo said:

Thank you.  The immediate question is how to format the unprintable characters (like a CR/LF, ASCII 13) for string in the "Body" field?  

 

try \r or \r\n or \n

  • Like 1
Posted

Thank you.  Unfortunately this did not work when trying to send the ASCII command so I've gone back to trying to work out sending the decimal strings in binary mode.

I am perplexed why I can send hex codes with the Hercules utility and everything works fine.  Converting the initialization string from hex to decimal and using the ISY will work and return the response from the projector. Any subsequent attempt to send a valid command string using the same protocol results in the "TCP client read response failed" message.  What is difference between the terminal utility and the ISY Network Resources that I am missing?

Initialization command:

image.thumb.png.4088c0126ef8c025193c3a26e5766983.png

 

image.png.aec60b3eef73bac89aba1c9988b5622a.png

Command to get the current power status is PWR? <CR> <LF>: 

image.thumb.png.f5275ad6356303156906ea740aab4e26.png

image.png.15a25b23d8b1b4e03c37955ccf8cf65d.png

Posted

It is likely that one of the commands is not terminated or being encoded properly. This can be operating system dependant, so something that works in terminal may be different on a different OS 

The easiest way to find the raw string would be to sniff using Wireshark.  Filter to the IP address of the device then send the command from terminal on the same computer.  Click the packet, usually the first if filtered, others may be response or acknowledgements. On the bottom window scroll to the bottom line. The last line usually contains the raw request.

Posted

The message is irrelevant -- it's simply telling you that the ISY was unable to read a response.  The ISY doesn nothing at all with the response, and as long as the message was sent correctly, the device is unaware that the ISY didn't get a response, or didn't process it.  Network resources are one-way, and it's not exactly clear why the ISY even bothers trying to read a response in the first place.

So, check to see if the device is behaving as you expect - and if it is, then ignore the message.  If it isn't, then you'll need to do some debugging to figure out what the device is getting that's different -- I'd suggest Wireshark on a linux laptop connected to the network switch (not wifi), boot off a LIve USB stick if you prefer not to install Linux.

Posted

I am not particularly network savvy so please bear with me here.

I have WireShark and the Hercules utility on the same PC.  Everything is Ethernet through switches.

Using Wireshark and the filter tcp port 3629 and host 192.168.1.38 (the projector) I can see the commands sent to/from the  Hercules utility and the projector. A command is sent to the PJ, there is a response back, and then another message from Hercules to the PJ

If I tell the ISY to test I don't see anything captured.  Do I need a different filter to see the ISY communications or am I doing something else wrong?

Posted

I believe I have found the problem.  Using WireShark (which is a very cool utility) I can see that the ISY is not sending anything to the desired TCP address.  In the attached WireShark file the ISY is 192.168.1.94, my laptop is 245 and the projector is 38.

When I ask the ISY to "Test" the TCP string shown in the above post at 5:39 there is nothing going from 192.168.1.94 to 192.168.38. Lots of chatter between the ISY and my laptop but nothing to the projector.

At the end I sent the string through the Hercules utility and you see the expected conversation.

So what am I doing wrong?  Why is there nothing being sent by the ISY?

ISY_test.pcapng

Posted

Hi @dbencivengo,

Unless you are routing the ISY connection through the computer running Wireshark will not pick up direct connections between 2 other devices, i.e. you computer is not part of the conversation between the other 2 devices. There are some exceptions to the previous statement, but this is generally how packets are routed.

I only mentioned Wireshark to capture the raw data being sent from the program on your computer to give insight to what is actually being sent by terminal.  The possibly using the capture to to replicate a raw or binary resource.

Posted

Now I am confused.  If I look at my network with Wireshark I see all sorts of stuff that doesn't involve my PC.  The Tivo going somewhere, the Roku,  etc.

I know the terminal is working properly so how do I see what the ISY is sending out to compare it?

 

Posted

What you are most likely seeing is multicast / broadcast traffic from those other devices. If your NIC supports promiscuous mode you could listen to all traffic that way or put one of your switch ports into mirror mode and mirror the port your projector is attached to.

I would also say, you are doing great. Teaching yourself packet capture and how to analyze what you are seeing in Wireshark is way beyond the average persons ability.

Posted

Thank you for the encouragement. So I turned it around and Hercules is now a TCP Server and I have the ISY sending to my PC.  The only thing obvious is that Wireshark labels the command from the ISY as Telnet rather than TCP.  These are screen captures from sending the same three commands from the PC to the PJ and  from the ISY to my PC.  The ISY is much more verbose. I picked one of those command packets as an example ASPECT 30.  Problem is I don't know what I'm looking for.

Terminal to PJ and below that ISY to Terminal

  image.thumb.png.0ffdf6b6f22a793e2f402e7b473c749b.pngimage.thumb.png.ccffc954d170c2dd46d51cdeab666934.png

Posted

Screen shots don't tell much as it's hard to see whats happening. But from the last screen shot I can tell you that the device at 192.168.1.94 is sending a SYN on port 23 to 192.168.1.232. This is basically the start of a conversation between .94 and .232. Then .232 sends it's own SYN acknowledgement. Here's how a basic conversation should look.

The first devices sends a SYN packet to another device requesting that a connection be established between them. If the SYN is received by the second device, an SYN/ACK is sent back to the address requested by the SYN. finally, if the original computer receives the SYN/ACK, a final ACK is sent.

FIN is sent by a device when it wants to terminate the connection; the TCP protocol requires both endpoints send the termination request.
 

Welcome to layer 3!

Posted
8 hours ago, dbencivengo said:

Thank you for the encouragement. So I turned it around and Hercules is now a TCP Server and I have the ISY sending to my PC.  The only thing obvious is that Wireshark labels the command from the ISY as Telnet rather than TCP.  These are screen captures from sending the same three commands from the PC to the PJ and  from the ISY to my PC.  The ISY is much more verbose. I picked one of those command packets as an example ASPECT 30.  Problem is I don't know what I'm looking for.

 

I think you are close, the packets look similar.

As @kzboray mentions If this is your first time using WireShark, you are doing fantastic!   The telnet packet shows an \r following the command "ASPECT 30 \r", so this must be replicated in ISY.  As @mwester mentioned the packets from the ISY are reaching the device but the ISY can not read the response, which is not necessarily an issue unless the command is not functioning.  Finally as Michel mentionions when using binary you will need to encode "\r".  

Have you tried another mode   with "ASPECT 30\r" ,  "ASPECT 30\n" ,  ""ASPECT 30 \r\n", ect.

I did a quick search of the forum for telnet and this came up this which may help.

 

Posted

Joy!

Thank you to everyone that responded to my request for help. To control the PJ an initialization string is sent and shown in the first post and then commands can be sent.  This is exactly how it works using the terminal. 

Using the ISY I would send the initialization in binary mode and I would see the correct Resource Response "ESC/VP.net". Any subsequent command would return the "TCP client read response failed".  But again, it worked properly for the initial string.

Turns out if the command string is appended to the initialization string it works and the Resource Response is correct.

So the ISY does in fact read the response. Here is a screen shot asking for the PJ power status.  The command is PWR? CF LF and the response is PWR=04: which is the standby state.  It's a good day.

image.thumb.png.7f38abf49775864a6e498f1cbd90a22d.png

image.png.a3cbecdb070c4557a1128706fdecf594.png

  • Like 1
Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      37.2k
    • Total Posts
      372.4k
×
×
  • Create New...