DLink PTZ cam not recognizing PTZ clicks

Forum for questions and support relating to the 1.25.x releases only.
UtahJarhead
Posts: 20
Joined: Tue Aug 14, 2012 8:30 pm

Re: DLink PTZ cam not recognizing PTZ clicks

Post by UtahJarhead »

No shame in that. My local big box only had the 5020L. I have a 2,000 sqft house. I don't exactly NEED the wifi extender. ;)
UtahJarhead
Posts: 20
Joined: Tue Aug 14, 2012 8:30 pm

Re: DLink PTZ cam not recognizing PTZ clicks

Post by UtahJarhead »

SOURCE CODE! Time to see if there's anything worthwhile:

http://tsd.dlink.com.tw/downloads2008detailgo.asp
User avatar
dvarapala
Posts: 54
Joined: Sat Nov 06, 2010 2:30 pm

Re: DLink PTZ cam not recognizing PTZ clicks

Post by dvarapala »

UtahJarhead wrote:I've determined through perl debugging that the error is coming from line 139 in zmcontrol.pl. If I look at the contents of $saddr, I get '#002'. I don't really know what I'm doing in perl, so that's where I'm at. ideas?

Code: Select all

137         socket( CLIENT, PF_UNIX, SOCK_STREAM, 0 ) or die( "Can't open socket: $!" );
138         my $attempts = 0;
139         while (!connect( CLIENT, $saddr ))
140         {
141             $attempts++;
142             Fatal( "Can't connect: $!" ) if ($attempts > MAX_CONNECT_DELAY);
143             sleep(1);
144         }
I am having this exact same error with my new DCS-5010L. I've read through this entire thread, but none of the suggestions have worked for me.

In my case, the value of $saddr is "#001" which doesn't look valid at all. Could someone explain what the control script is trying to connect to, and what a correctly-formed address should look like?
TheKorn
Posts: 142
Joined: Fri Aug 02, 2013 12:39 pm

Re: DLink PTZ cam not recognizing PTZ clicks

Post by TheKorn »

dvarapala wrote:I am having this exact same error with my new DCS-5010L. I've read through this entire thread, but none of the suggestions have worked for me.

In my case, the value of $saddr is "#001" which doesn't look valid at all. Could someone explain what the control script is trying to connect to, and what a correctly-formed address should look like?
Well I can't answer your direct question, but I have good overall news! (...kind-of...)

I fired up my test ZM VM (say that three times fast) after reading your reply to test the directions in the wiki. (I test out all my ZM changes in the VM first before rolling them to my "real" ZM box.) And good news!...

...it didn't work for me, either. :mrgreen: Though since I know it can work (since my real ZM box is happy as a clam controlling my 5010L) I went digging to find the problem using diff between UTJH's 5020 control script and the original TVIP400 script that it was based on.

Turns out UTJH's script hit what looks to be a snafu (deliberately stopping short of calling it a bug) in ZM. The only real difference between them was the protocol name; in the original it's TVIP400 and in UTJH's version it was Dlink-DCS5020L. On a whim, I changed the protocol name to just DCS5020L, and everything started working!

SOOoooo I updated both his script and the instructions on the wiki. Give it another whirl, I think it'll work this time around.
User avatar
dvarapala
Posts: 54
Joined: Sat Nov 06, 2010 2:30 pm

Re: DLink PTZ cam not recognizing PTZ clicks

Post by dvarapala »

Nice work!

So what was this "snafu?" No hyphens allowed in protocol names?
TheKorn
Posts: 142
Joined: Fri Aug 02, 2013 12:39 pm

Re: DLink PTZ cam not recognizing PTZ clicks

Post by TheKorn »

dvarapala wrote:So what was this "snafu?" No hyphens allowed in protocol names?
Not sure if ZM was reacting to the name or the length of it. Don't really have any perl debugging tools so not sure how to diagnose further. Just got lucky, really!

Is yours working now?
User avatar
dvarapala
Posts: 54
Joined: Sat Nov 06, 2010 2:30 pm

Re: DLink PTZ cam not recognizing PTZ clicks

Post by dvarapala »

Working fine now, thank you for your help!
UtahJarhead
Posts: 20
Joined: Tue Aug 14, 2012 8:30 pm

Re: DLink PTZ cam not recognizing PTZ clicks

Post by UtahJarhead »

TheKorn, can I get a copy of your script? I'm digging back into why my PTZ functioning stopped.
UtahJarhead
Posts: 20
Joined: Tue Aug 14, 2012 8:30 pm

Re: DLink PTZ cam not recognizing PTZ clicks

Post by UtahJarhead »

Ignore that request. I screwed up my script and couldn't fathom how I'd managed it. I'm good to go, now.
UtahJarhead
Posts: 20
Joined: Tue Aug 14, 2012 8:30 pm

Re: DLink PTZ cam not recognizing PTZ clicks

Post by UtahJarhead »

Modified the script to allow for IR On/Off utilizing the Wake/Sleep functions. It looks a little cludgy, but it works.
TheKorn
Posts: 142
Joined: Fri Aug 02, 2013 12:39 pm

Re: DLink PTZ cam not recognizing PTZ clicks

Post by TheKorn »

Awesome, I'll update and give it a whirl.
Locked