09.17.07
Posted in KSU, Programming at 9:40 am by Todd
After getting my new laptop all setup I had to install the Oracle Calendar client (this is what K-State uses to manage company-wide calendars). When I tried to do it I was getting the following errors.
bluecloud OracleCalendar_inst # ./gui_install.sh
Preparing to install…
Extracting the JRE from the installer archive…
Unpacking the JRE…
Extracting the installation resources from the installer archive…
Configuring the installer for this system’s environment…
awk: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/bin/ls: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory
basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
Launching installer…
grep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/tmp/install.dir.7663/Linux/resource/jre/bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory
bluecloud OracleCalendar_inst #
I had no idea what to do until I read this great page which suggested a quick fix (which was really cool since it uses sed to fix a binary). I did have to do it slightly differently though (when I did it that way, the file ended up empty).
bluecloud OracleCalendar_inst # cp cal_linux cal_linux.bak
bluecloud OracleCalendar_inst # cat cal_linux | sed “s/export LD_ASSUME_KERNEL/#xport LD_ASSUME_KERNEL/” > new_cal_linux;
bluecloud OracleCalendar_inst # mv new_cal_linux cal_linux
bluecloud OracleCalendar_inst # chmod 755 cal_linux
So I don’t quite understand why the problem existed or why this solution worked but maybe this will help others get it installed. Good luck!
Permalink
09.14.07
Posted in SAnToS at 9:25 am by Todd
As you should know by now, I am trying out different Linux distributions on my new laptop (the famed HP nc8430). Today’s test is Fedora.
I haven’t really heard much about it recently but several friends used it in the past (back when the Fedora project first started). But since then, Fedora has dropped off my Linux radar (other than the occasional Red Hat/Microsoft/SCO news). So I figured I should give it a try while I am experimenting.
I downloaded the DVD ISO and burned it to a new DVD-R. Worked perfectly and was actually quite the quick download. Installing took very little time (just answered a few questions) and then rebooted. Upon reboot, it asked a couple more questions and tried to switch to X/GDM/Gnome. When doing so, it failed because of video card driver issues. This is where it paid to be familiar with x.org and how it is configured.
So I had it stop trying to use X and manually configured x.org (in /etc/X11/xorg.conf). I switched the driver to radeon and tried again. That failed. So I tried the ati driver, which failed. So I finally tried the vesa driver. This worked but the resolution was horrible (800×600, not quite the best resolution for a monitor/video card capable of 1680×1050). So I tweaked the config a little more so that it would do 1400×1050. That seemed to work fine (not too much distortion of fonts and runs with some speed).
Once in X, Fedora reported that there were updates. So I told it to install them (quite a few as a matter of fact).
I next tried to get the proprietary ATI drivers installed to get the most out of the new laptop (I really wanted 1680×1050 and the ability to do dual-head without a reboot). That failed horribly … ok, it was successful but the performance was horrible (the same issue I had with Ubuntu and the proprietary ATI drivers). With the vesa driver X/Gnome responded quickly and rendered everything as quick as could be expected. But with the ATI drivers it was slow as molasses (mouse motion was stupid-slow, windows took forever to display, menus took seconds to render, and dragging windows had a really cool effect … it left a trail of window parts everywhere it went).
This made it a no-go in terms of user-friendliness. So I searched a little bit and couldn’t find a solution so I abandoned Fedora in hopes of the next Linux distribution would be better. All-in-all, I think Fedora installation worked great except for the fact that it didn’t play well with ATI drivers. So next time I need to install on a good workstation (one without an ATI card), I will give it another try.
Permalink
09.13.07
Posted in Customer Service at 10:57 am by Todd
Today is a somewhat sad day for me. Not a real sad day (like the death of a friend or loved-one), just an internet version of a sad day. Today I gave up on the Freakanomics blog.
What was once one of my favorite daily blogs to read has become too cumbersome. Before their recent transition to the NYTimes, I was able to read their entries, in their entirety, using Google Reader. This is the same way I read 99% of my internet sources. But after their transition, they only published the first bits of their entries via RSS in hopes of pushing you away from RSS and onto the NY Times website (not linking to the NYTimes on purpose).
I will admit that another reason I can give them up so easily is that it is the NY Times. I get tired of the NYTimes opinions, east-coast centered news, unscientific polls (although they sell them as informative polls), and quasi-news (inflamed, exaggerated stories whose sole motivation is making more headlines and selling more papers through the use of fear). I also hate that they, at least in the past, “protect” their online stories behind registration (like I want to give you my personal information to sell at will just so I can read one of your crappy articles).
Another reason that I can give up on them is the enlarged page size that their blog now has. This includes the standard NY Times header, the ads, and their enormous blogroll are just a few items that make their pages giant (and take forever to load).
So today was my last day subscribing to them. I am sure I will check back on occasion to see if they have fixed this issue but I doubt they will. Stephen and Steven, I will miss your opinions and insights. Wish you would not have moved over the the NYTimes.
Permalink
09.12.07
Posted in SAnToS at 10:16 am by Todd
My new HP Compaq nc8430 is getting the royal treatment. As I said before, I am trying to get Linux installed on it and I am trying several different distributions of Linux. This installment of my installation saga is about Ubuntu Linux.
I have heard some great things about Ubuntu. The first is that it is very easy to install. The second is that it “just works” for things like wireless cards, video cards, and network cards. The last is that it has suspend and hibernate working (which seems to be the holy grail for Linux on laptops).
So off I go downloading and attempting to install Ubuntu. Honestly, it was very, very easy to download and install. But I ran into a show-stopper when I got to the point of configuring X (the graphical interface portion of Linux). It turns out that drivers for ATI video cards are not well-supported in Linux. So the open source video drivers are not up-to-date for the video card in my laptop (ATI Radeon Mobility x1600) and Ubuntu used the vesa drivers instead. It did provide a nice way to switch to using the proprietary drivers (way to go Ubuntu developers). Unfortunately, after switching and rebooting, X and Gnome ran dog slow. Specifically, it would literally take a couple of seconds for a menu to be shown (it also had a weird effect when dragging windows – it would leave a trail of “junk” on the screen where it had been).
So, that was a no-go. I didn’t want to use the vesa drivers because they wouldn’t support 1680×1050 and I didn’t want to use the ATI proprietary drivers because they made the UI too slow.
So I will use Ubuntu in the future, just not for this laptop. I think it was great because it was easy to install (just a couple of choices and it auto-detected most things) and installed most of what I would need for a desktop environment. Great job Ubuntu developers!
I also tried KUbuntu just in case it was a Gnome thing but found the same UI problem.
Permalink
09.11.07
Posted in KSU at 9:22 am by Todd
Inspired by this link I thought I would write up every job description at K-State. And this obviously applies to my job as well (hopefully this won’t offend anyone).
Join our fast-paced company and work in our competitive environment that offers competitive salary. We are a nationally recognized leader with an immediate opening offering flexible hours and a casual work environment where employees feel valued. Must have an eye for detail, have the ability to handle heavy workload, have problem-solving skills, have a wide-variety of experiences, and have good communication skills. Your duties will vary and some overtime is required. No phone calls please.
And in an effort to poke fun at myself, compare the article mentioned above to a couple of job descriptions that I wrote. Hopefully I will write better job descriptions now that I understand them better!
Permalink
09.10.07
Posted in KSU, Programming, SAnToS at 12:59 pm by Todd
Recently I have been trying to work with sensor networking and specifically with hardware designed to be used with TinyOS. This meant that I had to get an environment setup to compile and deploy TinyOS applications onto motes. This turned out to be quite a pain (not much clear and consistent documentation). I should note that I am trying to get this working in Gentoo Linux and I am working with TinyOS 1.x and not 2.x (which might be easier).
To get TinyOS 1.x installed you must:
- Configure the kernel for USB Serial Converter support
- Install the IBM JDK with the JavaComm class libraries
- Install the TinyOS 1.x packages and crossdev using Portage
- Setup crossdev
The first thing that must be done is configuring the kernel to support USB Serial Converter. One way to determine if this is already present in the running kernel is by plugging in your MIB520 and looking for /dev/ttyUSB0. If it isn’t there, you likely don’t have USB Serial Converter support in the kernel.
It is rather easy for anyone that has compiled their own kernel (most Gentoo installations do this during the install) so I won’t provide step-by-step instructions. Instead, I will simply mention this page and show a glimpse of what I added to the kernel.
Device Drivers —>
USB support —>
USB Serial Converter support —>
<*> USB Serial Converter support
[*] USB Generic Serial Driver
…
USB FTDI Single Port Serial Driver (EXPERIMENTAL)
Once you complete the configuration make sure to run make && make modules_install, copy the new kernel to your /boot directory, and reboot into this kernel. For more on this see the many forms of documentation about compiling a Gentoo kernel.
You can test that this works by rebooting following the directions at the top of this page:
ls -l /dev > before
# plug-in the MIB520
ls -l /dev > after
diff before after
You should see at least two differences:
> crw-rw—- 1 root uucp 188, 0 Sep 5 11:43 ttyUSB0
> crw-rw—- 1 root uucp 188, 1 Sep 5 11:43 ttyUSB1
Those are the two serial ports for the
MIB520, one of which you will use (I have no idea why two are created).
Before emerging (installing) TinyOS 1.x make sure to install the IBM JDK and make it the system vm. To do this you can run emerge -a ibm-jdk-bin and then follow the directions for downloading the binary package distributed by IBM (be sure to get both tgz files — one for the JDK and one for JavaComm). Once installed, make sure to set this as the new system vm before installing TinyOS 1.x. The following is the output when I set the new VM as the system VM (the name of the machine is bluecloud).
bluecloud ~ # eselect java-vm list
Available Java Virtual Machines:
[1] blackdown-jdk-1.4.2
[2] ibm-jdk-bin-1.5
[3] sun-jdk-1.5 system-vm
[4] sun-jre-bin-1.6
bluecloud ~ # eselect java-vm set system 2
bluecloud ~ #
Now that the kernel is configured and the IBM JDK is installed and set as the system VM you are now ready to install TinyOS 1.x using portage. Gentoo’s portage versions of TinyOS 1.x are masked for x86 and amd64. Gentoo provides some easy ways to unmask packages by adding the names to the package.unmask and package.keywords files. Below you can see the snippet to add to those files. See this page or this page for more on unmasking packages.
dev-tinyos/tos-uisp
dev-tinyos/tos
dev-tinyos/nesc
dev-tinyos/ncc
dev-tinyos/tos-scripts
dev-tinyos/tos-make
dev-tinyos/tos-apps
Add that snippet to both the /etc/portage/package.keywords and /etc/portage/package.unmask files so that portage (emerge) has access to those masked packages.
The packages that you will want to install are listed below:
- tos (dev-tinyos/tos)
- tos-apps (dev-tinyos/tos-apps)
- tos-make (dev-tinyos/tos-make)
- tos-scripts (dev-tinyos/tos-scripts)
- tos-uisp (dev-tinyos/tos-uisp)
- nesc (dev-tinyos/nesc)
- ncc (dev-tinyos/ncc)
- crossdev (sys-devel/crossdev)
Now run
emerge -a dev-tinyos/tos-apps dev-tinyos/tos dev-tinyos/tos-scripts dev-tinyos/tos-uisp dev-tinyos/tos-make dev-tinyos/ncc dev-tinyos/nesc crossdev which will show you what it will install and then prompt you to accept that proposed changes.
Emerging them didn’t work as well as I would have liked the first time. I ran into an issue with an old version of aclocal not being available (aclocal comes with automake/autoconf). The error I got is shown below:
am-wrapper: /usr/bin/aclocal-1.4 is missing or not executable.
Please try emerging the correct version of automake.
make: *** [aclocal.m4] Error 1
!!! ERROR: dev-tinyos/tos-uisp-1.1.15 failed.
Call stack:
ebuild.sh, line 1638: Called dyn_compile
ebuild.sh, line 985: Called qa_call ‘src_compile’
ebuild.sh, line 44: Called src_compile
tos-uisp-1.1.15.ebuild, line 27: Called die
!!! make failed
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at ‘/var/tmp/portage/dev-tinyos/tos-uisp-1.1.15/temp/build.log’.
So I had to emerge an older version of automake using the following command:
emerge -a =automake-1.4*
For more on installing a specific version of software in Gentoo see
this page. Once that was installed I re-ran the emerge command and it worked just fine.
Once TinyOS 1.x and crossdev are installed I had to setup the cross-compiler. This is done using crossdev. I ran crossdev --target avr which took quite some time to complete. If I understand things correctly, this setup my machine to cross-compile for the avr platform (setup gcc to compile for a platform different than the one it is running on).
The first time I ran it I got an error message about setting up the
PORTDIR_OVERLAY in make.conf. So I edited make.conf to include this line:
PORTDIR_OVERLAY=/usr/local/portage
Once I added that I created the directory and re-ran crossdev. This time, it was successful.
After all of that install I was ready to compile and deploy my first application, Blink. When doing so, I ran into another problem, not finding the proper linker script (avr5.x).
bluecloud Blink # make mica2
mkdir -p build/mica2
compiling Blink to a mica2 binary
ncc -o build/mica2/main.exe -Os -board=micasb -target=mica2 -Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -finline-limit=100000 -fnesc-cfile=build/mica2/app.c Blink.nc -lm
In file included from /usr/src/tinyos-1.x/tos/platform/avrmote/avrhardware.h:55,
from /usr/src/tinyos-1.x/tos/platform/mica2/hardware.h:82,
from /usr/src/tinyos-1.x/tos/system/tos.h:144:
/usr/lib/gcc/avr/3.4.6/../../../../avr/include/avr/signal.h:36:2: warning: #warning “This header file is obsolete. Use .”
/usr/libexec/gcc/avr/ld: cannot open linker script file ldscripts/avr5.x: No such file or directory
make: *** [build/mica2/main.exe] Error 1
Went searching and found
this page that suggested creating a symbolic link in the local directory. This worked although I would prefer a real fix to this issue (it is a pain to create this sym-link in every application folder).
Once I was able to compile using make mica2 I attempted to deploy using make mica2 install. This was unsuccessful because it couldn’t find /dev/parport0. After some searching I found that I needed to
set an environment variable, MIB510, to the device that it would use to program the mote. So I ran MIB510=/dev/ttyUSB0 make mica2 install instead and that worked.
So I now have an environment setup to write and deploy TinyOS applications. Time to start experimenting with Blink, Surge, Sense, and the various RFM-based examples. Wish me luck! Hopefully I will learn enough about this that I can start writing more extensions to Cadena so that we have real support for developers (not just the current modeling support, real end-to-end development support).
For more information you can also see the Gentoo-wiki page on TinyOS.
Permalink
09.07.07
Posted in About Me, SAnToS at 10:04 am by Todd
My work environment has evolved over time and I have finally found a fairly good setup. But to really do the current environment justice, I will explain how it changed as my job, equipment, and my office changed.
When I started work in the SAnToS Lab I was a graduate research assistant (GRA) working for Dr. Dwyer on Bandera. For the first year, I was working in a cubicle (the bullpen) using my own laptop (Dell Inspiron 5000, actually, it was my wife’s but she seldom needed it). This was fantastic.
After that first year the lab had struck gold (actually, they got a huge grant that had equipment money included) and decided to order all GRAs new laptops. So each of us got a Dell Inspiron 8100 with a Microsoft Intellimouse Explorer mouse and a Dell wireless card. With this new speedy laptop I could finally install what I wanted (dual-boot Windows XP and Linux) and not bother anyone else. This was fantastic.
About 6 months later I got to upgrade my office and began to share a windowless office with another GRA (Venkatesh). During the move, I inherited 2 machines: 1) PC with 21″ CRT (which sounded like a Jet engine and the monitor weighed as much as the Titanic) and 2) a Sun SparcStation (named izar) with a 17″ CRT. I moved the Sun down to the machine room and kept the PC (the Sun machine became a server as well as my own personal SETI@Home machine). So I now had a laptop on my desk along side a PC with a giant monitor. Each with their own OS, keyboard, and mouse. I could now multi-task (while waiting on one machine to download or process, I could work on the other). This was fantastic.
Shortly after I started working full-time in the lab (as a Research Associate), I got a new 19″ LCD to use with my laptop. I now had a laptop, a workstation, a 21″ CRT, and a 19″ LCD. This was fantastic.
After some time I got tired of the noise so I got rid of the workstation and 21″ monitor. So I had a quiet office, a laptop, and a 19″ monitor. This was fantastic.
As luck would have it, the lab started to upgrade several machines so we had a Dell Dimension 2350 sitting around. So I grabbed it and a 19″ LCD and plucked them down on my desk. I now had my laptop running Linux and the workstation running Windows (XP) which made it easy to get my work done (in Linux) and my software tested (on both machines) without rebooting. This was fantastic.
And then, I had a stroke of genius. Well, that isn’t exactly accurate. A friend, and colleague, of mine pointed out that I could use the same keyboard and mouse on both machines. I just had to install x2vnc (in Linux) and RealVNC (in Windows) and I magically had a better work environment — one keyboard and mouse controlling two machines on 3 monitors. This was fantastic.
During all of this I played around with different setups for the monitors, keyboards, and mice. I settled on the horizontal approach (as seen in the picture). So now I have a laptop, mouse, keyboard, 20″ LCD, workstation, and 21″ widescreen LCD. And I will soon be swapping out my old laptop (Dell Inspiron 8600) for my newly arrived laptop (HP Compaq nc8430). And this is fantastic.

Sidenote: This would be really cool if I could get rid of the requirement that I use Windows XP on the 2nd workstation (I need it for testing purposes since Cadena should work on Windows as well as it works in Linux).
Permalink
09.05.07
Posted in SAnToS at 9:01 pm by Todd
An attempt at installing OpenSUSE on my HP laptop didn’t last long. I downloaded the CDs, burned them, and booted the laptop using them. Configured the install, it started, and it got part way before hitting a snag — it prompted me to insert the 4th CD in the set. The download page implies that I only need the 1st 3 CDs in the set to install (and that the others are “optional”) so I only downloaded and burned them. When in fact I needed all 5 for the install to complete.
Not sure if this is a documentation issue or a programming issue. Either way the conclusion to this saga is the same: OpenSUSE install on the HP Compaq nc8430 was unsuccessful. Next Linux distro please.
I should probably make it clear that I could have simply downloaded and burned the other 2 “Base” CDs and continued with the install. But I was a little ticked-off that this happened. Besides, instead of being able to simply click the links, I had to right-click and choose “Save As” (I know, this is a bit of whining on my part). And I also wasn’t all that interested in OpenSUSE to begin with after the Novell deal with Microsoft.
Permalink
09.04.07
Posted in SAnToS at 9:49 am by Todd
Over the next couple of weeks I will be documenting my experience as I try to install Linux on my new HP Compaq nc8430. You have already read about my troubles with HP and Vista so you should see why I want to move to Linux. This story will be told in parts that document my attempts with different Linux distributions including Fedora, Ubuntu, OpenSUSE, and Gentoo.
So for all of you who have noticed, this is the reason I haven’t been blogging much lately. All of my free time has been devoted to getting my laptop installed and ready-to-roll. Hopefully this will make up for it (probably not since my readers are non-nerds and couldn’t care less about Linux).
Permalink