3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

How to set up a HD webcam on Bifferboard running Debian

How to set up a HD webcam on Bifferboard running Debian
Bifferboard is the smallest size Debian board from
http://bifferos.co.uk/


It's hardware is like for NAS server. But it was not possible to re-program NAS server that it becomes a Bifferboard.
Processor slow, only 150 MHz. RAM 32MB, small too. Power consumption from wallplug with webcam, hub and USB stick 4.5 W.

You can set up a HD webcam using mjpg-streamer using Logitech C510 or C270. My webpage is at

http://85.254.232.139/
http://braze.net63.net/

Motion detector attached to GPIO with an endless  loop in a sh script was not reliable. Looks like there is not enough RAM or there is a Debian bug: when many sh scripts run simultaneously they dissapear from "ps -ef" list. Sometimes it happens after just 10s and sometimes after 7 minutes. Swap file did not help. Might be RAM defect.
Wifi stick worked, but only for some minutes. Same issue.

If size is not an issue then in future projects requiring low power consumption would recommend to use NanosG20. Or for home use use most logical solution would be to set up webcam on a router running OpenWRT, for example  WRT160NL.

Be prepared that Linux programming is not easy. Sometimes you need to search google for hours for a single line of code.
Below are my programming notes that could hopefully help you to set up Bifferboard faster. Sorry that they are somewhat messy.
9 comments
Jan 23, 2012. 4:14 AMvturkovic says:
Hi,
I saw some of your articles and they are all awesome! We have some similar interests so I would like to share one gem of a device I discovered.

It is small TP-LINK WR703N router: http://dev.wlan-si.net/wiki/Routers/TP-LINK/WR703N

You can get it for 25$ and it uses only 0.5W of power. It has 400 Mhz Atheros chip and 32MB of RAM.

And it is tiiiiny ;)

Cheers,
Valent.
Sep 29, 2011. 6:19 AMbifferos says:
Did you run your shell script on another system to test it there? We spent a long time debugging a problem on one Bifferboard, we thought it was a reliability issue, however it turned out there was a bug in the shell script causing it to consume all the memory. it was very subtle. It's easy to do this kind of thing in Shell. If you configure some swap for the debian system it might run for longer, maybe that will tell you what the problem is.

The power consumption listed on the site is for the board only, using only the on-board flash. Obviously we cannot guess what you are going to plug into it , so that's why the difference between 4.7W and 1W. It also applies to the board itself and doesn't take into account the PSU efficiency.

Please note that all Software development is now in Git with kernel 2.6.37.6
https://github.com/bifferos/bb
If you want to play with OpenWrt it's best to look there. There is also an emulator, so maybe you can try to get your project working in the emulator first.

The Famzah site is still the best place for Debian hints.

thanks,
Biff.
Sep 29, 2011. 9:57 AMbifferos says:
:)

When things don't run under crontab it's usually about paths - maybe you can check to see what environment variables are set when the program launches from crontab (cat them into a file or something), and compare with running directly, e.g. add something like:

set > /tmp/my_paths

To the start of the script.
Oct 22, 2011. 4:34 AMbifferos says:
Many people blame the ram, and then find out it's their program, or sometimes the power supply. In the two years we've been selling these we've never found one with faulty RAM. Failures in the field so far have been the serial console, ethernet and sometimes flash memory, but never DRAM. Failures are still pretty rare, 1 in 3-400 units.

One of the problems with running Debian/Slackware instead of OpenWrt on these devices is that those distributions use more RAM. If you don't have swap configured sometimes things don't fail gracefully when you run out of memory. I think you'll find the problem is more about running Linux in 32MB RAM, rather than the Bifferboard itself. This is what I found when running Slackware.

To test things out, I recommend you install VirtualBox. Use it to emulate a system with 32MB of ram, run your application under Debian and just see what happens. VirtualBox gives good USB support, so your webcam should work. When you have everything working in that environment we can look to see what might be different to the Bifferboard system. This is how I prepared the Slackware rootfs on Sourceforge because installing using the Bifferboard would have taken forever, and I had to make some tweaks to Slackware to make it work nicely in 32MB (avoiding use of tmpfs in some places).

Obviously I don't have your webcam, but if you can give me a firmware to try out which doesn't depend on that I can try it on one of my boards. You can also run memtest on your board, there are some instructions here:
http://sites.google.com/site/bifferboard/Home/bootloader/memtest86

cheers,
Biff.
Oct 23, 2011. 5:51 AMbifferos says:
"In summer, using OpenWRT that came with the Bifferboard I could not get webcam running because webcam modules were missing. I tried to compile OpenWRT myself by selecting webcam modules, but after a half day spent, the compilation did not run and I gave up."

About OpenWrt compilation. I've just uploaded a new firmware based on kernel 2.6.37.6 with 2017 packages, maybe the ones you need are there? Feel free to try it out.

Check the announcement for the firmware location: http://groups.google.com/group/bifferboard/browse_thread/thread/1c58e0d2f7788ae2

Maybe in the future I will ship the Bifferboards with this firmware.
Oct 22, 2011. 2:19 PMbifferos says:
I only noticed the USB errors:

Adding 131064k swap on /swapfile. Priority:-2 extents:36 across:417880k
ehci_hcd 0000:00:0a.1: dma_pool_free buffer-32, c07a0000/7a0000 (bad dma)
ehci_hcd 0000:00:0a.1: dma_pool_free buffer-32, c07c0000/7c0000 (bad dma)
ehci_hcd 0000:00:0a.1: dma_pool_free buffer-32, c1420000/1420000 (bad dma)
ehci_hcd 0000:00:0a.1: dma_pool_free buffer-32, c1400000/1400000 (bad dma)
ehci_hcd 0000:00:0a.1: dma_pool_free buffer-32, c07e0000/7e0000 (bad dma)

If swap is on an unreliable partition, then that will cause big problems for Linux.

Apache is not going to be the best http server to be running because it's using almost all the Bifferboard memory. I would suggest moving to something a little lighter weight instead.

I can't see anything obviously wrong with your scripts, but you seem to have a cron job that runs forever, so I don't know if that causes cron problems.

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
26
Followers
16
Author:janisalnis(barbara320.gotdns.com)
I am a researcher working on development of optical atomic clocks. Electronics is my hobby since childhood when my uncle was bringing me old phones to play and take apart.