Setting up the Bifferboard - see also notes on the ready-made files
some more notes for when I have to do it again
Many thanks to Bifferos for answering my many "OpenWrt new user" questions
Objective
See if I can do all I did on the nslu2 (Slug) but at 1Watt (for a battery driven robot control system)
Load standard nano, http, ftp, samba, - working!
USB to RS232 converter - working!
Setup an HD webcam - working!
Drive the gpio pins - working!
Drive an i2c bus- working on some chips....
Flite (text to speech) - working!
Webpage control of external devices - working!
Setup a 3D sound USB dongle for playing MP3 etc - working for small files - not MP3 music tracks
Setup a WiFi dongle - not yet
The basic software tools
Nano - "text editing for the rest of us" (Mac users will understand)
Samba - no problem - see my Sweex notes
FTP server - I normally use vsftpd but this did not work - I got "OOPS: Socketpair"
so I tried openssh-sftp-server - that works fine with Cyberduck in the Mac
opkg install openssh-sftp-server
see also http://www.sunspot.co.uk/Projects/sweexproject.htm menu item 11
Backup of key files to add to the memory stick
/etc/config/system config system option hostname Biff_09 option timezone UTC |
/etc/hosts 127.0.0.1 localhost 192.168.0.9 Biff_09 |
samba.conf [all_files_09] |
/etc/config/network config interface loopback config interface lan |
/etc/init.d/graham_start #!/bin/sh /etc/rc.common |
/etc/asound.conf defaults.ctl.card 0 pcm.card0 { pcm.dmixer { playback.pcm "dmixer" pcm.!default { |
to be placed in /usr/sbin PCF8574_addr_byteout_Biff Webpage device control WWW.zip |
HD webcam - IT WORKS!!
I have a Logitech QuickCam Pro 9000 Webcam which provides an HD quality picture - inspired by this link
I did -
opkg install kmod-video-uvc which also loaded kmod-video-core
opkg install mjpg-streamer
You get a new website in /webcam_www
To serve the pictures on the web do
mjpg_streamer -i "input_uvc.so -r 960x720" -o "output_http.so -p 8080 -w /webcam_www"
in Firefox I then looked at my new Bifferboard website at 192.168.0.9:8080
So for below £90 you can put live High Definition pictures on the Web!
see also
Picture taken by Logitech QuickCam Pro 9000 Webcam and served to the Mac - this is a Mac screen shot (as seen on the right)
From the top
USB to RS232 (from the Mac)
USB2 hub with a Kingston 512M USB FLASH memory stick and a QuickCam Pro 9000
Bifferboard (with the bright blue LED)
3.3V logic to RS232 (MAX 3232) - home built
NOTE!
I bought a 4port USB hub from eBay - 4 ports at 90 degress to each other (see picture below) and it caused the QuickCam to drop its resolution down from the HD setting.
These use the GENESYS GL850 chip.
The controller avove that works to the full resolution uses the
Cypress CY7C65640-LFC TetraHub controller
both chips claim 480 Mbps
The Cypress press release claims :-
The only hub controller to integrate four transaction translators, the Cypress TetraHub(TM) allows all three USB speeds -- low-speed (1.5 Mbps), full-speed (12 Mbps) and hi-speed (480 Mbps) -- to coexist in any USB-enabled system.
Please email me if you know which hubs for sale now use the Cypress CY7C65640-LFC TetraHub controller
USB to RS232 converter working!! It runs at a default of 9600 baud - I have yet to run stty
|
|
At the top of the right picture is a popular USB 4-port hub that will not allow the Quickcam Pro to work at full resolution. See note above. |
This 4-in-line USB2 hub works for the maximum pixel count on the Logitech QuickCam Pro 9000 HD webcam. The ones that work have small dimple in the plastic case close to the green LED and the IN USE sign - in the centre of the picture on the right - this is absent in those that reduce the top resolution. Also the chip is marked :- To be sure you get the right hub send an email to |
Work in progress
WIFI USB dongle
I got this to run on Debian Slug because I could compile drivers on the board itself
I eventually got the kmod-rt73-usb driver to compile in OpenWrt but my D-Link DWL-G122 was not recognised on bootup - many odd messages
Compile C on the Bifferboard
In this link I did a similar thing on the Sweex/Edimax router
The uClibc ready made file system for 486 is called root_fs_i386.ext2.bz2
It is refered to on the uClibc site here but is not present in fact. I found a copy here
I guess it wants rebuilding from source - if you do a " hello world" after a
chroot root_fs
then it runs OK in there. Back in the root file structure it does not run.
BUT
if you compile with
gcc --static -o helloworld helloworld.c
it then runs fine in the root directory - but the file is bigger !
Please email me if you find an efficient way to compile on the Bifferboard.
Compile C on the toolchain
Instead of
gcc -o helloworld helloworld.c
use
/home/graham/bb-src-1.1/openwrt/staging_dir/toolchain-i386_gcc-4.1.2_uClibc-0.9.29/usr/bin/i486-openwrt-linux-uclibc-gcc -o helloworld helloworld.c
You can aso use
gcc --static -o helloworld helloworld.c
in normal Debian linux and helloworld will run on the Bifferboard with a much (!) larger file size
/etc/opkg.conf
src/gz snapshots http://www.sunspot.co.uk/SunspotBiffOpkg090327
dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /jffs
MISC NOTES FOR PERSONAL USE - to be edited
Bifferboard only needs ohci, but it's compiled in.
No point selecting them in openwrt config, because
the kernel has hard-coded them as [*]. You need to
override them in opkg config.
Bifferboard doesn't have uhci controller. ohci controller is built into the kernel, no package required for this.
get all the packages links
make package/symlinks
If you want to compile a single package you need the following command.
First select the package in menuconfig. If it is not selected you need to add DEVELOPER=1 to compile it.
This example compiles python which has been given [M] in menuconfig to request a module for use with opkg.
make package/python/{clean,compile,install} V=99
> /root/trunk/staging_dir/toolchain-i386_gcc-4.1.2_uClibc-0.9.29/usr/bin/i486-openwrt-linux-uclibc-gcc
> =======================================================================
> But how do I run a complex C source package that contains a
> config and a
> makefile? (Blassic is like that - it just assumes gcc will
> do the job.)
> =======================================================================
You will find you can specify all sorts of things directly to configure, do ./configure --help for a list. They should include things like include path location and so on. Point it to your toolchain from OpenWrt and it should work. At a minimum specify include path, library path, and the name of your gcc (i486-openwrt-linux-uclibc-gcc).
In the gpio package please try to change gpio-proxy.c at the top it says
#include <gpio.h>
Make it say:
#include <linux/gpio.h>
/etc/init.d/graham_boot
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=60
# graham startup items
# insmod i2c-gpio-custom bus0=0,<SDA>,<SCL>
insmod i2c-gpio-custom bus0=0,12,9
Set a small ramdisk to avoid thrashing the FLASH memory stick
mount -o size=2M -t tmpfs tmpfs /var/www/ramdisk
Run the HD webcam at bootup
mjpg_streamer -b -i "input_uvc.so -r 960x720" -o "output_http.so -p 8080 -w /webcam_www"
echo "graham_boot has run"
save to /etc/init.d/graham_boot
then do ln /etc/init.d/graham_boot /etc/rc.d/S97graham_boot
try soon
Re: Disabling serial console to allow serial port use
After building from the source tarball:
cd openwrt
make kernel_menuconfig
uncheck:
Device Drivers -> Character devices -> Serial Drivers ->
Console on 8250/16550 and compatible serial port.
That should stop the console log messages. You may also need
to uncheck:
Kernel Hacking -> Early printk
Then run 'make' and flash the resultant kernel. Let me know if that doesn't
work. Better make sure network access to your rootfs is working because you'll
have no other way of logging in.
Kind regards,
Biff.