You are not logged in.

#1 2016-06-11 07:24:44

backXslash
Member
Registered: 2016-03-25
Posts: 151

Projector Control - Please Help

The manual for my projector specifies the RS-232 commands I'd need to communicate with it. It's got on, off, lamp hours, a whole host of things really.

I cant make heads or tails out of it. Nothing I try works. Can anyone PLEASE help me?

The manual is here - http://www.projector-manual.com/manuals … k_D558.pdf

The serial stuff is the very last entry.

As for my set up, the RPi is hooked to the projector through a USB to RS-232 adapter. It's got a Prolific chip in it I believe, and NanoDLP recognizes it, and is set up to address it as /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0

If there's any other useful info I can provide I will. Anyone that can help me get this working would be my hero.

Offline

#2 2016-06-11 09:26:40

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,546

Re: Projector Control - Please Help

Have you tried putting V99S0001 inside projector on command box?

Offline

#3 2016-06-11 11:07:06

backXslash
Member
Registered: 2016-03-25
Posts: 151

Re: Projector Control - Please Help

Yes. No response.

I'd thought that perhaps there was a character delay that I wasn't meeting? Or some formatting issue I missed?

It's driving me NUTS.

Offline

#4 2016-06-11 12:46:52

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,546

Re: Projector Control - Please Help

No I doubt it is a formatting issue. Maybe it is character delay requirement. Let me know if you can test custom version. I can put something together to test character delay issue.

Offline

#5 2016-06-11 13:36:45

backXslash
Member
Registered: 2016-03-25
Posts: 151

Re: Projector Control - Please Help

Shahin wrote:

No I doubt it is a formatting issue. Maybe it is character delay requirement. Let me know if you can test custom version. I can put something together to test character delay issue.

Yeah, I can totally test anything you've got! If it helps, I've got my printer available through SSH and the NanoDLP web interface through a dynamic DNS. If you would like, I can PM you credentials if you'd like to look at / mess with anything.

Offline

#6 2016-06-11 15:42:30

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,546

Re: Projector Control - Please Help

Try this version. I have hard-coded delays.
http://www.nanodlp.com/nanodlp.debug.tar.gz

Offline

#7 2016-06-12 13:45:57

backXslash
Member
Registered: 2016-03-25
Posts: 151

Re: Projector Control - Please Help

Ok, I figured it out.

I can't get it working on NanoDLP, but I can with my laptop. Basically, the issue is that my projector appears to require a carriage return at the end of the ASCII sequence in order to actually "execute" the command.

Is the "binary" mode actually hex? Or do I have to set up execution commands to echo the correct hex values into the serial port?

Offline

#8 2016-06-12 16:52:17

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,546

Re: Projector Control - Please Help

In ascii mode nanodlp puts both \r\n at the end of each command so I doubt it is the issue. Binary mode is hex.

Offline

#9 2016-06-12 17:38:45

backXslash
Member
Registered: 2016-03-25
Posts: 151

Re: Projector Control - Please Help

Shahin wrote:

In ascii mode nanodlp puts both \r\n at the end of each command so I doubt it is the issue. Binary mode is hex.

The projector will only respond to \r, not \n. The correct command in hex is 56 30 35 53 30 30 30 31 0D. In fact, it won't even respond to V99S0001 with a new line at the end. The string has to be sent, THEN the carriage return.

Offline

#10 2016-06-12 18:44:43

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,546

Re: Projector Control - Please Help

Have tried hex mode, yet?

Offline

#11 2016-06-12 22:01:02

backXslash
Member
Registered: 2016-03-25
Posts: 151

Re: Projector Control - Please Help

Shahin wrote:

Have tried hex mode, yet?

I will shortly. My printer is top down and haven't set up my shutter yet.I've been at a show all weekend. I left it set up to start a print, so if I do anything other than print, I'm worried that I'll burn in the top layer of resin with the Vivitek logo, or the RPi boot scroll.

Offline

#12 2016-06-13 02:45:26

backXslash
Member
Registered: 2016-03-25
Posts: 151

Re: Projector Control - Please Help

Shahin wrote:

Have tried hex mode, yet?

Ok, I tried hex mode. Doesn't seem to work.

I installed minicom on the 'Pi and in minicom the projector responds exactly as it's supposed to. Basically, I type V99S0001 and press enter and the projector responds 'P' (for pass) and then turns on. When it's on, I can type V99S0002 and press enter and it turns off. At any point, I can type V99G0004 and press enter and the projector responds with the lamp hours and the P for pass. Below is a copy and paste of a quick little session I just ran for demo.


V99G0004
P
V99S0001
P
V99G0007
P2
V99S0002
P
V99G0007
P3
V99G0007

V99G0004
F
V99G0004
F
V99G0007
P1
V99S0001
P
V99G0004
P163

Offline

#13 2016-06-13 04:15:42

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,546

Re: Projector Control - Please Help

Could you check nanodlp (generic version) messages with minicom + socat and let me know what is the difference cause the issue with viviteks?

Offline

#14 2016-06-13 11:40:35

backXslash
Member
Registered: 2016-03-25
Posts: 151

Re: Projector Control - Please Help

Shahin wrote:

Could you check nanodlp (generic version) messages with minicom + socat and let me know what is the difference cause the issue with viviteks?

Sure! Ummm.... How do I do that?

Offline

#15 2016-06-13 11:56:08

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,546

Re: Projector Control - Please Help

Run command below.

socat -d -d pty,raw,echo=0 pty,raw,echo=0

It will open two path, enter one into minicom and other one into nanodlp.

Offline

#16 2016-06-13 15:17:54

backXslash
Member
Registered: 2016-03-25
Posts: 151

Re: Projector Control - Please Help

Shahin wrote:

Run command below.

socat -d -d pty,raw,echo=0 pty,raw,echo=0

It will open two path, enter one into minicom and other one into nanodlp.

That's the full command? I'm sorry, I confess, I'm not familliar with socat.

Offline

#17 2016-06-13 15:28:26

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,546

Re: Projector Control - Please Help

Yes, run it on rpi.

➜  ~ socat -d -d pty,raw,echo=0 pty,raw,echo=0
2016/06/13 19:54:37 socat[2574] N PTY is /dev/pts/21
2016/06/13 19:54:37 socat[2574] N PTY is /dev/pts/22
2016/06/13 19:54:37 socat[2574] N starting data transfer loop with FDs [5,5] and [7,7]

It will open two pipe like above /dev/pts/21 and /dev/pts/22. Enter one of them as the projector address on nanodlp and on minicom enter the other one. You could monitor exact commands going out of nanodlp.

Offline

#18 2016-06-14 14:51:00

backXslash
Member
Registered: 2016-03-25
Posts: 151

Re: Projector Control - Please Help

Shahin wrote:

Yes, run it on rpi.

➜  ~ socat -d -d pty,raw,echo=0 pty,raw,echo=0
2016/06/13 19:54:37 socat[2574] N PTY is /dev/pts/21
2016/06/13 19:54:37 socat[2574] N PTY is /dev/pts/22
2016/06/13 19:54:37 socat[2574] N starting data transfer loop with FDs [5,5] and [7,7]

It will open two pipe like above /dev/pts/21 and /dev/pts/22. Enter one of them as the projector address on nanodlp and on minicom enter the other one. You could monitor exact commands going out of nanodlp.

Got it. I'm trying to find time to sit and mess with it.

Is there a way to simply view the data stream between the two? As in fork the data from nanodlp so I can see it, but also have it still go to the projector's serial port?

Offline

#19 2016-06-14 16:26:21

backXslash
Member
Registered: 2016-03-25
Posts: 151

Re: Projector Control - Please Help

backXslash wrote:

Is there a way to simply view the data stream between the two? As in fork the data from nanodlp so I can see it, but also have it still go to the projector's serial port?

I'm having some trouble crafting the socat command I need. Basically, I'm thinking I should be able to create /dev/pts/1 and /dev/pts/2, point NanoDLP at the first one, connect Minicom to the second one. Also, I'd like to open the second one as a pipe, and echo everything that appears there to /dev/Projector, that way I can watch the entire data stream from NanoDLP to the projector, and see what's actually happening, as well as injecting commands to see the difference.

socat -d -d pty,raw,echo=0 pty,raw,echo=0

is the first command

I had thought

socat -d -d PIPE:/dev/pts/6 OPEN:/dev/usb.Projector

would work for the second, but it doesn't appear to echo or pipe anything to the correct port.

Ideas? Or would it be easier to somehow use the tee command?

Offline

#20 2016-06-14 19:37:49

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,546

Re: Projector Control - Please Help

I am not sure if it is possible to copy output to the third port. Try tee.

Have you seen anything strange going on between minicom and nanodlp yet?

Offline

#21 2016-06-14 23:36:29

backXslash
Member
Registered: 2016-03-25
Posts: 151

Re: Projector Control - Please Help

Shahin wrote:

I am not sure if it is possible to copy output to the third port. Try tee.

Have you seen anything strange going on between minicom and nanodlp yet?

I actually got it working! NanoDLP wasn't appending the carriage return, which was good! I added \r to the end of the command, in ASCII, selected "binary mode" for the communication mode, and let 'er rip just to see what'd happen.

Works perfect!

Offline

#22 2016-06-15 04:38:29

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,546

Re: Projector Control - Please Help

Pretty sure we add \r\n at the end of each command in ascii mode. Could you add \n to the end after \r and see if it is still working?

Offline

#23 2016-06-15 19:55:19

backXslash
Member
Registered: 2016-03-25
Posts: 151

Re: Projector Control - Please Help

Shahin wrote:

Pretty sure we add \r\n at the end of each command in ascii mode. Could you add \n to the end after \r and see if it is still working?


I did that actually, and the projector throws an error. It specifically wants JUST \r. The way that binary mode works is PERFECT, so far as I'm concerned, I wouldn't change it.

Offline

#24 2016-06-16 04:56:21

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,546

Re: Projector Control - Please Help

Ok, thanks I will add different line termination options to ascii mode to cover this case scenario.

Offline

#25 2016-06-16 10:00:37

color
Member
From: Bulgaria
Registered: 2016-03-19
Posts: 84

Re: Projector Control - Please Help

Ok, can you tell me what exact command to use to control my Infocus IN8606HD?

According manual these codes are for power ON and OFF
   
PWR0   Turn Off
PWR1   Turn On

Offline

Board footer

Powered by FluxBB