I am currently trying to turn on/off our projectors around our site because of lazy teachers. I am doin this through rj45 ports and telnet. I have a piece of software that can do this but i am trying to create a script to control them. I can do this with epson projectors but am having problems with NEC and SMART projectors.
I know the tcp port for telnet is 4352 and this is the script im using:
wait "PJLINK 1"
send "%1POWR 0\m"
however when i try and connect through telnet it does not work.
i am pasting this code into cmd to iniciate the command:
c:\tst10.exe /r:"C:\turn on.txt" /m
this runs the program tst10.exe which enables tenet to run a script this works fine however i think the "wait "pjlink 1" is the wrong command for the nec projectors as within the program i get this:
[2011.11.15 10:42:45.577] Connected!!!
[2011.11.15 10:42:45.577] RECV:PJLINK 1 8a9b46ba
[2011.11.15 10:42:45.577] SEND:71E0D61EB10C29672B4B388EFCBE0D51%1POWR 0
[2011.11.15 10:42:45.608] RECV:%1POWR=OK
[2011.11.15 10:42:45.608] Closed!!!(Disconnect)
that is the successful power on from the program i am using. Any help would be great :D
Are you able to use a wildcard with the PJLINK 1 statement i.e PJLINK 1 * as there appears to be some checksum sent? or is the 8a9b46ba the same for all projectors?
If so can't you use wait "PJLINK 1 8a9b46ba" ???
i tried that but the checksum changes each time so thats a no go. :(
Anyone else? still having problems with this
Tbh I think you are going to need a replacement to tst10 take a look at Probit Software - Telnet and SSH Scripting - Polyscript, Advanced Telnet and SSH Client to see if it meets your needs a licence is $89
that program isnt exactly user friendly. i cannot edit the scripts at all?
Nice try with that software but it just doesnt do what i need. or if it does then i cannot use it easily. Any other offers? :D
I think its doing authentication. See page 26 and 27 of this http://pjlink.jbmia.or.jp/english/da...cations100.pdf
It looks like you take the random number from the end of the pjlink 1 line, combine it with a password (possibly set in the projectors menu?), and then do an md5sum, which is sent back to the projector with the command. The first random number changes each connection (or should do).
eg: 8a9b46ba + password (8a9b46bapassword) becomes d7c143db41c6057c3d8c8d47b0a36140
I think the projector transmits PJLINK 0 if the authentication is disabled, or no password is set, the commands can then be sent without any code before them, ie: %1POWR 0
It looks like there is a perl module for this, google Net-PJLink
Right - Update, i have managed to stop the check sum on this. It was the pjlink authentication that was the checsum so i have removed the pjlink password from the projector. However i still cannot get this working as i cant seem to get it to see pjlink 0 even though it is there. I just sits there trying to find it and when i telnet onto the device and try to type something in the session closes!
If you telnet in, do you see the 'pjlink 0' before the connection closes? If the projector doesn't send it, then either the settings are wrong, or that projector may not support authentication-less control. Maybe you could try wireshark to see what the projector is doing if the connection closes too quickly.
yes it is showing pjlink 0 before the connection closes.
Are you getting your command in before the 30-second timeout is up? Can you copy and paste a command like "%1POWR 0" in to the terminal and see if that works?
No as soon as i paste or type anything in the connection is lost. I had a look at wireshark and im getting a "Header checksum: 0x0000 [incorrect, should be 0xfe1e (maybe caused by "IP checksum offload"?)]"
Not sure what else to suggest, maybe there's a setting wrong somewhere, or you have a dodgy network cable or something?
Have you tried connecting the projector to the network with a hub and also connecting a PC to the hub running Wireshark to capture what control instructions are sent to the projector by the NEC and Smart control software? Then you can / should be able to write code to resend these instructions...