Web cams are fairly ubiquitous things these days and by no means expensive. They can be good or bad depending on how much money you want to spend, but there is one almost-universal rule, which is that they connect to a host PC over USB. IP-based cameras that connect to a LAN via an RJ45 connector or wirelessly over 802.11 are quite a bit more useful, because they can be put almost anywhere, but they tend to cost a surprising amount and not provide much resolution. A low-end one like the LevelOne FCS1030 is NZ$260, and they go a lot more expensive than that. For example, the wireless D-Link DCS5300 sells for NZ$930 and it only does 320×240 pixels.
After all, IP cameras have a processor in them, and do web serving, and that… well, that really isn’t a reason for them to be expensive. Some sort of premium seems to go on anything connected with the security industry.
As an illustration of this, the Linksys NSLU2 is a little network storage controller which does web and file serving. It sells here for about NZ$145. Its a complete computer with a 266MHz RISC CPU, 8M of flash and 32M of RAM, two USB ports, and an RJ-45 connector. Not much by todays standards, but not very many years ago those would have been respectable specs for a desktop. It runs off a 5V plugpack. The really interesting thing about it is that the open source community has developed something like five alternative firmware distributions for it which are very capable, and can do almost anything that the hardware will allow. Including acting as a camera server for an attached webcam.
Webcams have also made some interesting strides forward recently. A number of new webcams with true resolutions greater than 1 megapixel have appeared, and a standard for USB web cameras has finally been agreed on. This standard, known as the USB Video Class or UVC, means that newer webcams no longer require proprietary drivers but will work with a generic UVC driver. The Logitech Quickcam Pro 9000 is a good example of a UVC camera, capable of up to 1600×1200 pixels complete with optics to match. It sells here for about NZ$128.
I have been working on combining these two devices with one of the open-source firmwares that has the rather disconcerting name of OpenWRT Kamikaze. Despite the name it has proved to be quite reliable and full-featured, although not terribly well documented, as it is constantly being worked on and improved. Recently it has got to the point where it can easily make the NSLU2 and the QuickCam 9000 work together to make a high-resolution IP camera server, for a total of NZ$275. As it stands the combination is only suitable for indoor use, and it has some limitations, but it still produces a very good image for the money and it works with any web browser — or with my Linux-based ZoneMinder security camera software. If you want indoor high-resolution imaging over a LAN, this could be quite useful. Compiling OpenWRT and selecting the necessary bits is a bit involved and can take a few hours, so I am making the end product, a firmware build called openwrt-nslu2-uvc-webcam1.bin, available here.
To use it yourself you will need:
- An NSLU2
- A UVC-compatible webcam such as the QuickCam 9000
- A host computer running Linux
- The firmware image
- Access to a DHCP server on your LAN
Installing the replacement firmware on the NSLU2 is a Bit Technical, but not difficult. You will need to run a tool called UpSlug2 to install the firmware. UpSlug2 is described here. I would recommend running it from Linux. I used my Ubuntu machine, but booting a Knoppix Live CD on a Windows machine should work fine. UpSlug2 can also be used directly under Mac OS X: see here. Under Ubuntu, getting UpSlug2 is as simple as
apt-get install upslug2
The next step is to power-up the NSLU2 in “upgrade mode”. It should be connected to the same LAN as your Linux machine, but do not plug the camera in at this stage. Use a straightened paper clip or other thin probe inserted in the Reset hole at the back of the NSLU2. Apply gentle pressure and the reset switch will click in. Hold it down and press the power button at the front. The Ready/Status LED will come on orange, but after nine or ten seconds will turn red. Release the reset switch as soon as this happens. The Ready/Status LED should start alternating red and green, indicating that the device is ready to upgrade. Now issue the command:
sudo upslug2 --image="openwrt-nslu2-uvc-webcam1.bin"
If all is well and UpSlug2 can find the NSLU2 you should see a nice animated summary of the upgrade process, which will take about one minute twenty seconds. When it finishes you should wait for three more minutes for it to perform initial setup. You can then disconnect the power, plug in the USB webcam (to the USB port nearest the LAN socket – the other one isn’t powered), and power it up again. After about 55 seconds the red ring light on the camera indicating that it is recording should come on.
The firmware has been set to use DHCP to dynamically determine its IP address. This has the advantage of working in almost all network setups, but it does mean that you will need access to the DHCP server log on your local LAN to find out what IP address it has been given. The logs should show a DHCP discover/offer/request/ack sequence at the time the NSLU2 powers up, which will tell you what IP address it was given.
The log will also give its Ethernet or MAC address (which is on a label on the outside of the box as well, if you still have it). If you have access to the DHCP servers configuration files, you can tell the DHCP server to give the NSLU2 with that Ethernet address a consistent IP address at which it can always be found.
Once you have the IP address, use any web browser to go to http://<IP address> (e.g http://192.168.10.154) and you will find an About page for the M-JPEG streamer software, offering various forms of static or moving images from the webcam, which is running at a resolution of 960×720. For an unadorned single frame, try http://<IP address>/?action=snapshot.
A sample image looks like this
Which is not bad for a webcam at all. A bit fuzzy around the edges, but resolution in the middle is fine. Your cat may look different.
This firmware should work with any UVC-compatible webcam, which includes a number of models from Logitech, Creative, Philips, and other manufacturers. A list of compatible ones can be found here [Warning; the Microsoft Lifecam NX-6000 is listed, but I am told it doesn’t work]. The firmware will not work on anything other than an NSLU2. I intend in due course to describe how to build the firmware in another post, but I had to build the “trunk” version to do this and I’m hoping that a formal release of OpenWRT that supports the mjpg-streamer package that makes this possible will come out and make the whole process much easier.
The NSLU2/QuickCam combination is a powerful one that could obviously be used for a good deal more than a simple image server. The NSLU2 isn’t powerful enough to run anything like the ZoneMinder software except at low resolutions, but it could still be used as a stand-alone remote survey camera with a few additions. I also intend to post about this in the future.
I won’t actually be using this camera with my ZoneMinder setup because it is a bit too demanding. IP cameras require more CPU cycles from ZoneMinder than directly-connected cameras, because ZoneMinder has to decode the JPEG format that the images are sent over the network in. My 1.2GHz Pentium III can only just manage 4 frames a second from this camera at 640×480 with not enough margin to handle another camera. I would guess that if you wanted to use several of these with a ZoneMinder setup nothing short of a 2.5GHz dual-core CPU would be enough.
#1 by wiese4ever on March 28, 2008 - 7:01 am
hello.
i’ve installed yout image, and it works out of the box 🙂
can you tell me the root password please?
best regards wie-se
#2 by johnarthur on March 28, 2008 - 7:20 am
I presume you are trying to login over ssh. It won’t let you do that until you set a root password by logging in over telnet (no password required). You can then set the root password to anything you like. I should (will) post about this and related matters sometime soon…
Glad to hear it worked for you.
#3 by Juan Cubillo on March 28, 2008 - 6:00 pm
Just tested the app and it works great. If possible, please contact me by e-mail as I would like to develop more on this idea. It might be good to work together as I have the same camera 😀
#4 by Nelson Neves on March 29, 2008 - 12:21 am
Very nice article! NSLU2 rocks!
I’m using my slug with debian distro!
http://www.botdream.com/blog/linksys-nslu2-network-storage-link-for-usb-20-disk-drives/
Keep up the good work!
#5 by Lance Benson on March 30, 2008 - 2:25 am
Does your binary require a usb or other drive? If so, what size?
This is exactly the configuration I have been looking for for one of my slugs, but I’ve been putting off trying to set it up.
#6 by johnarthur on March 30, 2008 - 7:21 am
One major advantage of OpenWRT over all the other firmwares for the NSLU2 is that it does not require any external drive. All you need is the NSLU2 and a UVC camera.
#7 by Lance Benson on March 30, 2008 - 9:26 am
John–this is beautiful. I got it working with what I had on hand–a spare slug and a Logitech QuickCam Deluxe for Notebooks. I have not done much, but I am not seeing the problems noted on the “supported webcam” pages. I used the Windows Slug Util to download the firmware. Viewing with Internet Explorer, the “Streaming” option doesn’t work (as expected), the “Java” streaming is jerky, and the “Javascript” streaming is good–almost as good as with the camera connected to the laptop.
The pan and tilt options shown on the control page–are they specific to the 9000 (I know they won’t work on my Deluxe)?
Your effort was mentioned by Juan Cubillo on the NSLU2-linux Yahoo group–that’s how I got here. You should get some hits from that.
Again, very nice work. This is something I planned to do this summer, but thought, probably correctly, that it would have taken me days at the least, and much pain since I’m not a Linux guru.
#8 by johnarthur on March 30, 2008 - 10:14 am
The Javascript streaming does seem to be the most reliable, the others appear to put a strain on most browsers. The pan and tilt options are I think for the Orbit or Sphere MP, not the 9000.
I have to reject the suggestion that I’m any kind of a Linux guru, or that much work was involved. I haven’t done anything other than scratch the surface of OpenWRT. All I have achieved is to put together some components that were already working, without having to write a single line of code.
#9 by Lance Benson on March 30, 2008 - 12:46 pm
I thought I saw somewhere that you wished to speed up the start-up time for powering up the system. Have you de-underclocked the slug? After I did that, my startup time went from 47 to 33 seconds. That should also speed up other slug processes. Running the javascript streaming, the slug is mostly 89% idle or higher (as shown by top), memory 12+ meg used, 18+meg free. Lots of room to play.
What is serving your MJPG page–what did you do to configure that?
Sorry for the questions–there’s a lot to absorb.
#10 by johnarthur on March 30, 2008 - 1:39 pm
I have just de-underclocked and that has brought things down to 37 seconds. I still have no idea what it is doing with itself during most of that time, and finding out is a research topic, to put it mildly.
The MJPG-page is being served by MJPG-streamer, I did nothing to configure it. See http://mjpg-streamer.wiki.sourceforge.net/.
#11 by Lance Benson on March 31, 2008 - 1:56 am
I looked at the MJPG-streamer site you referenced, without readily seeing the answer to my next question. Does MJPG-streamer have an external config file which would enable one to change the port that it is listening on from 80 to something else? I browsed through my slug’s file structure (much more understandable under openWRT than under Unslung) without having anything pop out at me.
So thanks for getting me to plunge into openWRT–its streamlined nature makes me feel that I can understand (after a fashion) everything that I put onto the slug.
#12 by Lance Benson on March 31, 2008 - 7:35 am
John–I installed the openWRT web interface, webif–much better for my novice purposes. If it’s useful to you, the following instructions from NSLU2-Linux (found after much searching) did the trick for me. webif has a built-in, over-the-web editor, and a list of packages with package installer.
telnet to 192.168.1.77 There should be no password requested.
Edit with vi /etc/ipkg.conf and add the nslu2 and optware repositories to package list.
/etc/ipkg.conf should look like:
src release http://downloads.openwrt.org/kamikaze/7.09/ixp4xx-2.6/packages
src packages http://downloads.openwrt.org/kamikaze/packages/armeb
src nslu2 http://ipkg.nslu2-linux.org/feeds/openwrt/kamikaze-7.09
src optware http://ipkg.nslu2-linux.org/feeds/optware/openwrt-ixp4xx/cross/unstable
dest root /
dest ram /tmp
Update package list with ipkg update
Install X-wrt webif with ipkg install webif . This will also add a new source at the end of /etc/ipkg.conf:
src X-Wrt http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/ixp4xx-2.6/packages
#13 by johnarthur on March 31, 2008 - 7:38 pm
MJPG-streamer can indeed run on other ports – it takes its parameters on the command line in /etc/init.d/done. I have added the description of the parameters to the end of my last post.
#14 by Roland on May 1, 2008 - 10:17 am
Tried your firmware mod, didn’t work for my Quickcam Communicate STX. Any tips on how I can enable PWC drivers?
#15 by johnarthur on May 1, 2008 - 10:24 am
I’m afraid not; there are PWC drivers in OpenWRT, but the real problems is that MJPG-streamer is only compatible with UVC cameras and I don’t know of any equivalent software for other types of camera.
#16 by Nelson Neves on May 18, 2008 - 2:58 am
Can make a long post here, your blog doesn’t allow 😦
I’m making some tests with your slug image of OpenWrt and some fancy Hi-Res webcam from Microsoft (Lifecam NX-6000) but it’s not working properlly! Would like to share my progress, if possible! Can you please contact me?
Thanks in advance!
#17 by Nelson Neves on May 18, 2008 - 3:03 am
Hi again,
I have just adquired my second slug to do somes tests and also bougth
a Hi-Res webcam, Microsoft Lifecam NX-6000 (it was in the supported
devices for uvcvideo list).
[Lifecam NX-6000 (045e:00f8) seem to have Soniz SN9C202 bridge and
Omnivisjion ov9650 sensor – info found in google not sure it is
correct]
It seems that with this webcam this will not work! I think it is a
question of driver support! I have followed the above steps and
everything looks fine. I have made a telnet connection and adjusted
root password, then entered with ssh, changed eth0 configurations to
get fixed IP, no problem so far! I have restarted the slug, this time
with webcam connected and everything seems to work as it should except
for 1 thing, when I go to see the streaming with firefox, I can see
the mjpg-streamer webinterface on, but no images, always blank! My
webcam seems to be working, the led is turned on!
I then remembred to run dmesg to check for errors:
…
Initializing USB Mass Storage driver…
usb 3-2: new high speed USB device using ehci_hcd and address 2
usb 3-2: configuration #1 chosen from 1 choice
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
Linux video capture interface: v2.00
uvcvideo: Found UVC 1.00 device Microsoft� LifeCam NX-6000 (045e:00f8)
uvcvideo: Failed to query (135) UVC control 1 (unit 0) : -32 (exp. 26).
usbcore: registered new interface driver uvcvideo
USB Video Class driver (v0.1.0)
Ok, something is not working properly … 😦
I have then tested my webcam on my desktop Linux Ubuntu 7.04,
installed uvcvideo, mjpg-streamer and had the same result 😦 … tried
to tun other applications like motion, uvccapture, etc, but no luck!
The only thing that worked was using luvcview, don’t really know why,
probably is not using uvcvideo but something else 😦
Can you please give me some guide lines, has I am now completely lost
… I’ve tried so many things now! Even installed Sonix SN9C2XX
drivers but no luck!
#18 by Petri on May 22, 2008 - 8:21 am
Hi, thanks for the great instructions. This was more or less the fastest setup of webcam I have experienced on embedded system.
Now that I got the webcam up and running, of course the appetite grows. I want to use the camera as baby monitor for our newborn. However, while the multipart JPEGs are good enough solution, I am still missing the audio.
Have you got any pointers how to get usb audio support included into the package, and how to stream that? I have tried to google for success stories on live audio streaming, and for getting vlc running on the box, but I havent had luck in finding any.
All help and pointers appreciated!
#19 by johnarthur on May 22, 2008 - 9:33 am
I’m afraid I haven’t found anything useful on usb audio, although I can’t claim to have looked into it in great depth. The camera can capture sound alright, but the UVC spec for MJPEG streams doesn’t include audio. The more complex H.264 streams include audio, but the camera can’t generate them. It must make the audio available on a seperate stream, possibly in a proprietary format.
#20 by Nelson Neves on May 23, 2008 - 3:15 am
Hi again, I’m back with some more tests for Microsoft LifeCam NX-6000 and it seems to be working fine but needs a lot of work! I’ve decided to test everything on my desktop Linux Ubuntu 7.10 version and started from zero. I’ve downloaded uvcvideo driver from SVN, compiled them and installed into the kernel (don’t forget to remove the previous version first). Also got the latest v4l2 (video for linux v2). My next step was to get the latest versions of fswebcam, uvc_stream, uvccapture, mjpg-stream and motion from their respective SVNs. After applying ‘./configure’, ‘make’ and ‘make install’ I have started my tests with reasonable success! (note: to install motion also required to compile ffmpeg)
Where is my report on the tested apps:
– fswebcam (snapshot)
1280×1024 (fps=5)
1024×762 (fps=5)
800×600 (fps=15)
640×480 (fps=15)
320×240 (fps=15)
Had some errors but images where saved! Image where dark but probably because they were taken in house with bad illumination.
– uvc_stream (streaming MJPEG)
1280×1024(ignoring unsupported resolution – setting default 640×480)
1024×762 (ignoring unsupported resolution – setting default 640×480)
800×600 (ignoring unsupported resolution – setting default 640×480)
640×480 (fps=15)
320×240 (fps=15)
Can not set resolution > 640×480 (probably app limitation)
– uvccpature (snapshot)
ERROR opening V4L interface
It seems this apps is still using old version of Video4Linux and can not communicate with webcam
– mjpg-streamer (streaming MJPEG)
It seems to be working fine but can not get image, always blank!
– motion (streaming MJPEG)
1280×1024 (fps=5)
1024×762 (fps=5)
800×600 (config image height (600) is not modulo 16)
640×480 (fps=15)
320×240 (fps=15)
Finally it’s working fine! Just have one small error, can not use resolution 800×600, but all others resolutions are ok and the streaming is quite nice!
Well, now that I’ve tested successfully the webcam on my desktop I am going to try this on my slug with linux debian! Would like to use openwrt image but since debian is a little more generic will try this first!
Once again, thank you ‘johnarthur’ for your emails and support. Sorry for the long post! I know this is not directly related with your post but I think this would help someone to make a better choice on the webcam! My advice to those people would be to buy the Logitech Quickcam Pro 9000. 😉
#21 by Graham on June 12, 2008 - 7:03 am
Thanks for this! I eagerly await my 9000 camera and NSLU2 from eBuyer here in the UK.
I hope to use it on a “telepresence” vehicle I am building to let my son (in NZ!) explore our UK garden.
So I would like to add extra functions –
i2c bus, rs232, I/O ports etc and a USB WiFi dongle if this is possible.
As a “Lesson 1” beginner I have played with Linux on the the cheaper Sweex router
See http://www.sunspot.co.uk for some notes.
I would very much appreciate beginners level info on the tool chain / build process for your webcam functions and then hope to add the other features.
I wonder if you have any idea of the total current drawn at 5V for the camera and NSLU2?
#22 by johnarthur on June 12, 2008 - 10:01 am
The toolchain/build process for OpenWrt is really pretty simple: see http://wiki.openwrt.org/OpenWrtDocs/BuildingKamikazeHowTo. It just takes a few hours. What gets tricky is staying on top of the problems that arise as OpenWRT evolves, and the only way to do that is to read the forum posts. For example, at the moment I’m basing everything on build r10861, because at some point just after that USB auto-mounting broke and no-one has fixed it yet. I’ll try to write up some more notes on this, but I live in hope that eventually there will be a stable OpenWRT snapshot released that can be used.
The current draw at 5V is 600-1100mA depending on whether the camera is running or not. If you are thinking of running it from batteries, see my most recent post, https://johnarthur.wordpress.com/2008/06/08/an-efficient-voltage-regulator/
#23 by Nelson Neves on June 12, 2008 - 9:20 pm
Hi Graham,
I’m building a remote controlled Robot (not using linux yet, but hope to make one in near future) and also using Microchip PIC microcontrollers has you are! Please have a look, you may find some good ideias for your project: http://www.botdream.com/
#24 by Graham on June 17, 2008 - 10:20 am
Yes – it runs “out of the box”! – many thanks johnarthur!
The picture is superb.
I used Fedora 7 Linux in VMWare on a MacBook Pro – you have to set the net connection to “bridged”.
I also found the flashing led colours to be a bit different from yours (no real red – just darker orange) – seems I have a newer board.
Now to learn how to extend to i2c etc etc – I wonder how much spare memory I have? – I guess I can boot from a memory stick (?) if I run out.
With Midge Kamikaze on my Sweex router I had to save all the source material because it soon became unavailable. I had better grab a toolchain of build r10861.
Nelson Neves – thanks, I will study it ASAP.
#25 by Graham on June 17, 2008 - 9:15 pm
I find that my Logitech Webcam Pro 5000 also works so I could test 2 cameras. (after adding power to port 2)
I seem to have a lot to learn before I can compile my own. Is it a big job to release a 2 camera version of the firmware?
One Chapter 1 question before I dive in and “RTFM”, apologies…
– can I change the files in your firmware on the Slug by ftp?
– or must I boot from an external USB FLASH to do that? I see I also need an ftp password for that.
My router based system boots from USB FLASH and changing web pages, configs etc is very easy.
#26 by johnarthur on June 17, 2008 - 9:43 pm
The second version of the firmware that does time-lapse photography (available at http://www.mediafire.com/download.php?rl2ko9zdtzk) has a two-camera webcam mode which it will automatically try if it finds two cameras. It only goes into time-lapse mode if it finds a camera and a USB drive attached. So you should be able to use it to try that. The Pro 5000 is supposed to have a firmware bug so it may not work very well…
Theres no reason why you shouldn’t go in over ftp and edit the files that way. You will need to log in over telnet, set a password for root, then connect via ftp as user root with that password.
You can do a lot with the firmware without needing to compile your own; you should look into the ‘ipkg’ commands.
#27 by Graham on June 20, 2008 - 10:22 am
I have loaded the time-lapse version and two cameras will run at the same time.
(Logitech Quickcam Pro 9000 and Logitech Quickcam Pro 5000)
Some early observations:-
Using Firefox on a Mac the streaming option freezes after 10/15 minutes with either the 1 or 2 camera firmwares – either camera.
Safari on a Mac seems to keep on going with the 9000 but the Safari window showing the 5000 freezes after 10 to 20 minutes when it is on port 8080 – but a refresh on the browser brings it up again. Perhaps that is the 5000 bug? However, I then switched the cams so that the 5000 is on port 80 and the 9000 on 8080 and after 50 minutes both are still running. I will do some longer tests.
With single camera firmware the status light stays orange at all times (but SSH and ftp and the web pages all work)
With the time-lapse firmware the status light goes green.
I hope to compile my own firmware eventually but need to learn a great deal first.Before then I wonder if you could point me to the ash scripts etc (and their paths) that control the webcam features? I would like to modify the scripts and add my own features and add some packages. I see that I can modify the web pages and set a fixed LAN address – but I suppose that without my own tool chain and custom build all this must be done again for second Slug.
#28 by johnarthur on June 20, 2008 - 9:17 pm
I’m pleased to hear that the two-camera mode works. The LED should be orange – thats intentional.
The browser issues may well be problems at the browser end; the jpeg-streaming mode seems to give most browsers trouble with memory allocation after a while.
There is only one script that does almost everything; its /etc/init.d/done. Its not that complicated.
#29 by Graham on June 22, 2008 - 9:27 pm
Sorry to bother you with newby questions – but I am keen to run the 9000 webcam on one port and a large networked disk drive on the other. (I gave up on the 5000). I installed Samba on my Sweex router using Kamikaze with no problem but after two days frustration Samba server on top of your firmware is still failing. I wonder if I am missing something? Are you running Samba and if so could you list or email me your smb.conf file and any others that might be critical?
I used
ipkg install samba-server
from
http://wiki.openwrt.org/SambaHowto
I did
/etc/init.d/samba start
and there was no error message, but
ps -aux
does not list samba as a service.
Thank you!
#30 by johnarthur on June 22, 2008 - 9:36 pm
Oh, yes, Samba… yes. It has this amusing trick of silently exiting if it doesn’t like your DNS configuration. You need to give the NSLU2 a static IP, then edit /etc/hosts and add an entry giving a DNS name for that IP address (I don’t know if it has to be correct).
The smb.conf file I used just had:
[Images]
comment = /mnt/usbdrive
path = /mnt/usbdrive
browseable = yes
public = yes
writeable = no
#31 by Graham on June 23, 2008 - 4:56 am
Thanks! – almost that.
I found eventually that the host name in
/etc/config/system
was not the same as in
/etc/hosts.
Such things confuse Chapter 1 students….
#32 by Nelson Neves on June 24, 2008 - 2:08 am
Hi again,
sorry for the ‘out of scope’ post but would like to finalize my unlucky story with Microsoft Lifecam NX-6000. Has I previously posted, this webcam work under linux ubuntu 7.10 (with a lot of hard work), but didn’t work on a NSLU2 running Debian Etch :(. I’ve tested with lots of different webcam applications (all the latest versions from SVNs, compiled in the NSLU2 – also compiled most of the dependencies) but it just didn’t work. There was one time where I was able to get pictures at 1fps at a very low res using motion, but that was it! mjpg-streamer didn’t work either! I also tried OpenWRT, but has I was expecting didn’t worked out!
Now I have just received my new Logitech Quickcam Pro 9000 and it worked out of the box. Just needed to plug-it-in and play! (all the hard work has already been made when testing Lifecam NX-6000). I’m quite impressed with image quality of my new camera. Even under low light conditions, Logitech rocks!
Can not thank you enough for all your support. Keep up the good work!
ps: I had just a small issue using mjpg-streamer when streaming MJPEG to firefox, it stopped streaming after a few seconds. I’ve compiled the latest mjpg-streamer version (R63) and this issue was fixed. Streaming motion-JPEG video 800×600@15fps with mjpg-streamer my slug is only 30% of cpu load and still have some MB free of RAM. 🙂
#33 by johnarthur on June 24, 2008 - 11:45 am
The Pro 9000’s low-light performance is surprisingly good; it works just fine by moonlight which is a bit startling. I presume it just cranks the exposure time way up so anything moving will be a blur.
I’m working on a new post and firmware build that will have the R63 version of MJPG-streamer and the latest OpenWRT trunk. It looks like it will be ready soon but minor issues keep popping up…
#34 by Graham on June 24, 2008 - 10:50 pm
Great to hear that Firefox works. I would really appreciate Samba for the second USB as created by an expert! Mine is OK but not all the time.
And is FAT and NTFS support too much to ask?
Very many thanks for your efforts – this almost a plug and play “distro”. Most sites expect you too learn Linux first – I want to do that – but later!
#35 by johnarthur on June 25, 2008 - 8:26 pm
Alas, I am no expert and know little more of Samba than I have already said. You may find something in the logs – try ‘logread’ and see if it says anything useful. The problems may be because the OpenWRT version of Samba is a rather old one – later versions aren’t suited to embedded devices which is what OpenWRT is aimed at. I suspect that if you really want to run the NSLU2 as a file server the thing to do would be to run OpenSlug or Debian, which presumably will support newer versions.
NTFS support turns out to be one of those things that is not quite there yet; support will be through something called fuse but isn’t working yet under OpenWRT. FAT support may simply be a matter of adding appropriate kernel modules.
#36 by Graham on June 30, 2008 - 6:12 am
I am trying to build my own custom firmware with your web cam drivers and some extras (like i2c etc). I now have a working tool chain but wonder if you can advise on the following points:-
I see you have vsftpd built into the firmware but I had to add it by ipkg after. Do you know where I can find information about how to add it (and Samba too) into the .bin image file?
You say the web cam and video drivers were compiled by yourself. I have one Slug running your firmware and another with mine. Might I be able to copy the webcam related files and config settings from “your” Slug to mine? If so could you say what files they are and where?
(It would be very helpful to thus create a set of files to “graft into” the file structure of any customised OpenWRT Slug.)
Being new to Linux I have had LOTS of trouble getting “make menuconfig” set up to create a .bin file that runs as I want it. When I do a save at the end of make menuconfig I assume I create a file containing all my settings. I have yet to find where it is saved – so I also wonder tell me where it is and if you could publish or email yours so I can see what I really need and what is not needed.
For example in dmesg I see on mine –
“Warning: unable to open an initial console.”
but on yours i see –
“console [ttyS0] enabled”
and I want to add an rs232 port next!
Sorry if I ask too much…
#37 by johnarthur on June 30, 2008 - 8:13 pm
I’m afraid I did everything through ‘make menuconfig’ on trunk builds and I don’t know where it saves settings. I wouldn’t assume they are all in one file, though. When I say everything, I mean the video drivers, vsftpd, and so on. They are all selectable in menuconfig with the current trunk. There is a list of all the packages I used in the time-lapse build at https://johnarthur.wordpress.com/sources/time-lapse-camera-details/; you should be able to use that as a guide to what to select and deselect. Its smart about prerequisites, too; if you select ‘mjpg_streamer’ under “Multimedia” it should automatically select the Kernel->Video->kmod-video-uvc and kmod-video-core for you.
Your last remark about a console warning makes me wonder what revision you are building; that sounds like a bug that was in the 7.09 release that was fixed a long time ago in trunk. Have you followed the sequence described in http://wiki.openwrt.org/OpenWrtDocs/BuildingKamikazeHowTo?
#38 by janne5011 on July 5, 2008 - 8:53 am
Hello using it with a “optia cam live!” and it works fine.
Thanks for your work.
/j
#39 by wiese on July 10, 2008 - 11:57 pm
hello.
it would be great if you could include owfs (owfs.org) into your image.
if you do so, it would be very easy to remote power on lights or meassure the temperature.
regards,
wiese
#40 by craigotoole on August 17, 2008 - 4:26 am
Thank you soo much for doing this fine work.
worked first go after spending hours trying to make it work with the latest openwrt and not having the correct kernel version. Wish I found your site long ago!
using a “046d:08c9 Logitech, Inc. QuickCam Ultra Vision”
and it worked perfectly first time!
Cheers
Craig
#41 by Joe KI7WV on August 25, 2008 - 10:10 am
John, thank you for taking the time to make the images for the slug and sharing them. I have two QuickCam Pro 9000 cameras; one pointed north and one pointed south, for weather observation, using two different slugs which are powered through the USB to allow for auto power restart.
One camera will run for a while and then freeze up; the slug can be accessed through ssh and rebooted but the camera does not return an image. All is well with the other.
Is there a mechanism to reset or restart the webcam that you can think of? There is no reset that I can find in the in_uvc.so plugin. I have looked for ways to power down the USB connection that the webcam is plugged into, but do not find anything in the slug wiki.
Again, thanks! – Joe KI7WV, Tucson AZ
#42 by johnarthur on August 25, 2008 - 4:20 pm
I don’t know of any way of resetting just the webcam – which doesn’t mean there isn’t one. At worst, the hardware mod and rtcalarm tool that I use in “A Battery-Powered Time-Lapse Camera” could be used to make the entire NSLU2 and the camera power down and up again, which would certainly clear the problem, but is perhaps a bit violent.
It may seem that the camera is failing, but that might not be the case; the USB2 interface can go bad at the NSLU2 end. The cause of that might be the NSLU2 – or the power supply. As you have two systems, I would suggest swapping cameras, NSLU2’s, and power supplies with the working system to see if the problem can be isolated to one component.
Hope this helps…
#43 by Joe KI7WV on August 26, 2008 - 5:17 am
Thanks for the tips. I was planning to install the rtc mod when I crack the cases to run the jumper from the +5 to the “fuse” location. That seems to be the simplest power on mod.
There is likely a different problem that I failed to mention when I reread my post. The camera that is hanging up is attached to a 10 foot long unbuffered USB cable. It runs for a while then stops; could be power supply, could be camera, could be the USB connection is initially marginal then fails. Now that the cameras are mounted “just so” for the view, will swap first power supplies then slugs to be sure it is the camera.
The RTC really appeals to me to cut power consumption. I only gather an image every five minutes and upload to weather underground; from what I read there would be a nice power consumption savings.
Again, thanks for the help. I will go the RTC route if simple swaps fail. First thing I am going to try is a buffered USB cable.
Joe
#44 by johnarthur on August 26, 2008 - 8:31 am
Ah. I would also be suspicious of the extension cable. I believe the USB 2 standard actually disallows them because the impedance mismatch at the cable junction creates reflections that mess up the receiver. The buffered cable may help, although I don’t know how they are implemented – to comply with the standard it would need to have an internal hub, which could in turn cause power supply issues – so there may not be a good solution other than getting the NSLU2 closer to the camera.
Good luck with it.
#45 by craigotoole on September 2, 2008 - 4:48 pm
I am now using 1 NSLU2 with three cameras. USB hubs and repeater extenders work fine. Both ports are powered on my slug. I have used Orbits and 9000’s as well now. Happy days!
After a bit of fishing around and noticing that S95done was still running change I made was as follows:
root@OpenWrt:~# cat /etc/rc.d/S95done
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=95
boot() {
[ -d /tmp/root ] &# set leds to normal state
. /etc/diag.sh
set_state done
killall httpd
/sbin/mjpg_streamer -i “input_uvc.so -d /dev/video0 -r 960×720” -o “output_http.so -p 80 -w /webcam_www” &
/sbin/mjpg_streamer -i “input_uvc.so -d /dev/video1 -r 960×720” -o “output_http.so -p 1080 -w /webcam_www” &
/sbin/mjpg_streamer -i “input_uvc.so -d /dev/video2 -r 960×720” -o “output_http.so -p 2080 -w /webcam_www” &
/sbin/mjpg_streamer -i “input_uvc.so -d /dev/video3 -r 960×720” -o “output_http.so -p 3080 -w /webcam_www” &
}
root@OpenWrt:~#
Now I can access up to three webcams (obviously bandwidth will be consumed, but if I just want to snapshot things, then this is not a problem.) You can add more by copying the line and changing the video device and port.
Note the ampersand at the end of the lines, this fixed the locking up of the start script.
I have also seen a version of startup-script for mjpg_streamer somewhere, but the above works just fine.
John, if you post up how to do this from scratch, I might try to get it going on the WL-500P as well because it’s harder to get NSLU2s now. It would be really ideal to run this up on the current openwrt strand but I haven’t seen the UVC kernel modules, so I guess there is work ahead to get it together…
#46 by johnarthur on September 2, 2008 - 8:07 pm
I wondered if this was possible either by using hubs or the extra USB ports, glad to hear that it is. I presume you are using a powered hub as three cameras would probably be running the stock PSU a bit close to the wind; it doesn’t seem to be all that reliable under normal loads let alone what would be close to 2A.
The WL500gP looks as though it is the only reasonable successor to the NSLU2, but it has its own problems with two versions of the board, etc. I don’t need to build another system, so I won’t be pursuing it, but I can’t see why it wouldn’t work. The next OpenWRT release may make it very simple…
#47 by Graham on September 3, 2008 - 3:32 am
I wonder if you have yet prepared this version with the driver that does not lock Firefox when streaming?
I have not managed to duplicate your magic and would very much appreciate a copy.
#48 by johnarthur on September 3, 2008 - 8:37 pm
You could try the openwrt-nslu2-uvc-webcam3.bin build from “A Battery-Powered Time-Lapse Camera” – it will behave in the same way as the original if it sees a single camera and it has a later version of the MJPG-streamer code in it. Its available at http://www.mediafire.com/?zgzvbjnwvmd.
#49 by craigotoole on September 14, 2008 - 5:24 pm
For the benefit of the readers, no I am not adding any additional power to the system. There seems to be enough grunt from the 2A 5V for two cameras (my stable system) and one of the cameras is on a USB extension (single port hub) which must use some power as well given that it actually gets a little warm.
It has been working well 24*7 for some time now. Since my second post three weeks ago. and I have not observed any problems.
My first go at this is now monitoring the carpark at work to solve a little dispute. I have been grabbing a screenshot every minute and ffmpeg it to a movie file for each day. Time lapse is very interesting indeed. (Like your cat, I have found that the rabbits that live around the carpark are also a little furry around the edges)
I save all of the jpegs with the unix time as the name in another script. ffmpeg required the frames are numbered sequentially from 0, so I re-number them first.
My code to do the laps is a follows:
#!/bin/bash
cd /home/craig/lapse
for i in *.jpg; do echo $i ; done |sort -n |awk ‘BEGIN { loop=0 }{ system (“cp ” $0 ” temp/” loop “.jpg”) ; loop++}’
rm -f output.mp4
ffmpeg -r 10 -sameq -i temp/%d.jpg output.mp4
#ffmpeg -i temp/%d.jpg -acodec libfaac -ab 128kb -vcodec mpeg4 -b 1200kb -mbd 2 -flags +4mv+trell -aic 2 -cmp 2 -subcmp 2 -s 320×180 -title X ipod.mp4
for i in temp/*.jpg; do rm $i; done
There is a bit of disabled extra code in there for making ipod movies, however I have not got that to work yet because I don’y know where to get the libfac codec yet….
#50 by craigotoole on September 14, 2008 - 5:26 pm
BTW: the jpegs are downloaded to another linux machine (Centos 5.2) and the script is run there, I fear my NSLU2 would scream and run away if I ran ffmpeg on it.
#51 by Graham on September 27, 2008 - 3:47 am
As suggested I tried openwrt-nslu2-uvc-webcam3.bin and the streaming now runs as long as you want in Firefox on Mac (many thanks again).
However even if you close the tab or the window it keeps on streaming in the background! – you have to close Firefox.
It is OK in Safari on Mac and Firefox in Linux.
#52 by Graham on September 27, 2008 - 3:52 am
If you want “limitless” power on the USB I suggest the mod that makes the slug boot up when the power starts.
I made a note here
http://www.sunspot.co.uk/Projects/SWEEX/slug/notes/notes.html
Mine runs with Debian and OpenWrt – no smoke yet.
#53 by Darren on October 1, 2008 - 2:46 am
Hello again…
I have converted my 2nd NSLU2 for this purpose, along with a brand-new Logitech Quickcam Pro 9000. Works great, as expected. However, I also want to plug in a USB GPS device, and run the GPSD demon.
When I use the standard ipkg repositories to get ‘kmod-usb-serial-pl2303’, I gets the *wrong* one — apparently for kernel version 2.6.26.3, instead of 2.6.24.2 — resulting in an ‘invalid module format’ when I try to ‘insmod’ it. I could not find a nice source of packages for 2.6.24.2. Will this project be upgraded to use 2.6.26.3 instead, so that other packages are compatible?
#54 by johnarthur on October 1, 2008 - 7:26 pm
I’m afraid I don’t intend to keep updating this project to chase the current kernel – I had a specific job in mind and it now does what I want. Having said that, the openwrt-nslu2-uvc-webcam3.bin build mentioned above is based on a more recent kernel – I think its 2.6.25.7. That might help, but if it doesn’t I’m afraid you will need to build from a current trunk yourself. Sorry.
Some day soon, perhaps, Kamikaze 8.10 will come out and give us a more-or-less stable platform to do all this useful stuff on…
#55 by Graham on October 9, 2008 - 7:41 am
This site got me into the Slug and the HD webcam – but you soon get hooked on this drug!
So I am now on Debian Slug with massive hard disk and a HUGE range of programs available. I also (at last) managed to get the Quickcam 9000 to run on my Debian Slug. So now I can break free of Guru johnarthur (with many many thanks!!).
I am new to Linux and anyone else as green as me may like to see simple minded notes at –
http://www.sunspot.co.uk/Projects/SWEEX/slug/notes/Debian_notes.html
This is mainly done for my failing memory so I can repeat the process with a second Slug but also I get lot of ideas from readers who email me.
#56 by Mike on November 14, 2008 - 8:18 pm
Thank you for putting this image together. It took < 10 minutes to get my Quickcam Orbit MP up and running with my NSLU2. Now, if I can only figure out how to get the pan/tilt controls to work with M-JPEG streamer…
#57 by Loesje on November 20, 2008 - 4:39 am
Thanks! Amazingly easy setup!
#58 by Graham on December 1, 2008 - 8:49 am
After running well for weeks my pictures now stop after 4 to 9 hours or so.
When I “ps aux” I see no lines like
2322 root 7488 S mjpg_streamer -i input_uvc.so -r 960×720 -b -o output
(there are normall 4 of these {why?} )
A reboot fixes it.
Is anyone else seeing this? – (original johnarthur image)
#59 by Graham on December 1, 2008 - 8:51 am
Further to the above – I thought I would cron a reboot every 4 hours or so – but I see no cron. Is it hiding or just not present?
#60 by johnarthur on December 2, 2008 - 7:53 pm
I’m not sure cron is present; OpenWRT tends to leave things out unless you ask for them, and I didn’t need cron for anything. You could presumably track down which package its in and add it. As for the source of the problem, I can only speculate. There are normally four mjpg-streamer tasks because it uses seperate tasks to read, write, process frames, and, uh, something else…. If they all disappear its because the main task exited and shut down the others. Camera issues could cause that. There would be no harm in running the openwrt-nslu2-uvc-webcam3.bin build which has the later mjpg-streamer and is entirely compatible; it might help…
#61 by Gabor on January 16, 2009 - 3:14 am
Hi!
My hardware: asus wl500gp and Quickcam pro 9000 and 4gb pendrive.
If the motion program rounning in router, then cpu is pretty much speed?
Is it working with two quickcam 9000 fine?
Thank you!
Good work!
#62 by johnarthur on January 16, 2009 - 7:24 am
I don’t know much about motion, or the WL500gP. I have not tried it. I believe motion is too difficult for the NSLU2, especially with two cameras, unless you reduce resolution to 320 x 240 and frame rates of about 2 fps. The WL500gp is very like the NSLU2, so I would expect it to behave the same way.
#63 by paul on January 16, 2009 - 3:23 am
saw this post and bought a NSLU2 and 2 logitech 9000’s on Amazon 2 days ago. opend boxed last night and followed instructions and post replys .. in 30 minutes i had 2 cameras streaming to the internet via port forwarding. … which includes flashing all 3 versions, de-underclocking and powering second USB port. my next job is to make outdoor enclosure to make the cameras weather cams for weather underground. this is GREAT stuff john! many thanx!
#64 by Gabor on January 16, 2009 - 8:36 pm
Thank you!
My ideas, working motion and 1 or 2 Logitech 9000 cam(s).
If possible 5 fps and 640*480res.
I try it and report for u.
I want to use this system to the automatic security system.
Record all motion to the pendrive.
Gabor
#65 by johnarthur on January 16, 2009 - 8:49 pm
I would be interested to hear how you get on – I wondered about this approach myself, but decided I wanted the high resolution and that it had to be long-term reliable, which might be difficult with something that pushed the limits of the hardware.
#66 by Gabor on January 16, 2009 - 8:40 pm
question (another system):
I use Powershot A80, and creating .jpg files.
How to create .mpg or .avi from .jpg?
I found 2 code: ImageMagick or images2mpg
This programs working?
Anybody use this tool?
Gabor
#67 by johnarthur on January 16, 2009 - 8:47 pm
I used Apples Quicktime Pro to do the .jpg -> .mpg conversion; see https://johnarthur.wordpress.com/2008/05/24/a-megapixel-time-lapse-camera-system/. It does a nice job, although I had to do some script work to manipulate the file names into the form it wanted
#68 by Rico on February 18, 2009 - 7:43 am
Hi johnarthur,
Thanks for the howto. I have exactly the same hardware and have tried openwrt-nslu2-uvc-webcam1.bin but the unit’s Ready/Status light becomes solid amber after reflashing. And I couldn’t access to it because I couldn’t find any ip for it (throught the dhcp server’s client list)
I’ve also tried the openwrt-nslu2-uvc-webcam3.bin through which I was able to find the ip, telnet and ssh to the NSLU2 but the Ready/Status light stays teady red. And the httpd is not running.
(netstat -na|less shows only TCP ports 21, 22 and UDP port 123 are open). /etc/init.d/httpd start or /etc/init.d/httpd restart didn’t make a difference.
My quickcam pro9000 can be detected though when connected to the NSLU2, but I just can’t do nothing without the httpd on NSLU2 being up. Help … Anyone? Thanks.
#69 by johnarthur on February 18, 2009 - 7:58 am
There must be some hardware issue; the boot log would be the thing to check. It sounds as though mjpg-streamer can’t find the camera. You wouldn’t be using it through an extension cable would you? The other possibility with the NSLU2 is always power supply issues; swap the power supply if you can…
Hope this helps
#70 by Rico on February 18, 2009 - 8:02 am
Never mind everyone. Actually I found openwrt-nslu2-uvc-webcam1.bin is working. It’s just the amber status light makes me think something is wrong.
#71 by oropiotis on February 27, 2009 - 8:09 pm
please, i have unslyng for firmware, but with your guide i decide to begin with your firmware to test my old creative webcam and a n old crypto cam.my question is if with new firmware can install and run rtorrent and how? CONGRATULATIONS for youw perfect work and for your comments, because all help us very much.sorry for my broken (greeklish) english…
have a nice time
#72 by johnarthur on February 28, 2009 - 4:35 pm
I’m afraid I know very little about rtorrent or other cameras. I can say, though, that the mjpg-streamer software that my build uses works only with UVC-compatible cameras and will not work with an old creative webcam… sorry I can’t be more helpful, but this may not be a good place to start…
#73 by Darren on March 1, 2009 - 11:50 am
Hello again! My last post was on Oct 1/2008.
http://downloads.openwrt.org/kamikaze/8.09/release.txt
“The long awaited 8.09 release is finally done.”
Does this help to encourage you to package a new version? If you recall, I desired an environment where not only my Logitech 9000 would work, but would also have properly-matched kernel packages for other stuff, like ‘gpsd’ (and ‘gphoto2’). It looks like 8.09 would give that, right?
I notice Debian “Lenny” 5.0 is also out now, but I would rather not give the ‘lean and mean’ system that you have created, just to get this extra functionality 🙂
#74 by johnarthur on March 1, 2009 - 1:40 pm
Well, the trouble is that my NSLU2 is now installed in its remote location doing the job I wanted… and its kind of difficult to get to. I’m going to try to acquire another one, but thats also bit difficult as they don’t come up secondhand very often. I was hoping that something newer and better would come along, but instead there seems to now be nothing on the market that can do two hi-res IP cameras out of the box with the simplicity and power consumption of the NSLU2…
#75 by Darren on March 2, 2009 - 2:40 am
I wish that one of the newer crop of wireless routers would stand out from the crowd at a reasonable price — one of the ones with usable USB ports. THAT would be a nice substitute for the NSLU2! Otherwise, this recent product announcement caught my eye:
The Marvel SheevaPlug:
http://www.engadget.com/2009/02/24/marvells-sheevaplug-linux-pc-fits-in-its-power-adapter/
It sounds like it would be VERY reasonably-priced, and much more powerful than the NSLU2 — all in very compact package. I am very much hoping that the OS hackers/packagers (including yourself) would get involved with something like that 🙂
In the meantime, no dice on Kamikaze 8.09?
#76 by johnarthur on March 2, 2009 - 8:47 am
The SheevaPlug is indeed an interesting device. It has an FPU, which means that at 1.2GHz and with 512M it could do motion detection on hi-res JPEGs all on its own, something the NSLU2 couldn’t aspire to. It should be able to run ZoneMinder (!) If Marvell actually release open-source support for it (something they haven’t been inclined to do in the past for their products) it will be quite a platform.
>> Later correction; the Sheeva CPU does not have an FPU, or at least I can find no mention of it in documentation that would mention it if it was there. Its focused on low power consumption, so thats not much of a surprise. Its still a very quick device, so how much decoding big JPEGs would bog it down is an open issue…
> In the meantime, no dice on Kamikaze 8.09?
Not without hardware to test it on, no…
#77 by Darren on March 2, 2009 - 12:04 pm
Well, all the rhetoric I read on the web about this new ‘SheevaPlug’ suggest that Marvel wants to encourage full development by the open source community. Here is one ref:
http://www.slashgear.com/marvell-sheevaplug-99-linux-pc-hidden-in-a-wall-wart-2435556/
‘Meanwhile expect the SheevaPlug to find plenty of new fans among the open-source community; it’ll play nicely with “multiple standard Linux 2.6 kernel distributions”.’
This multi-link page mentions the word ‘open’ numerous times as well:
http://techblips.dailyradar.com/story/marvell_sheevaplug_99_linux_pc_hidden_in_a_wall_wart/
If true, I would encourage you to participate! 🙂
#78 by Darren on March 4, 2009 - 7:09 am
Just a footnote to my recent postings…
I was able, install, and configure the latest ‘Kamikaze 8.09’, along with (ultimately) ‘mjpg-streamer’. I did experience an initial roadblock i.e. the NSLU2 booted with a fixed IP address of 192.168.1.1, so I had to work around that. As well, I wasn’t quite sure of which packages to install for the webcam to work again, so I probably overdid the package installs a bit.
I haven’t yet been able to get the *other* stuff running that I wanted, but at least I have the webcam back! 🙂
#79 by Graham on March 21, 2009 - 9:21 pm
I posted above and was inspired by this work!
I have now managed to run the OpenWrt and the M-JPEG streamer software on a new board that takes only 1 Watt of power, is cheaper than the Slug, and seems perfect for a dedicated Quickcam Pro 9000 controller. I have put up some notes at –
http://www.sunspot.co.uk/Projects/sweexproject.htm
See the “Bifferboard” link
I just used standard OpenWrt drivers. However the use of the “opackages” is a bit more complex so I will put up ready-made driver packages if any reader needs them.
But long live the Slug too!
#80 by Nelson Neves on March 25, 2009 - 2:44 am
Slug will always be present in our life, It’s the best piece of equipment that I ever used to learn embedded Linux the old way. I’m also trying new embedded devices but always use Slug with Linux Debian has my test system (porting work/solutions is really quick).
Long live the Slug and the guys that have really good ideas for it, John Arthur, Graham and all of you that have reached this blog! … and probably myself when I have some spare time to make some tutorials 😛
Regards!
#81 by Rico on June 26, 2009 - 4:25 am
Hi johnarthur,
I wonder if you can give me a bit advice on where I can find information about flipping the output of mjpg_streamer. I need to flip the output image/video because the webcam will be mounted on the ceiling which makes the images upside down. I am thinking (actually working on) about flipping the output stream real time with Javascript but then I will have two new problems:
1. Flipping image(s) with js might take up significent computing power on the client machine.
2. I still need to flip the snapshot or video stream if I need to save to record them.
Therefore I think the ideal solution would be to find a way to flip the image(s) before sending through http output.
Regards,
Rico
#82 by johnarthur on June 27, 2009 - 9:50 am
I’m afraid I haven’t looked at this, so I can’t offer anything helpful. I strongly suspect you will need to do it at the host end as the NSLU2 does not have the computational power or time spare to manipulate the JPEGs, even to do something as apparently simple as image inversion.
#83 by volpoca on October 7, 2009 - 7:25 pm
Hi,
I have installed the image “openwrt-nslu2-uvc-webcam2.bin”,
switched to static IP and modified etc/init.d/done (#One camera; run one web page) as follow:
-o “output_http.so -p 9998 -w /webcam_www”\
I can now access the NSLU2 locally with Firefox (http://192.168.0.11:9998)
but access via internet (http://example.no-ip.org:9998) is not possible.
A Linksys wvc54gca ip camera with the same configuration work without problems.
Can you help me?
Thank you and best regards,
Gianpaolo
#84 by johnarthur on October 7, 2009 - 7:35 pm
If you can see it locally its working correctly; your problem must be a firewall or DNS name lookup issue. You should look at the error message you get when you try to access it via the internet – does it claim that the address doesn’t exist (name lookup problems) or that it can’t find a server there (firewall problems).
#85 by volpoca on October 19, 2009 - 3:22 am
In /etc/config/network I added:
option gateway 192.168.0.1
option dns 192.168.0.1
and now all works fine.
Thank you again,
Gianpaolo
#86 by Chris on November 1, 2009 - 4:46 pm
Thank you for this great information. I’m looking to purchase a webcam and I was considering the one you mentioned here. I have a nslu2 w/ the unslung firmware installed. do i have to do anything different?
thanks
chris
#87 by johnarthur on November 2, 2009 - 8:02 pm
I’m afraid I haven’t used Unslung, so I can’t comment with much authority, but the process of replacing it with the OpenWRT firmware should be identical to replacing the original firmware.
#88 by volpoca on November 22, 2009 - 2:39 am
Hi,
I tested with success two Logitech webcams:
C 300 (1.3 Megapixel)
C 600 (2 Megapixel)
The C 600 has very good image quality. Both cameras are suitable for modifications: if you unscrew the lens assembly the ir-filter remains in place.I mounted the c 300 circuit board (without lens) in a box camera enclosure with cs-mount lens.
Regards,
Gianpaolo
#89 by phepner on November 22, 2009 - 2:56 am
I needed a pretty small camera head so got a Microsoft Lifecam Cinema. Works very nice.
#90 by johnarthur on November 22, 2009 - 8:21 am
It looks as though a lot of decent cameras are coming out these days. I have recently tried a Logitech S5500 which is not bad; its a 1.3Mpixel that does the same 960 x 720 movie resolution as the Pro 9000. You get what you pay for though; pointing it and the Pro 9000 at the same scene at the same resolution demonstrated that the 9000 was picking up more detail.
#91 by Robert Smtih on December 28, 2009 - 7:54 pm
Thanks for all your hard work. I tried to make a standalone webcam with the vanilla kamikaze 8.09 firmware I found on the OpenWRT website (adding what I thought were the required packages) to no avail, stumbled across your website and gave your firmware a shot and had instant success.
If anyone is looking for a budget UVC cam to get them by until they can afford a nice one, I can report that the Logitech C120 ($19.99 USD at Frys) is also working out of the box with the v1 firmware.
#92 by Mark Pettitt on June 25, 2010 - 11:14 pm
After loading the firmware openwrt-nslu2-uvc-webcam1.bin, I have not been able to access the web page on the nslu2 using http:// with the correct ip address.
Do I need to install a web server first?
Sorry for the novice question.
#93 by johnarthur on June 26, 2010 - 8:39 am
No, you don’t need to install anything else. If the LEDs are doing the right thing, the most likely thing is that you aren’t looking at the right IP address. After that I would check your LAN cable.
#94 by Graham Marshall on December 8, 2010 - 2:18 am
I have had this system running fine for years now! Many thanks.
But I want to set up a second system.
The basic install still works but the ipkg source is dead
http://downloads.openwrt.org/snapshots/ixp4xx/packages
Can you offer any advice on an alternative that fits the vintage of the root software?
#95 by johnarthur on December 15, 2010 - 7:39 pm
I haven’t tried this, but would http://downloads.openwrt.org/kamikaze/7.09/ixp4xx-2.6/packages/ work?
#96 by Graham Marshall on January 3, 2011 - 9:21 am
I am using openwrt-nslu2-uvc-webcam3 but with busybox replaced from my long time working slug with openwrt-nslu2-uvc-webcam 1 or 2 – that gives me a working web server. I now need to get php to run but have failed so far.
I found
http://kamikaze.openwrt.org/7.07/ixp4xx-2.6/packages/
and these load but even nano fails to run
Since it is the latest version of your firmware I wonder if I should use 8.09?
#97 by krystian on January 24, 2011 - 9:51 pm
Hi John Artur,
I want to setup a ‘cluster’ of small devices with cameras attached [since NSLU2 is long gone from shops and all I can see are used ones I will probably use one of the routers with 2USB ports] where every device runs a ZoneMinder installation and is controlled by a single ZoneMinder.
You’ve mentioned in your original post that connecting IP cameras to devices like NSLU2 won’t work well because ZM have to decode the JPEG it gets into other format and that is NOT the case with usb cams.
My question is… is it possible to setup ZoneMinder on a device like NSLU2? Will it allow streaming and previews of the events? I don’t want video encoding and nothing like that. The output stream would be in (m)jpeg format.
Thanks in advance,
Krystian
#98 by michaelhamel on January 25, 2011 - 7:26 am
Something as small as the NSLU2 can’t run ZoneMinder, but there is another package called ‘motion’ (see http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome) that I believe will run on routers under OpenWRT. Alternatively you could look at something just powerful enough to run Zoneminder; the Marvell SheevaPlug in its various incarnations (http://www.marvell.com/platforms/plug_computer/) looks like a good candidate. I’m interested in both of these possibilities but havn’t found time to pursue them…
#99 by Graham Marshall on January 25, 2011 - 8:50 am
Having run the original johnarthur firmware for years (many thanks!) I needed to add a web site to the image file with cgi scripting so I could control i2c devices linked to the Slug.
I have learned to do this with Python. My first attempt is in an image linked from my notes here –
http://www.sunspot.co.uk/Projects/SWEEX/slug/notes/shaft_10_update.html
It uses the more recent Openwrt 8 so it can be updated – the original ipkg site for the images here no longer exists.
I also managed to build a tool chain so I could compile some C code – links on my site.
Please say if it works for you!
#100 by Enok on March 25, 2011 - 12:37 am
Great work, thank you so much! I installed the openwrt-nslu2-uvc-webcam1.bin two days ago and it worked instantly. I build some homebrew trail cams with old sonycam’s, but the idea of live view got me to your site. I am trying to build a battery powered livecam which is build for outdoor long time running. The idea is to power it by battery and solar. I am thinking about a combination of nslu2 and a wireless mobile 3G router with usb hsdpa/umts modem. The main problem is the power consumption of all this parts…so a looked around and found some interesting articles about debian etch driven nslu2’s running directly usb hsdpa/umts modems…but now further instructions for oprnwrt. Can anyone say if it would be possible to run such a modem on an nslu2(openwrt) on usbport #2 !? Or does anyone has knowledge to ad this functionality to openwrt-nslu2-uvc-webcam1.bin!?
Many Thanks advance, Jens
#101 by michaelhamel on March 25, 2011 - 7:32 am
These days I would take a close look at the Seagate Dockstar (http://wiki.openwrt.org/toh/seagate/dockstar) and motion (http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome) which should do this with about the lowest power consumption practical (which is still more than I would like…).
#102 by c.cobb on April 1, 2011 - 5:06 am
Thank you, johnartur, for starting this; it’s great to see this is still active 🙂 I’m starting to experiment with these same issues also. Sorry if this is going off-topic, but this is all fascinating!
@Enok/Jens: What type of battery / solar system are you using? And, specifically, what type of connection from the battery to the camera? I was able to google info about solar chargers for 6-volt golf cart batteries, and 12-volt car batteries, but have not figured out how to complete the connection to a device.
http://www.siliconsolar.com/solar-battery-chargers.html
6 Volt Solar Charger 7 Watt $40.00 12″ x 14″ x ?” — 10 yr warranty
12 Volt Solar Charger 7 Watt $35.00 13″ x 18.5″ — 10 yr warranty
http://www.batteryprice.com/6voltsealedleadacidbatteries.aspx
6 Volt Sealed Lead Acid Batteries, from $10 to $70
http://www.batteryprice.com/12voltsealedleadacidbatteries.aspx
12 Volt Sealed Lead Acid Batteries, from $16 to $110
As for outdoor pan/tilt/zoom cameras, I’m trying to find something that’s good but is less expensive than the Axis cameras, and that works with ZoneMinder and motion software. I pieced together the following, but maybe someone knows a better system? All together, this still adds up to over $550 per camera, but the 50mm lens might make it worthwhile.
http://www.cisco.com/en/US/products/ps9945/index.html
Linksys PVC2300 Internet Video Camera $250.00
http://www.bhphotovideo.com/c/search?Ntt=FUYV10X5BS&N=0&InitialSearch=yes
Fujinon YV10x5B-SA2L 5 to 50 mm f/1.3 Lens $120.00
http://www.govgroup.com/pelco_eh4718_outdoor_enclosure-1037589-prd1.htm?pSearchQueryId=185418
Pelco EH4718 Outdoor Enclosure $138.00
http://www.govgroup.com/pelco-pm105-pan-tilt-wall-mount-2266152-prd1.htm?pSearchQueryId=185418
Pelco PM105 Pan & Tilt Wall Mount 84892U $ 55.00
#103 by michaelhamel on April 1, 2011 - 1:48 pm
I hope to post a design for a solar panel charger/supervisor for non-sealed deep-cycle lead-acid batteries sometime soon, as its something I am working on and not terribly complicated.
#104 by JohnDandar on May 16, 2011 - 10:56 am
This is pretty ingenious. I loaded the openwrt-nslu2-uvc-webcam3.bin and worked like a charm. I’ve read through and from my understanding, webcam2.bin is capable of a 2 camera setup but what is the difference between webcam1.bin and webcam3.bin? In the meantime, I do have a seagate dockstar which is capable of running OpenWRT and it has 4 usb ports as well as a more powerful processor than the NSLU2. However, I have no idea how I would go about getting this to work on a dockstar…. I’m sort of keen on the loading .bin onto unit, connect camera and off you go 🙂 Much thanks for sharing.
John
#105 by michaelhamel on May 16, 2011 - 1:41 pm
webcam3.bin adds the ability to do time-lapse mode; it knows how to turn the NSLU2 on and off if you do the hardware mod. This saves a lot of power if you only want a photo every twenty minutes and you are running on batteries, but isn’t otherwise terribly useful. It also has a later version of mjpg-streamer in it which may work better with more cameras, so it is worth trying if you run into any trouble with the single or dual webcam modes….
#106 by Graham Marshall on August 12, 2011 - 7:49 am
Just to report that the Logitech C270 HD webcam works very well.
At about £19 it is cheaper than the Quickcam Pro and seems to be just as good
#107 by Graham Marshall on January 18, 2012 - 5:48 am
I can run two Quickcam Pro 9000s together on one nslu2 with my updated software at
http://www.sunspot.co.uk/Projects/SWEEX/slug/notes/shaft_10_update.html (Openwrt 8)
or a Quickcam Pro 9000 and a Logitech C270 HD
but not two Logitech C270 HD webcams together – only one is seen
Does anyone know why that should be?
#108 by Bob Ball on February 16, 2012 - 8:44 am
Anyone still monitoring here?
I have put the webcam software on a couple of NSLU2s. They work, and Logicam orbit even responds to pan and tilt, though not to the other light commands in control.htm.
Has anyone here succeeded in showing the software how to upload images to Weather Underground? That was my original intention, a way to reuse an NSLU2 after I removed it from weather station service using Meteohub software. Meteohub, mine now running in an Alix 3D3, also has a webcam capacity, but it hasn’t yet recognized the webcam I tried with it.
Wunderground takes webcam images either if they’re FTP’d to its site, or if it’s able to go to a public site and grab the image.
From what I’ve accomplished, one might think I’m somewhat Linux literate. Just enough to follow line by line instructions from JohnArthur, but not to dig in and go beyond.
I’m not asking for such detailed instructions, but I’d like to know if what I’ve put in the NSLU2 has the capacity to do what I want. I have a site I can post images to, if I know how to tell the software what to do.
#109 by darethehair on March 3, 2012 - 10:46 am
Bob:
I don’t do exactly what you are asking, but very close. My entire website runs on a Pogoplug, including my WX200 weather station. My primary ‘weathercam’ is actually an old Nikon ‘Coolpix’ digital camera, which I use to capture an image every 60 seconds (to a file, using a ‘gphoto2’ script). That image is FTP’d to Wunderground using commands in a ‘.netrc’ file (driven by a ‘cron’ script). My secondary webcam is connected to an NSLU2 (running OpenWRT Kamikaze 7.09). The Pogoplug has another cron entry that does a ‘wget’ from the webcam address on the NSLU2, producing another image file. Both images are on my weather page, but only the first goes to Wunderground 🙂
My original plans for my NSLU2’s was for both to run ‘gphoto2’, but I was never able to make them do that. The Pogoplug worked right off-the-bat. Now that the Raspberry Pi is soon to be purchasable, it provides yet another option.
#110 by janis on March 10, 2012 - 10:52 pm
MJPG-STREAMER works great, but would it be possible to add audio like USTREAM does.
Many Webcams from Logitech have a microphone built in. I
I am Using Debian on non Intel boards without graphic interface(Foxboard, NanosG20, Beagleboard). Can not run Windows there.
Tried different stremacast programms, could not get them working. Probably because of noncompatibility with Intel processor.
So would be happy if someone could help with adding audio to mjpg-streamer.
#111 by Bob Ball on March 13, 2012 - 2:56 pm
I get the feeling that this thread and the idea of developing webcam software for the NSLU2 has run its course, unless someone steps up with some interest. I have no knowledge of Linux other than following specific directions to install some software. But I’m curious about Zoneminder, and whether it can be loaded on some new cheap hardware such as Iomega’s IConnect.
My first revelation of using small boxes to do interesting things came from putting weather station software, Meteohub, on the NSLU2. Late last year I put that Linux program on an Alix 3D3, freeing up an NSLU2, and another I’d bought cheap. The Meteohub developer has written his software for several boxes, including that IConnect, and it costs about $60-$70.
So there’s probably little future in trying to get the NSLU2 to do all I might wish. Zoneminder appears to be a more full-featured app in any case.
#112 by Wilbert on May 5, 2012 - 12:34 pm
johnarthur,
any chance you still have the config file for your openwrt build?
#113 by michaelhamel on May 8, 2012 - 8:17 am
I’m afraid not, but its not difficult to reproduce under more current versions of OpenWrt.
#114 by Graham on November 26, 2012 - 11:26 pm
I have now compiled Backfire for nslu2 to run 2 webcams (and a postal scale!)
Please see
http://www.sunspot.co.uk/Projects/SWEEX/slug/toolchain_backfire/toolchain_backfire.html
– bottom of the page.
The Openwrt binary download of Backfire will not run MJPG-Streamer – but mine does!
I also got Blassic basic to compile – but Python-mini is also included too if that worries you…