Thanks Greg,
We got pretty far with that - and with a little help from WireShark, reading what your program actually sends over to the EBC.
We managed to put the same bitstream that your program sends into a Java DatagramSocket and send it over to the EBC's IP Address and port and get a response that contains the hex values of the switch statuses, when you convert the hex values to Binary, on the 13th, 14th, 17th and 18th packets (bytes) that come back in the response from the EBC to my PC.
So for a little application, we are basically set. It's just a matter of converting those bytes in those locations in the return message from hex to binary, reversing the sequence (because they go from switches 7 to 0, and we need them in 0 to 7 sequence) and then using them.
But here is my next question that hopefully you can assist me on.
I only bought two 16 input modules. What if someone a few years down the road gets a 32 input module, or even an 64 input module? What then happens to the positions of these bytes on the response? Do they expand and take more bytes and shove all the others down in sequence?
Also, I noticed that for each set of eight switches, there is a byte that gets returned; and that each slot that contains inputs seems to have four bytes returned. Because when I remove the second 16 input module, I get four less bytes returned than if I have the second 16 input module in there. I assume that if I added another 16 input module to my 4 slot base, I would get another four bytes, with the two middle bytes in that set of four being the first and second set of eight bits, each containing a status of one of the rooms, just like I get now with the first two input modules.
We do have your Ethernet Interface Specification Version 3.0 of 23 Feb 07. That was helpful, but it does not seem to answer the above questions.
Thank you for your help on this.
- Bret B