Difference between revisions of "BeagleBoard/James"
m (→Optionally: install Synergy)
(adding section on fixed IP addresses)
|Line 118:||Line 118:|
==> additional configuration steps may be added here in due time.
==> additional configuration steps may be added here in due time.
== Optionally: install Synergy ==
== Optionally: install Synergy ==
Revision as of 08:47, 13 February 2009
- 1 Introduction
- 2 Latest News
- 3 James Hardware
- 4 James Software
- 5 How to install
- 6 Infrequently Asked Questions
- 6.1 Where are the frequently asked questions
- 6.2 Great! Where can I download this? When is this available?
- 6.3 Why don't you get a rev B board and start right away
- 6.4 Is this feasible? It looks very ambitious
- 6.5 Cool, but it would be cooler if you add function XXX
- 6.6 Can you support hardware device YYY
- 6.7 This project sounds good! Can I help?
- 6.8 Unanswered questions, suggestions, remarks etc
James (acronym for Just A Miniature Entertainment System) is an application providing a home entertainment solution. It is also called James as it aims to be a global "butler" application providing various services. What functionality is actually offered by James also depends on the actual hardware present in the system.
Rationale for calling it Miniature, is because the system will be small in physical size (but not in functionality). Aim is also to reuse as much open source software as possible.
And actually entertainment system is a little bit of a misnomer. James will provide all kind of home services, so it could also e.g. provide NAS functionality or even a web server.
A very nice person borrowed me a board! I don't know if you want to have your name exposed, but thank you very much; you know who you are :-)
With this board I already managed to bring up several packages (and updated these to the latest version).
The original plan was to build my own PVR (like I did with NSLU2); but the current plan is to investigate first if I can use mythTV.
For wiimote support libwiimote and CWiid have been ported. Unfortunately the wintv prv usb2 drivers seem to have some issues with usb on angstrom. No idea yet what is wrong there.
ALso a lot of effort was spent on getting Coherence up and running. Coherence is a UPnP server that supports several backends which can e.g. serve FlickR content over UPnP.
Furthermore an attempt was made to connect the webcam. Technically it works, but apparenty there are some USB related issues. The cam works fine under a regular linux system but on the Beagle over the OTG port apparently data is corrupted. I get a picture but with some colored striping in it. The same behaviour has also been reported by others, but a report from someone who has a revC board with working EHCI said that there webcams were functioning properly.
Stay tuned for progress reports.
Core of the James development will be a BeagleBoard, although the code should be platform independent. BeagleBoard was chosen because it is very small (although functionality wise it can be big).
Additional hardware used during the development and for prototyping
- Philips PCVC680K webcam
- Toshiba MK4007GAL 1.8" hard disk with USB enclosure.
- Sitecom IT-001 USB phone
- Pertelian X2040 Character based LCD display (4 lines, 20 columns)
- Perhaps touch screen/pixel based display
- GATEWAY OVU400002/00 Infrared receiver
- bluetooth dongle (I use a very small one, but most bluetooth dongels will work)
- Support for WII-mote (requires bluetooth)
- WiFi. I have successfully used a 3com 3crusb10075 USB dongle (zd1211 based), a Linksys WUSB54G and a Philips CPWUA054/00 USB dongle (both Prism54 based)
Hauppauge WinTV PVR2 USB analog TV receiver.
- A DVB-T receiver. (or maybe a DVB-S receiver)
- USB CD/DVD drive.
- various USB hubs
Ideally of course would be to have an expansion board with features like Bbluetooth, WiFi, IR, USB hub), but as such a board does not exist yet initially the system will use standard USB components (although may be with the cover removed and mounted together). Aim is to select small components. As I am not a skilled hardware developer, creating an expansion board is outside my capabilities.
As written above James will be open source and will use open source as much as possible. Actually the programming effort will be mainly porting open source applications (with the associated debugging and problem fixing) and writing the UI software. For UI the idea is to use something web based. That would allow controlling the device locally, but also remote.
Software functionality on James is the following:
- Personal Video Recorder (PVR): see http://www.dse.nl/~meulenbr/pvr/pvr.html for some documentation and access to a prototype running on ARM
- Security functionality (motion pacakge)
- Photo retrieval from digital camera (both mass storage and ptp; mtp ?)
- Audio grabbing from CD
- writing of CD/DVD (e.g. cdrecord)
- File server/NAS (samba/swat)
- uPnP server
- PBX functionality (asterisk) (was ported to NSLU2 by cdoban, I installed it on my system but it never got enough priority to integrate it into the framework)
- Media rendering (mplayer?), also from USB/CD/DVD if present (NSLU2 prototype only has mp3 playback as there is no video out.
- Bluetooth headphone (bluez a2p profile)
- Internet telephony preferably with camera support (SIP based; probably EKIGA (cannot be done on NSLU2 due to lack of CPU power and hardware floating point.
- Maybe: uPnP playback
- Maybe: interface with GSM phone (e.g. using the gsm as a remote control using bluetooth)
- For wii-mote (CWiid (includes libwiimote)) Already demonstrated on eeePC under debian by me. See this page on wiki.eeeusoer.com on what I did there.
- Lirc (for remote control) (did that already on NSLU2)
- Web server for serving the UI (The current demo uses out-of-the-box apache2 with php)
- Web browser for displaying the UI locally (not on NSLU2 as it has no display).
How to install
As James is still in the process of being developed, there is no automated install or precooked image or something like that. Meanwhile as a starter I have listed all steps I had to undertake with my hardware. If you are following the steps below and find things that are unclear or work out different for you (e.g because you have different hardware, please update these instructions.
Generally there is no strict need to execute all steps in the order I gave. Most of the things are pretty independent of each other. I just listed the steps in the order I executed them. If there are dependencies that I am aware of, I tried to list them.
Start off by generating an image using Koen's image builder at http://amethyst.openembedded.net/~koen/narcissus/. In the machine section select beagleboard. From the options select: base system extended. From applications select all kernel modules, alsa utils, apache, bluez, cwiid, firefox, lcd4linux, lirc, mediatomb, mplayer, mythtv, ntp, ntpclient, samba, screen, wireless-tools. Feel free to install additional things that look useful to you. Give the image a name, hit "build me" and wait (could be a few minutes) for the image to be generated. If you miss a package that is also not that dramatic, as it is always possible to install things later on.
When the image build is completed follow the instructions that are provided by the generator.
NOTE: upon first boot the packages above will be configured. Especially installing kernel modules will take quite some time. You can monitor the progress if you have connected a display to the beagle. If you only use serial it will just take a while (maybe 15+ minutes, I did not time exactly) before you get the first login prompt, so don't be impatient. This only occurs one (on first use). Later boots will be at normal speed (less than a minute).
Configuring the image
I have a pegasus based USB to ethernet dongle. In the kernel the driver for a pegasus dongle is a module. And for some reason the dongle does not get an IP address while booting. Unplugging and replugging the dongle works, but is not very convenient. To avoid this issue the following commands on a console on your beagle:
- echo pegasus >/etc/modutils/pegasus
After that the module will be loaded before the IP addresses are assigned and the dongle will get an IP address during bootup.
==> additional configuration steps may be added here in due time.
Optionally: give your Beagleboard a fixed address
For James the beagle will also act as a server. For that it is convenient if the beagle has a fixed address (or you have to use something like dyndns or configure a DHCP reservation in your router).
In order to give the Beagle a fixed IP address you should edit the file /etc/network/interfaces and replace the line:
iface eth0 inet dhcp
with something like:
iface eth0 inet static address 192.168.1.230 netmask 255.255.255.0 network 192.168.1.0 gateway 192.168.1.1
Also in order to have DNS working create/edit the file /etc/resolv.conf. You should add lines like:
You can have several lines specifying name servers in the file. Of course you should use the addresses of whatever DNS server your use.
Optionally: install Synergy
If you are like me and do not want to clutter your desk with multiple keyboards it is a good idea to install Synergy. Synergy is a software application that can be used to share the keyboard and mouse between multiple computers.
Let us assume that your keyboard is connected to your linux system and that you want to use that keyboard also with your beagle. The linux system then acts as the server system, and the beagle system is the client system. Both systems require that X11 is running and must be connected to the ethernet. Let us assume that both systems have their own display and that the linux display is at the left side and the beagle display is located to the right.
In order to share the keyboard you need to install synergy on both systems. For beagle synergy is in the feeds and can be installed with 'opkg install synergy'. For your unix system your milage may vary. It may be that your distribution supports synergy. If not you need to download it from http://synergy2.sourceforge.net/ and install it yourself. There is one potential caveat. Synergy does not out of the box compile with gcc 4.3. If your system has gcc 4.3 you can patch the synergy sources with this patch.
To get things running you need to create a file synergy.conf. Assuming the host names of your systems are linux and beagle, the file looks like:
section: screens linux: beagle: end section: links linux: right = beagle beagle: left = linux end
Of course if the names of your systems are different or if the location of your monitors is different, you need to change the file.
Store this file under the name 'synergy.conf' on the server system. Then on the server system run:
synergys -f --config synergy.conf
and on the client system run:
synergyc -f server-host-name
If the server host name is not available you can also use the server IP address.
If on the beagle you get an error that it cannot open the display try as command:
DISPLAY=:0.0 synergyc -f server-host-name
After doing so, if you move the cursor to the right of the linux screen it will automagically appear at the left side of your beagle screen, and of course if you them move to the left again your cursor will go to the linux screen. Keys will also be redirected to the screen in which the cursor is.
(for the technically interested: what happens is that the server detects that the mouse is on the edge of the screen and if that happens it will pass the mouse events and key presses to the client at that side over TCP/IP).
If you want to autostart xynergyc when starting your system you can create a file /etc/X11/Xinit.d/99Synergy with contents:
#!/bin/sh /usr/bin/synergyc server-hostname
After that do a 'chmod 755/etc/X11/Xinit.d/99Synergy' to make the file executable.
Adding WiFi support
The modules for the WiFi dongles that are supported by Linux are already present in the system. However, most likely the firwmware is still missing. This firmware need to be placed in /lib/firmware before you can use your WiFi dongle.
For ZD1211 based dongles the firmware can be found at http://sourceforge.net/project/showfiles.php?group_id=129083 This firmware supports the following wifi dongles: http://www.linuxwireless.org/en/users/Drivers/zd1211rw/devices.
For prism54 based dongles the firmware can be found at http://wireless.kernel.org/en/users/Drivers/p54#firmware. This firmware supports the following devices: http://wireless.kernel.org/en/users/Devices/USB
Using a webcam
I have connected a Philips PCVC680K (Vesta Pro) USB webcam to my beagle. If the module pwc is present it will be loaded when you plug in the cam. The moudule will be there if you have chosen "all kernel modules" in the image builder. If not you can still get it by issueing the command 'opkg install kernel-module-pwc'
After doing so I was able to play the video on a monitor connected to the beagle by issuing the command
DISPLAY=0:0 mplayer -tv width=320:height=240:driver=v4l2 -fps 15 tv://
on the serial console (if you are running from a terminal you can omit the DISPLAY=0:0 part.
Note that I connected the webcam on the OTG port. This resulted in a picture with some colored striping. Apparently some data gets corrupted somewhere. As the same setup works flawless on various systems (x68, nslu2) with a regular usb host interface, I guess there is a bug in the OTG driver or a glitch in the hardware.
Other webcams can be used in a similar fashion, but you probably need to adjust the width, height and fps commands for mplayer.
It is also possible to capture individual pictures from your webcam. You can use the program vidcat to do so. This program is part of the package w3cam and can be installed with 'opkg install w3cam'.
vidcat is a little bit picky on its arguments. For my PCVC680K the command 'vidcat -p y -s 640x480 > test.jpg' did the job for me. If you get a message like:
VIDIOCMCAPTURE: Invalid argument args: width=320 height=240 palette=4 Error: Can't get image
your parameters are probably incorrect.
Another application that is proven to work is motion (install with 'opkg install motion'. This does support motion detection by taking a picture at regular intervals and comparing that picture with the previous one. If the differences between the pictures exceed a user-defined treshold the pictures are stored. That way the cam can be used to detect intruders.
Unfortunately due to the random color stripes, this is not useful yet on Beagle revB hardware.
More information on motion and how to configure it can be found at: http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome
Infrequently Asked Questions
Where are the frequently asked questions
LOL, there are no frequently asked questions. This is so new that any question is infrequently asked (or not at all). This section is here to give answers to some of the things that might pop up while reading this.
Great! Where can I download this? When is this available?
Not so fast....
You can see above what exists for NSLU2. Porting to beagleboard has not started yet, as I do not have a board yet. I'm planning to order a rev C board as soon as they become available. Meanwhile, I'll do some preparation and prototyping (on NSLU2, as it can run Angstrom, and also runs the PVR functionality). Anyway, availability will definitely be extended incrementally. I will start with some core functionality and gradually add functionality.
Why don't you get a rev B board and start right away
Good remark, but I'd like to get a rev C board as I would like to have the LCD interface and the additional memory it has to offer.\\ Of course I could buy a rev B board, but I think buying both a B and C board would probably not pass our internal budget committee (and I feel no desire to have an argument with the Mrs. on this :-) )
Of course if you want to support the development and donate or loan me a board, feel free to get in touch with me.
Is this feasible? It looks very ambitious
It is definitely ambitious. Then again a bit of ambition does not hurt.\\ And feasible: I think it is, but only time will tell. A lot of the software is available in the open source domain. I have quite some experience porting software, and a lot of things I did before on NSLU2 where I am eFfeM
But... in the end only time will tell!
Cool, but it would be cooler if you add function XXX
Could be. Feel free to bring XXX to my attention. If there is open source software to support this function, please mention it. Depending on the amount of effort needed and the potential benefit for others, I might pick it up earlier or later.
Can you support hardware device YYY
Depends. I try to make use of existing software as much as possible and try
to be device independent, so it might be supported already
(perhaps with a little effort).
Then again this also depends on what kind of hardware it is. If it is something nice I'd want myself, I might buy it. If not I might still support it if someone borrows or donates me a piece of hardware to allow testing, if I consider it to be of general use. Then again if your problem is very specific you are probably on your own (although of course I am willing to give some advice).
This project sounds good! Can I help?
Depends on your skills, competences and time.
If you have hardware skills you could probably come up with a prototype for an expansion board, instead of the hodge-podge of USB devices that I am undoubtedly going to make.
If you have mechanical skills you could come up with a casing proposal (otherwise it'll probably be a shoe box project).
If you are graphically skilled you could help defining the UI (I am graphically challenged :-) ).
And if you are a programmer you could port and test some of the packages mentioned above.
Unanswered questions, suggestions, remarks etc
If you have other questions, suggestions, remarks etc. feel free to add them below. I'll try to come up with answers.