Streaming Web Cam on Netgear WGT634u Running OpenWRT

Posted by Max Power | Posted in Netgear WGT634u | Posted on 14-11-2011-05-2008

0

This post will help you to setup a usb web cam on your WGT634u, running OpenWrt Backfire, and stream the video to a website.  The important part is to make sure that your web cam is supported by the Linux UVC drivers.

Web Cam

First you need to make sure that your webcam is compatible with the Linux UVC drivers.  The following links will help you find out if your web cam is supported by Linux UVC drivers:

I am using a Logitech Quickcam Pro 5000 that I got on eBay for about $15.

Router Setup

It is probably easiest to connect to the router with the serial cable and putty serial, although it will probably work with putty over ssh as well.  It may be more difficult to trouble shoot though since you don’t see all of the command information.

Setup USB Support

Since the newer web cams are the ones that support UVC, they probably also support USB 2.  To get usb support install the following packages:

opkg update
opkg install kmod-usb-core kmod-usb2 usbutils

Running the following command should show you a list of the usb ports:

lsusb

http://wiki.openwrt.org/doc/howto/usb.essentials

Setup Webcam Support

Now we want to install support for the web cam.  Install the following packages:

opkg update
opkg install kmod-video-uvc kmod-input-core kmod-video-core kmod-i2c-core

http://wiki.openwrt.org/doc/howto/usb.video

MJPG-Streamer

Now we will install mjpg-streamer to stream the video to a website.  Install the following packages:

opkg update
opkg install mjpg-streamer

Now you can plug in the camera.  Use the

lsusb

to see if the web cam is recognized. If you are using the serial interface connected to the router you should be able to see the camera recognized. Now lets start mjpg-streamer

/etc/init.d/mjpg-streamer start

and browse to the website to see if it is working

http://192.168.1.1:8080/?action=stream (to see video)

http://192.168.1.1:8080/?action=snapshot (to see a still snapshot)

If you want mjpg-streamer to start up automatically then run this command:

/etc/init.d/mjpg-streamer enable

Website Setup

Download all of the files located here or download the tarball here and unpack it into /www/webcam_www directory.

Edit /etc/init.d/mjpg-streamer – find the following line in function start():

[ $enabled -gt 0 -a -c $device ] && sleep 3 && $SSD -S -m -p $PIDF -q -x $PROG -- --input "input_uvc.so --device $device --fps $fps --resolution $resolution" --output "output_http.so --port $port" &

and add -w /www/webcam_www behind –output “output_http.so. Now it should look like this:

[ $enabled -gt 0 -a -c $device ] && sleep 3 && $SSD -S -m -p $PIDF -q -x $PROG -- --input "input_uvc.so --device $device --fps $fps --resolution $resolution" --output "output_http.so -w /www/webcam_www --port $port" &

Now restart mjpg-streamer

/etc/init.d/mjpg-streamer restart

Then test it by opening the URL http://192.168.1.1:8080/in your web browser.

Refrences

Check out the following links for mjpg-setup details

http://wiki.openwrt.org/doc/howto/webcam#embedding.video.stream.into.simple.webpages

http://wiki.openwrt.org/doc/howto/webcam

How to Build a Serial Cable for the Netgear WGT634u

Posted by Max Power | Posted in Netgear WGT634u | Posted on 01-11-2011-05-2008

0

If you end up messing up your router and you are unable to access your router via the web interface you will need to build a serial cable.  In this post I will show you how to build a serial cable.  For this ordered a CA-42 off of eBay for $5.

  1. First you should test your cable to make sure that you don’t have a dud.  Plug it into your computer and check to make sure that the drivers are installed and the cable is recognized.
    • I had to search for the drivers online and try a couple of different drivers before it was recognized.
    • To see if it working properly look at the device manager (Start >> Run >> type devmgmt.msc and look for Prolific USB-to-Serial Comm Port (COM #)) and make sure that there is not warning on that entry.  If you unplug the cable the entry should go away.  Note that this is also how you find what com port it is on.
  2. Now that you know the cable is good and have the drivers installed, cut the nokia plug off leaving a couple inches of cable to test with.  Strip the cables and using a multimeter check which color wire goes with which pin.
    • Mine was 8-Blue-Ground, 7-Green-Tx, 6-White-Rx but yours may be different.
    • Don’t worry about power since we will not need it.
  3. Now using the power connector for a floppy drive connect the ground, Tx, and Rx wires in the following order: yellow-Ground, black-Rx, black-Tx.
    • Note that the power connection is not needed.

The following pictures show the pin out for the CA-42 and the router serial plug:

wgt634u PCB

Refrences:

Enable Wifi on WGT634u Running OpenWrt Backfire

Posted by Max Power | Posted in Netgear WGT634u | Posted on 26-10-2011-05-2008

2

For some reason by default the wifi drivers are not included in the OpenWrt Backfire image for the WGT634u.  However it is very easy to get it up and working using the web interface.  The following steps outline the method that I used to enable wifi on my WGT634u running OpenWrt Backfire:

  1. Access the router using the web interface on 192.168.1.1 user: admin password is blank (unless you have changed it)
  2. Click the Administration link on the right hand side to get the administration menu options
  3. In the menu on the top left go to Overview >> LuCI Components
  4. Scroll down to the lower list of components that can be installed, find kmod-madwifiand click the link to the left to install it
    • If you don’t see kmod-wifi then use the link at the top to refresh the list of components that can be installed
  5. Once it is installed then go to System >> Reboot and reboot the router

If all went well then you should see the light come on for the wifi and you should see the wifi in the menu.  Now you can configure it to connect to your network.  By default the wifi is disabled, so you will have to enable it.

Skype and SipToSis as service on Windows 7

Posted by Max Power | Posted in VOIP | Posted on 25-10-2011-05-2008

1

If you are having difficulty getting XYNTService to run Skype and SipToSis on Windows 7 then this article will hopefully clear things up for you.

Edit: I was not able to get this working after a few hours of tinkering around with it and so I just purchased Appicus from MHSpot.com.  This application is cheap ($7.50) and makes it all work.  If you are able to get things working please let me know how you did it.

Windows 7 runs it services in session 0 which does not allow user interaction when they are running.  This means that we will not be able to accept the api call once the service is started (in Windows XP this didn’t matter since we could see the services running and accept the api call).  In order to get it all working we will explicitly specify the path to java in both the locateJava.bat file (SipToSis) and XYNTService.ini file.  This way when we accept the api call during testing it will still be accepted when we install it as a service.

If you have not already read my post about running all of this on Windows XP (Cheap VOIP with Skype and SipToSis) you may want to since it might fill in the gaps.

Read the rest of this entry »

Connect to Netgear WGT634u Running OpenWrt

Posted by Max Power | Posted in Netgear WGT634u | Posted on 25-10-2011-05-2008

0

There are a few ways that you can connect to your Netgear WGT634u running OpenWrt.  You can use the web interface, ssh, or WinSCP.  This post will describe each of these options and some of the features of each.

TCP/IP

Note:  PuTTY and WinSCP will require that you set a password for the administration account since they do not work with password: blank.

Web Interface

You can use the web interface at the IP address assigned to your router (192.168.1.1 by default username: root, password: blank).  The web interface gives you access to most things that you need for simple configuration of your router.

192.168.1.1

PuTTY

PuTTY will give you a command line interface to the router.  This can be used in both TCP/IP and serial.  When using TCP/IP just connect with the IP address.

http://en.wikipedia.org/wiki/PuTTY

WinSCP

WinSCP allows you to see the files on the router in a Windows Explorer type interface.

Note:  When setting up the connection use type SCP.

http://en.wikipedia.org/wiki/WinSCP

Serial

For this method you will need to build a USB-to-Serial cable (see my other post).

PuTTY

  1. Select Serial as the connection type and set the com number for the port the usb is plugged into and set the speed to 115200.
  2. Plug the adapter into the USB port, and plug it into the router.  Now power up the router.
  3. Now click open and the connection should initialize.  If you don’t see anything come up in the terminal press Ctrl + C and it should echo back something like “Press enter to activate this terminal”.
  4. Once you are connected you will see a linux like promp.  You can now use it like a normal linux terminal.

Install OpenWrt on Netgear WGT634u Using Web Interface

Posted by Max Power | Posted in Netgear WGT634u | Posted on 25-10-2011-05-2008

0

This post will describe how to flash the Netgear WGT634u with OpenWrt using the Netgear web interface.  There are other ways to do it using a serial cable but this way is very easy and does not require you to build a serial cable.

Install Firmware Version 1.4.1.10

First we need to have firmware version 1.4.1.10 installed on the WGT634u.  If it currently has version 1.4.1.9 then you can upgrade directly to version 1.4.1.10.  However, if you have a previous version then you need to upgrade to 1.4.1.9 first.  For some reason upgrading directly to version 1.4.1.10 from a version before 1.4.1.9 causes an error.  To update the firmware log onto the WGT634u by visiting 192.168.1.1 and username: admin, password: password.  If this does not work you may try resetting the router by pressing and holding the reset button until the lights go out.  Wait for them to turn green again before you try again.  Once you log onto the router then use the Netgear web interface to update the firmware.  Download the firmware at the following links:

Netgear Firmware 1.4.1.9: http://support.netgear.com/app/answers/detail/a_id/814/~/wgt634u-firmware-release-1.4.1.9

Netgear Firmware 1.4.1.10: http://support.netgear.com/app/answers/detail/a_id/813/~/wgt634u-firmware-release-1.4.1.10

Update WGT634u Config File

Once the firmware version on the WGT634u is 1.4.1.10 then you will need to upload a custom config file.  If the firmware version is not 1.4.1.10 then the config file will not take when you try to upload it.  Download the special config file from the link below and upload it to the router using the “Backup Settings” option in the Netgear web interface.  Once you do that the router will reboot and and “Upgrade to OpenWrt” will appear as an option in the menu on the left.  Note: If you don’t see this option after you upload the config file then clear the cache.

Config File (firmware version 1.4.1.10): http://downloads.openwrt.org/utils/wgt634u-upgrade.cfg

Upload OpenWrt Image to WGT634u

Once you have uploaded the custom config file to the WGT634u you will see an option in the menu on the left “Upgrade to OpenWrt“.  Use this function to upload the OpenWrt image to the WGT634u.  The process is similar to the process that was used to update the firmware image.  Once the image is uploaded and the router has rebooted then clear the browser cache and visit the web interface address again 192.168.1.1.  You will be able to log into the web interface using the username root and a blank password.

OpenWrt Image 10.3: http://downloads.openwrt.org/backfire/10.03/brcm47xx/openwrt-wgt634u-squashfs.bin

Note: 10.3 is the latest stable version when this was written.  Note the path “brcm47xx”, use this to see what the latest version is.

Note:  Make sure that you clear the cache before visiting the web interface or it will tell you that it can not find the path.

Note:  Do not classify the router as dead until you give it plenty of time to reboot, rebooted it, and given it more time to reboot.

Note:  You will want to change the root password from blank if you will ssh into the router since it does not work with a blank password.

Summary

If all went well then you should be able to access the router using the default IP address 192.168.1.1 and you will see the OpenWrt web administration interface.

Refrences

Cheap VOIP with Skype and SipToSis

Posted by Max Power | Posted in VOIP | Posted on 06-12-2010-05-2008

3

Imagine having VOIP phone service using your existing home phones for about $3/month.

I am using Skype as my VOIP provider which costs about $3.00/month and SipToSis to provide a Skype gateway to a Linksys SPA-3102 where I connect a regular cordless home phone.  I have been using this for a few months now and have had no problems.  In this article I will give the details of my setup.

Read the rest of this entry »

BeyondTV Link Command Arguments (Switches)

Posted by Max Power | Posted in BeyondTV | Posted on 01-12-2010-05-2008

0

Well after weeks of frustration trying to get my BeyondTV Link machine to connect to my BeyondTV server automatically, I finally figured out the problem.  All of the documentation online and even the tech support have the command line arguments (switches) wrong.  It is quoted as the following:

/networkclient:IP /networkclientusername:user /networkclientpassword:pass

But this is wrong it should look like:

/networkclient:IP /networkclientuser:user /networkclientpassword:pass

Notice that the switch for username is wrong.  Just for completeness I am using BTV v 4.9.3 (Link and Server must be same version).