2009/May/18

รู้หรือไม่ อะไรคือสิ่งมหัศจรรย์ในโลก..

พอแข็ง แล้วใหญ่ กลายเป็นของเหลว.. แล้วเล็ก..

2009/May/18

(1) Download rpm packages:
Now the stable release is 3.1.0 - for my i386 laptop, I downloaded from this Thai mirror:
http://mirror.in.th/osarchive/openoffice/stable/3.1.0/

Or see other mirrors at openoffice.org

(2) Install by double-clicking, easy on Fedora Desktop

(3) Try running openoffice.org3 in terminal, you will get this error message:
$ openoffice.org3
/opt/openoffice.org3/program/soffice.bin: error while loading shared libraries: libuno_sal.so.3: cannot open shared object file: No such file or directory

(4) After searching for the error message, we get a workaround here http://user.services.openoffice.org/en/forum/viewtopic.php?f=16&t=14932

but for OpenOffice version 3.1.0 we have to change the commands into this:
su
cd /opt/openoffice.org/basis3.1
mv ure-link ure-link.backup
ln -s /usr/lib/openoffice.org/ure ure-link

(5) After doing the fix, try running openoffice.org3 or open from the menus .. it should work.

2009/May/17

I'm running Fedora Core 10 (with multimedia packages from Planet CCRMA) now, but got some information for doing this on Ubuntu at http://www.dullest.com/blog/linux-wiimote-via-bluetooth/ .. so .. let's get started and see if we can get it to work with my laptop with a build-in Bluetooth adaptor.

Finding connection utilities for Wiimote:
I find them by yum search wii

result:
cwiid.i386 : Wiimote interface library
cwiid-devel.i386 : Development files for cwiid
cwiid-python2.i386 : Python binding for cwiid
cwiid-utils.i386 : Wiimote connection test application
cwiid-wminput.i386 : Enables using the wiimote as an input source
libwiimote.i386 : Simple Wiimote Library for Linux
libwiimote-devel.i386 : Development files for libwiimote
xorg-x11-drv-wiimote.i386 : Xorg driver for the Nintendo Wii Remote

Oh! they even get an X11 driver for wiimote? how nice! .. ok, then I installed cwiid cwiid-utils cwiid-wminput

now.. testing to see if they can connect, i put the wiimote into discoverable mode by pressing 1 and 2 for around.. hey that took a long time, ok it got a blinking LED at LED number 1: ($ is the prompt)
$ lswm
Put Wiimotes in discoverable mode now (press 1+2)...
00:19:1D:58:D6:3D

ok.. so now i'm gonna try seeing information sent from Wiimote. I run  wmgui

Under menu File, there is a Connect command. Then i make Wiimote go into discoverable mode again, then choose File -> Connect. Then I can get this.. It reads values from the wiimote correctly, correct buttons, can turn on / off LEDs, can rumble.. NICE!

But.. err... now what? what should i do more to test Wiimote + Linux?

I dunno -_-. but i'm feeling good already!

Oh ok now i know what to do. let's test this Wiimote with OSC.
OSC - Open Sound Control, see http://opensoundcontrol.org/
which is gonna be a fun way to map Wiimote messages to multimedia programs. especially audio/visual programming languages, which is gonna help create some more fun ways i can do with Wiimote.

So i search for wiiosc ..  here it goes: http://www.nescivi.nl/wiiosc but on this page, it says wiiosc-v0.4.tar.gz (needs liblo version above 0.25) .. so i'm checking my liblo version by yum info liblo turn out to be Version 0.24 .. so i've gotta download and compile and install a newer liblo.

So i pay a visit to http://liblo.sourceforge.net/  you know what?  .. I love these web pages! They are so clean. I can read them easily with lynx browse (but i'm using Firefox now anyway hahahahah) .. ok, downloaded liblo 0.26 then extract & ./configure & make & sudo make install and done!

 Then i download wiiosc & extract & ... then i'm confused
$ ls
Makefile  README  supercollider  wiiosc.c

ok.. what to do what to do let's read README. it says.. "just type "make" in the directory, and the application should build" .. Can it be that simple?

$ make
OHHH!! Lots of error.. I should install cwiid's developer libraries -_-.
$ sudo yum install cwiid-devel
.. ok, all done, installed. (along with bluez-libs-devel also)

ok, back to making.

$ make
gcc -Os -Wall -pipe -g -O2  -o wiiosc wiiosc.c -llo -lcwiid -lm

DONE?

Oh.. it just produced wiiosc as an executable. let me copy it to /usr/bin
$ sudo cp wiiosc /usr/bin

Done!

So.. now let's test by using it to send and receive from an IP.

$ wiiosc "57120" "57150" "192.168.1.7"

wiiosc: error while loading shared libraries: liblo.so.7: cannot open shared object file: No such file or directory

 

 

WHAT??!!

$ locate liblo.so
/usr/lib/liblo.so.0
/usr/lib/liblo.so.0.6.0

hmm.. so what should I suppose to do huh? cheat? what the hell ok i'll cheat.
$ cd /usr/lib
$ sudo cp liblo.so.0 liblo.so.7

i hope i'm not blowing up my whole computer..

$ wiiosc
============================================================================
wiiosc - v0.3 - sends out osc data on incoming wii data
(c) 2007, Marije Baalman
start with "wiiosc "
use "wiiosc auto" to start discovery automatically
This is free software released under the GNU/General Public License
============================================================================

Listening to port: 57150
Sending to ip and port: 127.0.0.1 57120
Send message /wii/discover to discover a WII and
press buttons 1 and 2 on the wiimote to connect.

YES!!!!!!!
I CHEATED AND I'M DOING FINE HAHAHAHHAHA...

so what else?

dunno.

gotta try with OSC later, though.

 END OF EPISODE 1

 

BEGINING OF EPISODE 2

 Ok, after dancing around with happiness, it's time to try to discover it by sending an OSC message to make wiiosc discover the Wiimote. So, .. $ wiiosc

(then it says ) "Send message /wii/discover to discover a WII and
press buttons 1 and 2 on the wiimote to connect."

Ok, I'll try that..
I coded in ChucK programming language ( http://chuck.cs.princeton.edu/ ) just like this:

OscSend xmit;
xmit.setHost("localhost", 57150);
xmit.startMsg("/wii/discover", "");

Ok, this would do, I hope..

 I run the chuck code, in around 5 second, wiiosc says this:
-1:No wiimotes found

Ok, let's do exactly what it says. Send the message, then press 1 and 2 and hold.
wii found
mesg_count 1Segmentation fault

(then wiiosc dies.) WHAT!!! let me try again.
wii found
mesg_count 1Segmentation fault

I CAN'T TAKE IT ANYMORE!!

I NEED COFFEE!!!

edit @ 17 May 2009 04:51:40 by kijjaz



กิจจาศักดิ์ ตริยานนท์
View full profile