Friday, March 7, 2008

How to change password for AV Tech DVR

Step 1: Download and install remote management; click the Download AP button shown below:


Step 2: Login to DVR using the default username/password: admin


Step 3: Click on the System Config Button:


Step 4: Select the user account and click "EDIT" button


Step 5: Enter the new password you desire and click the "APPLY" button. You're done.

Monday, March 3, 2008

Configuring Internet Explorer 7 to accept Unsigned ActiveX Control for remotely viewing CCTV

For security reason, Internet Explorer 7 default configuration does not allow downloading of unsigned ActiveX Control.

The following instructions will guide users to configure Internet Explorer 7 to give user the chance to install Unsigned ActiveX Control.

Step 1: What you will see if Internet Explore 7 refuse to run the embedded ActiveX Control




Step 2: Click on the yellow bar and click Install ActiveX Control

Internet Explorer will display the following dialog if the ActiveX Control had not been signed by a key that it knows.


Step 3: Select Internet Option.


Step 4: Select "Security" Tab and click on the Custom Level button.



Step 5: Change "Download unsigned ActiveX Controls" from the default "Disable" to "Prompt"; Click OK to accept the changes.





Step 6: As in Step 2 click on the yellow bar and select "Install ActiveX" again. Click on the "Install" button when Internet Explorer 7 prompt you the following dialog.


Congratulation! If you are able to follow the above 6 steps, you should be watching your remote camera now.

Monday, January 14, 2008

A pool of water made my car dance.

Today is 14-Jan-2008, Day 1 of my Make Up Training (MUT) for the In-Camp-Training (ICT) I deferred last year. This ICT is going to last 23 days; the longest ICT ever. The timing cannot be any more worst as it stretch all the way till the day before Chinese New Year eve. When people are busy cleaning, decorating, preparing to welcome the new "RAT" year, I will be fighting a war in the forest.

The morning past uneventfully as we waited to be "adopted" based on the special trade we were trained in during our active days (BTW, I'm a trained SharpShooter). I was really hoping that they don't need me and maybe I will get to enjoy this 23days "holiday". Too bad for me, "B" Company is in need of a sharpshooter and I get "attached" to them for the whole of this ICT.

We spent the afternoon attending lectures, laying around, reading books.... Not as bad as I thought. Guess what, we get to have "nights off" on the 1st day of ICT. Not only that, we also get to book in next morning instead of 2359 on the same day. This is unheard of in my own unit. Hmmm.... I'm starting to like this unit. :D

It was raining heavily during the afternoon and the roads are all wet (more importantly very slippery). As I was driving home along Lim Chu Kang Lane 1, a pool of water by the side of the road caught my attention. I thought to myself, it's just a pool of water. Shouldn't pose any threat to me nor my car. How wrong can I be. I cannot really recall what actually happened as everything happened so fast. Beginning with my left tyre splashing the pool of water onto the side of the road. Due to increased drag on my front left wheels, my car skidded.... I remember trying very hard to steer clear of a few trees by the side of the road and to stay on the track. I have no ideas how my car had travelled during that scaring 1-2 seconds. All I can remember is my car came to a stop after a 180 degree spin.

It's a MIRACLE!!! I actually "drive" out of this alive, unharmed and my car - unscratched (except maybe for the 4 pretty new tyres). I thought that would be the end of my close encounter. Nope... Wrong AGAIN. While trying to turn my vehicle around, I drove my car onto the road side as I was too lazy to do a full 3-point turn. I should have known better not to do that. It had been raining and the road is wet and muddy. My 2 fronts wheel got stucked in the muddy roadside, unable to move forward nor backwards. When everything looks so dismay, a white Isuzu lorry (registration number: YK8687L) pulled over and offered to help. So they pushed and I pushed (the throttle).... the car just couldn't get back onto the track due to the depression formed by the muddy roadside.

They signalled me to drive the car forward a little bit and we tried again to push the car back on track. Another car drive up behind mine and it was so kind of the driver to help give a little push. With the help of these 3 man, my car finally got back on track once again.

I really want to offer my most grateful THANK YOU! to these 3 total strangers who offered their help unconditionally. It's really wonderful to know that people are so willing to offer their help in our country, Singapore. THANK YOU!

Thursday, January 10, 2008

Programmatically determining an interface IP Address in Linux - C

To determine the IP Adrress, Subnet mask or Broadcast address of an interface in Linux, programmer can use ioctl system call with SIOCGIFADDR request.

The third parameter to ioctl represents a pointer to the structure ifreq, defined in :

struct ifreq {
char ifr_name[IFNAMSIZ];/* Interface name */
union {
struct sockaddr ifr_addr;
struct sockaddr ifr_dstaddr;
struct sockaddr ifr_broadaddr;
struct sockaddr ifr_netmask;
struct sockaddr ifr_hwaddr;
short ifr_flags;
int ifr_ifindex;
int ifr_metric;
int ifr_mtu;
struct ifmapifr_map;
char ifr_slave[IFNAMSIZ];
char ifr_newname[IFNAMSIZ];
char * ifr_data;
};
};
  • ifr_name is the name of the interface for which information is to be retrieved. The OS/400 implementation requires this field to be set to a NULL-terminated string that represents the interface IP address in dotted decimal format. Depending on the request, one of the fields in the
  • ifr_ifru union will be set upon return from the ioctl() call.
  • ifr_addr is the local IP address of the interface.
  • ifru_mask is the subnetwork mask associated with the interface.
  • ifru_broadaddr is the broadcast address.
  • ifru_flags contains flags that give some information about an interface (for example, token-ring routing support, whether interface is active, broadcast address, and so on).
  • ifru_mtu is the maximum transfer unit configured for the interface.
  • ifru_rbufsize is the reassembly buffer size of the interface.
  • ifru_linename is the line name associated with the interface.
  • ifru_TOS is the type of service configured for the interface.
Sample code:
#include
#include
#include
#include
#include
#include
#include
#include

int main(int argc, char* argv[])
{
int socketd;
char szIPAddr[255];
char szNetmask[255];
char szBroadcast[255];
struct ifreq ifr;

socketd = socket(AF_INET, SOCK_DGRAM, 0);
if (socketd <= 0)
{
perror("socket");
return -1;
}

strcpy(ifr.ifr_name, "eth0");

if (0 == ioctl(socketd, SIOCGIFADDR, &ifr))
{
strcpy(szIPAddr, inet_ntoa(((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr));
}

if (0 == ioctl(socketd, SIOCGIFNETMASK, &ifr))
{
strcpy(szNetmask, inet_ntoa(((struct sockaddr_in *)&ifr.ifr_netmask)->sin_addr));
}

if (0 == ioctl(socketd, SIOCGIFBRDADDR, &ifr))
{
strcpy(szBroadcast, inet_ntoa(((struct sockaddr_in *)&ifr.ifr_broadaddr)->sin_addr));
}

printf("IP: %s Netmask: %s Broadcast: %s\n",
szIPAddr, szNetmask, szBroadcast);

close(socketd);
}