• Home
  • Help
  • Search
  • Login
  • Register
  Show Posts
Pages: 1 2 [3]
31  General Category / Success stories / Re: USB Webcam as a surveillance camera on: December 08, 2009, 02:12:34 AM
I did something similar; it's mainly for development.

I used GNU/Debian Lenny on UBIFS and installed GStreamer (I used my base from KNX/EIB http://chiana.homelinux.org/~marc/eib_sheeva.html)

$ apt-get install gstreamer0.10-ffmpeg gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-tools

Send with
$ gst-launch v4l2src ! video/x-raw-yuv,format=(fourcc)YUY2,width=(int)640,height=(int)480 ! ffmpegcolorspace ! videoflip method=3 ! jpegenc ! udpsink host= port=1234

Receive with
$ gst-launch udpsrc uri=udp:// ! queue2 ! decodebin ! autovideosink

Note that you can optimise a lot by tweaking the parameters and replacing the encoder with something else.
32  General Category / Success stories / Re: KNX/EIB Home Automation Centre on: November 20, 2009, 02:43:52 AM
It did not rightaway but it gave me enough help to fix the issue, mine now looks like:

Well, if you want, you can also expand it to make it simply conditional:

setenv bootargs_nand 'console=ttyS0,115200 ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs'
setenv bootcmd_nand 'setenv bootargs $(bootargs_nand) $(mtdpartitions); nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000'
setenv bootargs_sd console=ttyS0,115200
setenv bootcmd_sd 'mmcinit; ext2load mmc 0 0x0800000 /uInitrd; ext2load mmc 0 0x400000 /uImage'
setenv mmcbootcmd 'setenv bootargs $(bootargs_sd); run bootcmd_sd; bootm 0x400000 0x0800000'
setenv runsystem 'if itest $kernel -eq 1 then run mmcbootcmd || run bootcmd_nand; else run bootcmd_nand || mmcbootcmd; fi'
setenv kernel 1
setenv bootcmd 'run runsystem || echo boot failed'

This way, you have a variable to select what you want to boot. Boots from mmc if kernel is set to 1, otherwise from NAND. It should post a message on serial if neither of them worked. Note that it will try the other boot if the other one failed. You're setting a preference with the kernel value.

I hope I got it correct; I quickly adapted my embedded boot logic to your examples. The or in the bootcmd is typically disaster recover; I go about erasing the u-boot variables and reset (was previously mentioned). In that case, it will default back to the hardcoded values.

In our development environment, this is further expanded with a NFS version that will fetch the kernel over TFTP with DHCP (DHCP filename entry) , boot the kernel and then mount a NFS system with that particular version (kernel value 0).

This way, you can maintain lots of development systems with several NFS filesystems and kernel files without much customisation of the U-Boot variables and offloading the customisation to a central DHCP server config file.

Got a note that my Sheevas got shipped beginning of this week, so I'll be trying this out next week or so; need to port it fully. If there is interest, I could add more info about that later on.
33  General Category / General Discussion / Re: unable to open ftdi device on: November 12, 2009, 05:29:54 AM

I'ts a copy paste from a link where I wrote down a setup for KNX/EIB, so ignore the non relevant bits.

Trouble Shooting

You do not need JTAG to reflash your SheevaPlug, go to the section Flashing the system from the bootloader if you just want to have a cleanly flashed system.. the following paragraphs should only be used when your sheeva got bricked for some reason.
Clearing and re-writing the system on the Sheeva

The creation of these files (UbiFS, the kernel and bootloader) is readily described on the net, PlugComputer is a good place to start. For convenience, the files are bundled in one archive. Install openocd on your your system, download the sheevaplug-installer-v1.0.tar.gz file from openplug.org and extract it.

[marc@staleek ~]$ cd sheevaplug-installer-v1.0/uboot/openocd/config/
[marc@staleek config]$ sudo ../openocd -f ./board/sheevaplug.cfg

If OpenOCD complains with a similar message:
[marc@staleek Sheeva]$ sudo ../openocd -f ./board/sheevaplug.cfg
Open On-Chip Debugger 0.3.0-in-development (2009-08-13-23:22) svn:r2529
$URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.c $
For bug reports, read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
2000 kHz
jtag_nsrst_delay: 200
jtag_ntrst_delay: 200
dcc downloads are enabled
Error: unable to open ftdi device: device not found
Runtime error, file "command.c", line 469:
[marc@staleek Sheeva]$

you might need to change the file: sheevaplug-installer-v1.0/uboot/openocd/config/interface/sheevaplug.cfg

[marc@staleek Sheeva]$ cat sheevaplug-installer-v1.0/uboot/openocd/config/interface/sheevaplug.cfg to:
# Marvel SheevaPlug Development Kit
# http://www.marvell.com/products/embedded_processors/developer/kirkwood/sheevaplug.jsp

interface ft2232
ft2232_layout sheevaplug
# ft2232_vid_pid 0x9e88 0x9e8f
ft2232_vid_pid 0x0403 0x6010
# ft2232_device_desc "SheevaPlug JTAGKey FT2232D B"
jtag_khz 2000

This is due to a changed vendor ID after 07/2009.

Connect with a telnet session to your OpenOCD session.

[marc@crichton ~]$ nc localhost 4444
Open On-Chip Debugger
> sheevaplug_init
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x000000d3 pc: 0xffff0000
MMU: disabled, D-Cache: disabled, I-Cache: disabled
0 0 1 0: 00052078
34  General Category / General Discussion / Re: Globalscale Technologies Advice Please? on: November 12, 2009, 05:25:18 AM
... general bad behaviour of a significant fraction of retail customers.  (Been there, done that, don't want to handle retail again, ever, myself.)

You don't really need retail customers to have this. You just need cluelessness; any (corporate) level will do (be it end users, or managers).  Sad
35  General Category / Success stories / Re: KNX/EIB Home Automation Centre on: November 11, 2009, 08:21:35 AM
To make multiboot possible i created:
setenv bootargs_console console=ttyS0,115200
setenv bootcmd_mmc 'mmcinit; ext2load mmc 0 0x0800000 /uInitrd; ext2load mmc 0 0x400000 /uImage'
setenv boot_nand 'nand read.e 0x2000000 0x100000 0x400000 ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs'
setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_mmc; bootm 0x400000 0x0800000; run boot_nand; bootm 0x2000000'

What do i have to change to make it work?

From what you describe, your bootloader is stuck in the mmc commands and never gets further due to this. I would need to test this, but unfortuntately; I'm waiting for more than 4 weeks for my next plugs to do more experimenting on.

However, I would expect you'll need to use an or operator, this is e.g. the default boot command I'm using for an PowerPC based CPU; where I clear the system if the system fails to boot with the bootloader settings:

#define CONFIG_BOOTCOMMAND      "setcy22150; run runsystem"             \
        " || protect off f8060000 f809ffff"                             \
        " && era f8060000 f809ffff"                                     \
        " && era f9820000 f9fbffff"                                     \
        " && reset"

So if runsystem (a script) blocks the system, I clear the flash. You'll probably need something along those lines for your MMC/NAND setup. It'd be interesting to test it; but you'll probably have to wait a couple of more weeks since I haven't received a shipment notice from GlobalScale yet.
36  General Category / Success stories / Re: KNX/EIB Home Automation Centre on: November 01, 2009, 03:29:43 AM

The previous two points are merely a collection of other available work; hopefully in an easy to use fashion.
37  General Category / Success stories / Re: KNX/EIB Home Automation Centre on: October 23, 2009, 08:06:22 AM
linknx and eibd-server 0.0.4-4:

- fixed initscripts (update-rc.d was not running)
- fixed dependencies between scripts
- more testing on /var/log/knx and /var/run/knx

Packages are available for Lenny and later on armel and amd64, if someone is interested for other arch, I'll add them to the repos.
38  General Category / Success stories / Re: Mimo 740 Touch Display on: October 16, 2009, 07:24:37 AM

Looks interesting to integrate it with my KNX/EIB Home Automation Centre HOWTO :-) The combination of these two devices beats commercial products in price and in functionality :-)

39  General Category / Success stories / Re: KNX/EIB Home Automation Centre on: October 16, 2009, 02:57:43 AM
- added support for mysql
- some patch backports
40  General Category / Success stories / Re: KNX/EIB Home Automation Centre on: October 13, 2009, 07:24:59 AM
In order to use knxweb; install the following from a normal Debian repos

[marc@ahkna ~]$ sudo apt-get install php5-cgi lighttpd

The repos is in my case:

[marc@ahkna ~]$ cat /etc/apt/sources.list
deb ftp://ftp.nl.debian.org/debian lenny main contrib non-free

enable fastcgi

[marc@ahkna ~]$ sudo lighttpd-enable-mod fastcgi

Install the backend packages:

[marc@ahkna ~]$ sudo dpkg -i eibd-clients_0.0.4-2_armel.deb eibd-server_0.0.4-2_armel.deb linknx_0.0.1.26-3_armel.deb pthsem_2.0.7_armel.deb

modify /etc/default/eibd-server and /etc/default/linknx to enable the daemons and to connect to your interface of choice and restart the daemons.

[marc@ahkna ~]$ sudo /etc/init.d/eibd-server start
[marc@ahkna ~]$ sudo /etc/init.d/linknx start

You should have a basic system. Note that it will only be useful if you modify the /etc/linknx/house.xml configuration to match your addresses and rules.

In order to get the webinterface, download knxweb from sf.net and extract in /var/www/. You will then need to modify the background images and design your layout with the built-in editor (the images will need to be overwritten on your plug, there is no editor support for that as of yet).

Since knxweb generates a lot of http accesses, you might want to disable in /etc/lighttpd/lighttpd.conf the access logging module (mod_accesslog).

Sweet Home 3D (www.sweethome3d.eu/download.js) is a nice cross platform and easy to use 3D modeling tool I used for the att.d screenshot.

I added a repository that contains the relevant debian packages:
deb http://scorpius.homelinux.org/~marc/debian lenny main contrib non-free
deb-src http://scorpius.homelinux.org/~marc/debian lenny main contrib non-free

A more in detail description/HOWTO of the setup and configuration  can be found on
41  General Category / Success stories / KNX/EIB Home Automation Centre on: October 13, 2009, 04:26:59 AM
Even though there is little 'porting' to do due to the excellent quality of the upstream projects; I've been using

to automate tasks like controlling heating, lighting and closing/opening shutters from a SheevaPlug (used to be a NSLU2). I am currently working on getting the packages in Debian. The tools work with EIB (European Installation Bus) aka KNX.

The interfacing towards the bus is done by eibd-server and linknx is a small daemon that keeps track of simple tasks and states. knxweb provides a AJAX interface on your installation that shows the current state of the system (lights on/off, shutters, heating, temperature, ...). The linknx configuration is done with a XML representation and tasks can be specified (amongst others) on a time base; or even at sunrise/sunset; calculated based on your coordiates.

Installling the packages on a system that ships is peanuts.
Pages: 1 2 [3]