Monday, December 28, 2015

Hikvision NTP Problem

I ran into a problem with some of my Hikvision IP Cameras and their NTP (Network Time Protocol) update time being off even though the time zone was correct. Now what was weird was it wasn’t on all cameras(Different FW, Different Region).

What I had to do was swap the DST start and end times. 

Example

Before Swapping:

After Swapping:

The start time was now the end time and the end time was now the start time. And it worked!

Wednesday, December 23, 2015

Hikvision DS-7616N-E2/16P NVR

Recently I  decided to purchase a Embedded NVR for my IP Camera as my Zoneminder setup was getting maxed out and I needed to add a couple more camera's to my system. So I purchased a Hikvision NVR with 16 POE ports and it recently arrived so I thought I would post some pictures and some of the specifications.
NVR Front

NVR Back

NVR Inside

Some Specs:
  • 16 100MB POE Ports
  • 16 Channels
  • 2 SATA Ports
  • 1 HDMI
  • 1 VGA
  • 2 USB Ports (1 Front, 1 Rear)
  • 1 RCA Audio In
  • 1 RCA Audio Out
  • 1 Gigabit Ethernet LAN


Partial output  of cat /proc/cpuinfo:
[root@dvrdvs /] # cat /proc/cpuinfo
Processor       : ARMv7 Processor rev 1 (v7l)
processor       : 0
BogoMIPS        : 1987.37
processor       : 1
BogoMIPS        : 1993.93
Features        : swp half fastmult edsp tls

Partial output of cat /proc/meminfo:
[root@dvrdvs /] # cat /proc/meminfo
MemTotal:         526256 kB
MemFree:          239404 kB


The NVR turned out to be a good purchase, I like the features and performance. Although it is the Chinese version modified to English it still works great (although I am afraid to upgrade the firmware). 

I heard that Hikvision is trying to stop these Chinese market cameras and NVR's from being made to English and sold abroad for cheaper, but I do not think they realize that they will be severely reducing their sales by doing so, they sell more Chinese versions which are later modified to English than region specific hardware. This is due to the lower cost, thus making this affordable to people who would of been purchasing lower end no name device's. Hikvision should not mess with something that works!, their business and professional customers will continue to purchase official region specific hardware as they are already buying cameras at those prices and or higher. These customers are coming from expensive professional brands such as Acti, BOSCH, Axis, etc.

Look at Nintendo for example, they stopped the original Wii came out with something that was less hackable and their sales are suffering severely.


I do not condone or encourage any illegal activity. The contents of this posts are my personal opinion and are just a form of expression.

Monday, December 7, 2015

Hikvision NVR Sub Stream Unavailable

So I ran into an issue with with iVMS Android APP being unable to stream fluent mode or sub-stream from my Hikvision NVR. The option for Balanced and Fluency was Greyed out.

Here is how to resolve it:

1) Factory Reset the IP Camera from the Web Browser.

2) Once the camera is back up, then power off the camera by removing the power plug or POE cable connection going to the camera. Wait 30 seconds and then plug it back in.

3) Sub-stream should now be available.

You will have to reconfigure your settings and preferences on the camera. Hikvision no sub stream problem should now be fixed.

***I take no responsibility for damage to your device or any re-percussion's for following this information. My usual disclaimer also applies. This worked for and and I am posting in case I come across this issue again and do not remember what to do.

Hikvision TFTP Tool

Hikvision TFTP Tool. I am uploading a copy here for my archival purposes.

TFTP.zip(tftpserv.exe)

This was originally downloaded from Hikvision's Website.

Monday, November 2, 2015

Stream Linksys WVC54GC IP Camera VLC


One of my first IP cameras I no longer own but some of you may have it so here is the streaming URL for the Linksys WVC54GC IP Camera:

http://username:password@192.168.1.100/img/video.asf


Stream Linksys WVC54GC IP Camera using VLC or Zoneminder.

Thursday, October 1, 2015

Access Hikvison IP Camera Directly

Here is how to access your IP camera's directly through the NVR. In this setup the IP Cameras are connected to a Hikvision NVR without virtual host feature.

Note: Your IP address setup may differ, so I will explain the IP Scheme. Also you will have to set your IP cameras to have static IP addresses configured on the web interface of each camera, then add to the NVR manually instead of Plug and Play.



NVR is connected to your home router with the IP of 192.168.1.200 for example, so your laptop connected to WiFi would have IP of for example 192.168.1.210 on the same subnet as your NVR.

Now your cameras are connected to the POE ports at the back of your NVR. The Cameras have an IP such as:

CAMERA 1 - 192.168.20.10
CAMERA 2 - 192.168.20.11
CAMERA 3 - 192.168.20.12
CAMERA 4 - 192.168.20.13

And the NVR's IP Address for the Internal NIC would be on the same subnet as the IP Cameras such as 192.168.20.1.

Set the IP Cameras default gateway to that of the IP Address under Internal NIC IPv4 Address in the Network Configuration page of the NVR (might not be visible from web interface, connect to the NVR directly using HDMI/VGA and mouse).


Once the Cameras IP address and default gateway is configured and the cameras have added to the NVR manually and can be viewed through the NVR. You can Telnet into the NVR and enter the command:  
echo 1 > /proc/sys/net/ipv4/ip_forward 

Now you should be able to type in the IP Address of the IP camera in your web browser and access the cameras directly. http://192.168.20.10

Note: You will have to re-enter the command "echo 1 > /proc/sys/net/ipv4/ip_forward " if the NVR ever reboots.

If this does not work for you, you may have to setup a static route in your router such as:

Destination LAN: 192.168.20.0
Subnet Mask: 255.255.255.0
Gateway: 192.168.1.200

Tuesday, September 22, 2015

DS-2CD2432F-IW Zoneminder

This is how I got my Hikvision 3MP Indoor Cube IP Camera DS-2CD2432F-IW working in Zoneminder.

Adding the camera to Zoneminder:
   i) Create a new monitor and choose source as ffmpeg

  ii) Click on source tab, add rtsp://username:password@192.168.1.120:554/cam/realmonitor?channel=1&subtype=0?tcp to  the source(change your IP as neccessary on your network, and your username and password.

 iii) Colours is 24 bit, Width is 1920, Height is 1080(I choose 1080P mode instead of 3MP), Click save and it should now work. 

If you cannot get a live stream in Zoneminder, try to increase the shmall and shmmax values. I was not getting an image in zoneminder until increased my values to the following. Note your shmall and shmmax values could be more or less depending on how much RAM you have.

sudo nano /etc/sysctl.conf

Now add or change the following in the file:

# Increase the maximum shared memory
   kernel.shmall = 1073741824
   kernel.shmmax = 1073741824


Save and exit, you may also need to reboot.


At this point you should have the camera working in Zoneminder, if not you may have to install H264 on your Zoneminder server by following the instructions here.

Wednesday, September 16, 2015

Stream Hikvision NVR VLC

Here is how to stream the video feed from a Hikvsion NVR using VLC.

Create a text file and enter the following line replacing the username/pass/ip with yours.

Main stream:

rtsp://admin:12345@192.168.2.100/Streaming/Channels/101

or

rtsp://admin:12345@192.168.2.100/PSIA/Streaming/channels/101

Substream:

 
rtsp://admin:12345@192.168.2.100/Streaming/Channels/102

or

rtsp://admin:12345@192.168.2.100/PSIA/Streaming/channels/102

Note: In this example 192.168.2.100 is the IP address on the LAN port of the Hikvison NVR. the first 1 ine 101 is the camera number and the second 1 is the main stream, can use 2 for substream.

Save the text file as Camera1.asf or Camera1.m4v(asf or m4v is the extension of the file so your media player will recognize it and open it) now double-click the Camera1.asf or Camera1.m4v file or drag and drop it into VLC and it should start streaming immediately.


See this post on how to stream different cameras/channel and mainstream/substream. Hikvison NVR Streaming URLs



Wednesday, September 2, 2015

NVR/DVR Software for IP Cameras

This is a list of Security Camera monitoring software that I have tried or like the features. I will try to update if I find something else that is interesting.

Vitamin D(Now Sighthound) (Free with Restrictions, Paid Version Available)
-Like the motion detection


Zoneminder (Free)
-Really customizable and can be integrated with soo many things.


BlueIris (Paid)
-Looks very promising.

webcamXP or webcam7 (Free with Restrictions, Paid Version Available)

iSPY Connect (Free with Restrictions, Paid Version Available)
-Works nicely and has a great feature of automatically finding the camera URL.

Milestone Systems (Free with Restrictions, Paid Version Available)


If you know any other software that is good, please let me know so I can add it to the list after trying it out.

Sunday, August 30, 2015

Hikvision NVR Streaming URL

Here is a list of tested URL's for Hikvision NVR streaming URL. This will stream the IP cameras that are connected to the NVR.

Main RTSP Stream:   

Channel/Camera 1 - rtsp://admin:12345@192.168.1.100/Streaming/Channels/101
Channel/Camera 2 - rtsp://admin:12345@192.168.1.100/Streaming/Channels/201
Channel/Camera X - rtsp://admin:12345@192.168.1.100/Streaming/Channels/X01
  
Sub RTSP Stream:
Channel/Camera 1 - rtsp://admin:12345@192.168.1.100/Streaming/Channels/102
Channel/Camera 2 - rtsp://admin:12345@192.168.1.100/Streaming/Channels/202
Channel/Camera X - rtsp://admin:12345@192.168.1.100/Streamin/Channels/X02 


Remember to change the username and password as well as IP address of the NVR (in this example its 192.168.1.100) to match your setup. You can also add ?tcp to the end of the URL if you get corrupted frames. Example: rtsp://admin:12345@192.168.1.100/Streaming/Channels/102?tcp

Monday, August 17, 2015

Syma X12 Quadcopter

Syma X12, X12S Quad-copter

I love this little quad-copter, its small, power-full and fun to fly. I also have the Cheerson CX10 which I love and is much smaller than the X12 and cannot be compared. I like them both for different reasons. Anyways the reason I am making this post is to save a link to the user manual in English.


Download User Manual Here

Monday, June 1, 2015

Fix Zoneminder Corrupt Frames

Sometimes when I added a camera or upgraded the firmware on my IP Camera I would start to see grey frames, half frames, corrupt frames or dropped frames in Zoneminder. There are three fixes you can try to resolve this issue.

1) This can sometimes be fixed by increasing your SHMMAX and SHMALL as can be seen in this post.

2) If that does not fix your problem try adding ?tcp to the end of your RTSP or FFMPEG stream in zoneminder as can be seen in this post.


3) Another thing you HAVE to make sure frame rate(FPS) on Zoneminder is the same or a little higher than it is set on the camera, this is actually what fixed my corrupt frames after upgrading my camera firmware. I had my camera set to 25fps and zoneminder set to 6 fps, once I set the camera to match or lower (<=) to that of zoneminder settings for that camera, I stopped getting corrupt frames.

Keywords: RTSP, Zoneminder Corrupt Frames Fix, MJPEG, ASF, 3MP

Saturday, May 9, 2015

Bluetooth OBDII Scanner

I recently purchased a Bluetooth OBD2 reader online recently, was pretty cheap (£5.35  or $8US or 7.4). I must admit it is quite tiny, I have included a picture of it next to a AAA battery for comparison.


So I have tested the device, connects quickly to my phone. This is not a review, just a post to keep a copy of my ISO file and to let some people know about this small portable reader which replaced my big bulky USB OBDII reader.

I also decided to make a backup of my CD that came with it before it gets scratched on anything(please note the backup is for my personal uses):

Mini Bluetooth ELM327 OBD2 II Auto Diagnostics Scanner Power Switch For Android.iso

However as my backup ISO is for me I can still share what the contents of the CD is with the exception of a few titles that i had to redact.

OBDII On Window PC software:
PCMSCAN v2.4.12
OBDII USB Driver
ScanMaster-ELM v2.1
ScanTool.net v1.13


OBDII On Window PC software/PCMSCAN v2.4.12:
PCMSCAN v2.4.12.exe
<redacted>.exe
PCMSCAN User Manual.chm


OBDII On Window PC software/OBDII USB Driver:
CH340 USB Driver
CP2102 USB Driver
FTD232 USB Driver


OBDII On Window PC software/OBDII USB Driver/CH340 USB Driver:
CH341SER.EXE

OBDII On Window PC software/OBDII USB Driver/CP2102 USB Driver:
CP210x_VCP_Win_XP_S2K3_Vista_7.exe
CP210x_VCP_Win2K.exe


OBDII On Window PC software/OBDII USB Driver/FTD232 USB Driver:
windows vista usb drive
images
Mac-OS Drivers
WHQL Certified Driver
winzip80.exe
rp500enu.exe
2115 Release Info.doc
804 Release Info.doc
autorun.inf
COMPortGuide.htm
ComPort.PDF
FTCOMMS.VXD
ftdibus.cat
ftdibus.inf
FTDIBUS.SYS
FTDICD.exe
ftdiport.cat
FTDIPORT.INF
ftdiun2k.ini
Ftdiunin.exe
FTDIUNIN.INI
FTSENUM.SYS
FTSENUM.VXD
FTSER2K.SYS
FTSERIAL.SYS
FTSERMOU.INF
FTSERMOU.VXD
ftserui2.dll
FTSERUI.DLL
readme.txt
UninstallGuide.htm
us232a.gif
W2KGuide.htm
W98Guide.htm
WMEGuide.htm
WXPGuide.htm


OBDII On Window PC software/OBDII USB Driver/FTD232 USB Driver/windows vista usb drive:
amd64
i386
CDM 2 04 16 Release Info.doc
ftd2xx.h
ftdibus.cat
ftdibus.inf
ftdiport.cat
ftdiport.inf


OBDII On Window PC software/OBDII USB Driver/FTD232 USB Driver/windows vista usb drive/amd64:
ftbusui.dll
ftcserco.dll
ftd2xx64.dll
ftd2xx.lib
ftdibus.sys
ftlang.dll
ftser2k.sys
ftserui2.dll


OBDII On Window PC software/OBDII USB Driver/FTD232 USB Driver/windows vista usb drive/i386:
ftbusui.dll
ftcserco.dll
ftd2xx.dll
ftd2xx.lib
ftdibus.sys
ftlang.dll
ftser2k.sys
ftserui2.dll


OBDII On Window PC software/OBDII USB Driver/FTD232 USB Driver/images:
W980000.PDF
W980001.PDF


OBDII On Window PC software/OBDII USB Driver/FTD232 USB Driver/Mac-OS Drivers:
FTDIUSBSerialDriver Installation Notes.rtf
FTDIUSBSerialDriver.pkg.hqx
usb_ps2_converter.sit.hqx
USBSerial_04036001.sit.hqx


OBDII On Window PC software/OBDII USB Driver/FTD232 USB Driver/WHQL Certified Driver:
2101 Release Info.doc
701 Release Info.doc
FTCOMMS.VXD
ftdibus.cat
ftdibus.inf
FTDIBUS.SYS
ftdiport.cat
FTDIPORT.INF
ftdiun2k.ini
Ftdiunin.exe
FTDIUNIN.INI
FTSENUM.SYS
FTSENUM.VXD
FTSER2K.SYS
FTSERIAL.SYS
FTSERMOU.INF
FTSERMOU.VXD
FTSERUI.DLL


OBDII On Window PC software/ScanMaster-ELM v2.1:
ScanMaster-ELM_User Manual.pdf
<contents redacted>


OBDII On Window PC software/ScanTool.net v1.13:
<contents redacted>

OBDII Phone system software/For Andriod:
Torque_Use Instructions.pdf 
<contents redacted>

OBDII Phone system software/For Apple IOS:
<contents redacted>

OBDII Phone system software/For Symbian:
OBDScope User_s Guide_1.2.pdf
<contents redacted>

Tuesday, May 5, 2015

Convert Dahua IP Camera Video (.DAV) to MP4

Here is a quick way to convert video recorded from the Dahua IP camera in .dav format to .mp4 format that is playable on any media player.
 
ffmpeg -y -i InputFile.DAV -vcodec libx264 -crf 25 output.mp4


Change the 25 to the number of frames per second that your video is recorded in.

Wednesday, April 8, 2015

Compress PDF on Linux

Thanks to many helpful posts on the internet, I found the best way to shrink a PDF file in Linux. Using the commands below I have shrunk PDF files from 50MB to 2MB, although your results may vary due to many different variables. Its still worth a shot.

pdf2ps InputFileName.pdf temp.ps
ps2pdf temp.ps OutputFileName.pdf
 
 

Tuesday, March 10, 2015

Copy CWM Backup Moto G

Here is how to copy the Clockwork Mod Recovery(CWM) backup off your Moto G(without actual SD card slot) android phone. You will need adb installed on your machine for this to work, lots of tutorials online on how to accomplish that.

Copy CWM Backup From C: drive of your desktop to Moto G:
adb push C:/ /mnt/shell/emulated/clockworkmod/backup 

Syntax is: adb push <destination> <source>

Copy CWM Backup from Moto G to C: drive of your computer:
adb pull  /mnt/shell/emulated/clockworkmod/backup C:/

Friday, February 20, 2015

Ad Blocking using pfSense

Here is a simple way to block ad's for you entire network using pfSense, this is easy as editing the host file on a machine. (You must be using pfsense as your router or configure your router to use the IP of your pfsense server as the DNS server.)

Login to pfSense: Go to "Services", then "DNS Forwarder" and paste the Ad sites you would like to block in the following format under "Advanced":
address=/<url-here>/<ip-here>

So to block smartclip.net for example, enter the following

address=/smartclip.net/127.0.0.1

Note: This entry above will block *.smartclip.net by pointing it back to your local machine. For example that line will block www.smartclip.net, test.smartclip.net, etc. It's like a DNS Wildcard.

Normally the following URL would resolve as follows:

nslookup test.smartclip.net 

Name:    test.smartclip.net
Address: 78.46.98.112

nslookup www.smartclip.net

Name:    www.smartclip.net
Address: 213.203.209.152


By adding the line address=/smartclip.net/127.0.0.1, the nslookup now returns the following:
Name:    test.smartclip.net
Address: 127.0.0.1

Name:    www.smartclip.net
Address: 127.0.0.1





Tuesday, February 10, 2015

OpenVPN TUN Interface Force Traffic

To force all client traffic over the tunnel in OpenVPN when using TUN not TAP, please add the following to your server config file:

push "redirect-gateway def1"
push "remote-gateway VPN-Server-IP"
push "dhcp-option DNS 4.2.2.2" 



This will also force internet traffic over the vpn.

Thursday, January 29, 2015

D-Link DCS-2230 IP Camera Auto Format SD

So I came across a problem with a D-Link IP camera, the MicroSD card would get full and I would have to manually reformat the card because the camera did not support overwriting when set to motion detection.

So I setup a script to run a cURL command to format my SD card on the camera automatically every month. Please see my other posts to find out how to use the curl command.


curl username:password@192.168.1.100/cgi-bin/format.cgi?SD


Keywords: IP Camera, D-Link, DCS, Format, SD Card, curl, remote format, curl format.

PiKVM to NVR

  Trying to connect to your IP Camera Network Video Recorder (NVR) via your PiKVM and it’s not working? No video from the NVR on...