Friday, February 11, 2011

Java Audio, FreeTTS "LINE UNAVAILABLE" Error

A program based on FreeTTS, the free text-to-speech engine for Java, was getting occasional errors
"LINE UNAVAILABLE: Format is ..."
The reason was later found in the KDE desktop: Its configuration panel has options to keep the audio device open for some time after playing beeps or other desktop sounds. The default seemed to be rather high at 60 seconds. But even after changing that to only 2 seconds, the FreeTTS library still needs to compete with some occasional other users of the audio devices.
Turns out there is no Java Exception or other mechanism to detect this error that occurs inside the FreeTTS library. All you get is the message on System.out, so there is no good way to react programatically.

Workaround: Configure the FreeTTS audio player to attempt accessing the audio device more than once until it succeeds. In this example, a short delay of 0.1 seconds is used to not miss an opportunity to grab the audio device; we keep trying for 30 seconds:
System.setProperty("com.sun.speech.freetts.audio.AudioPlayer.openFailDelayMs", "100");
System.setProperty("com.sun.speech.freetts.audio.AudioPlayer.totalOpenFailDelayMs", "30000");
If the audio device is permanently used by another program, there is of course no way to get access. Under Linux, this command will display the ID of the process that is currently holding the audio device, so you can then try to get rid of the offending program:
  /sbin/fuser /dev/dsp

Tuesday, January 18, 2011

Eclipse Build Path Problem After Mac OS X Java Update

In early January 2011, I received a Mac OS X Software Update that included Java changes.
This was on a Mac that had been upgraded to Snow Leopard, so older Java setups were still present, but this update must have removed older JVMs and JDKs.

As a result, Eclipse builds would fail with this error:
The container 'JRE System Library [J2SE-1.5]' references non existing library '/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/laf.jar'
In general, the OS X Java setup changed from using
/System/Library/Frameworks/Java.VM.framework/Versions/...
to using a path like
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

After going to Eclipse/Preferences/Java/Installed JREs and "Add..."ing a new JVM that uses the above path with ".../JavaVirtualMachines/..." all is fine again. You might have to look for the full path to that .../Home in a terminal window and copy/paste it into the Eclipse preference dialog, because the "Browse" button in the dialog might only show the 1.6.0.jdk as a package, not as a subdirectory into which you can drill down.

Next issue: You might not have a src.jar in that JDK to be able to view the Java sources, so you cannot view the source code for String, Map, ... and the other standard Java classes. That's because the default JDK is really more like a JRE.

After downloading the Java Development package from the Apple Developer Connection, something like javadeveloper_10.6_10m3261.dmg, you get a new JDK in

/Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk

and that one has a Content/Home/src.jar.
Note that the JDK that you install yourself, the one that includes the sources, is under /Library/Java/... while the Java stuff that comes with the OS is under /System/Library/Java/...

Eclipse should automatically detect the src.jar in the JDK that you install.

Note on finding the Java Development package as of August 2011:
  • http://developer.apple.com/
  • Member Center
  • Dev Centers: Mac
  • Resources
  • Mac OS X Developer Downloads
  • Java
  • Java for Mac OS X ... Developer ...

Friday, January 14, 2011

Eclipse Draw2D and GEF Sources, Online Help

When installing the Eclipse IDE for RCP development, it includes the Draw2D and GEF binaries, but not the sources. At least not in the Mac OS X version for Eclipse 3.5 and 3.6(.1).

How to get them: Also download the "Modeling" version of the IDE, and copy the following plugins from that into your RCP IDE's plugins directory:
  • org.eclipse.draw2d.doc.*.jar
  • org.eclipse.draw2d.source_*.jar
  • org.eclipse.gef.doc.*.jar
Yes, this contradicts everything you ever learned about P2, but it seemed the simplest way to get the sources & help.

Saturday, December 25, 2010

WII Coding

Tuesday, December 21, 2010

Light Switch Replaced

Light in one bedroom failed. Wasn't the light bulb. Worried that it's the light fixture or the wiring in the attic, but turned out to be the light switch. At Home Depot, found that it's the cheapest type of 15A, 120V single-pole switch: $1.30 incl. tax.

Monday, December 13, 2010

Top 5 Reasons NOT to use CA

CA (Cyanoacrylate) glue, super glue, instant glue, ... may just be the greatest thing that comes in small bottles.
Especially for model airplane kits where everything "interlocks", you can puzzle the pieces together, add a drop of CA to each joint, and you're done.
On the other hand, there also disadvantages, the top 5 being:
  1. The bottle always clogs up
  2. The fumes sting my eyes
  3. I've glued myself to the plane too often
  4. I'm in no hurry to finish an airplane because I already have too many airplanes
  5. It doesn't "sand" well

Tuesday, September 21, 2010

FreeMind

.. from http://freemind.sourceforge.net/wiki/index.php/Main_Page now has interesting extensions:

Friday, September 17, 2010

Netflix error in Safari: errorcode 2105

Netflix player stopped working from one day to the next with "ErrorCode 2105".
There was a link to nonsense about checking for fonts.

What helped:
  1. Close Safari
  2. Delete the file /Library/Internet Plug-Ins/Silverlight.plugin
  3. Start Safari, access Netflix, try to play movie, install the now missing Silverlight again
  4. Safari's Help/Installed Plugins shows Silverlight Plug-In version 4.0.50826.0

Saturday, September 4, 2010

Top 10 Computer Languages

According to http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html, it's
  • Java on top - Couldn't agree more
  • C before C++ - I'd still prefer C++ over C if used 'carefully', whatever that means
  • C# gains, but is behind
  • PHP, python above Perl - Hmm. For quick hacks, I do like perl
Systems that sound interesting, but looking at them I get a "well, maybe not":
  • go, Limbo: Inspired by Plan 9, built-in communication channels
  • Erlang
No longer seem to matter:
  • Prolog way down on list
  • Smalltalk off top-50

Saturday, August 14, 2010

LEGO Mindstorms RCX 2.0

Still have LEGO Mindstorms RCX 2.0 from ca. 2003. The original software that came with it does not run under Vista. It does run under Windows XP, but caused 2 problems:
  1. Will quit with an out-of-memory error when a current version of Quicktime is installed. Installing the older version of QT from the LEGO CD works, but will break online movie sites that require a more recent QT.
  2. The "Robotics Invention System" software will auto-start when Windows starts up. Remove the corresponding entry from the registry via regedit.exe in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
LEJOS, http://lejos.sourceforge.net, might be a better choice for the actual program, but the graphical LEGO program is neat for children.

Tuesday, August 3, 2010

Garage Door Repair

How long do garage door mechanisms last?
Don't remember all the dates, but had to replace a motor and a spring already. Today another spring. While doing that, noticed that a wire was damaged, so swapped that and also needed a new pulley.

WhenWhat
2006?Left garage spring
2008?Right garage Motor
2010Left garage spring, wire ropes, pulley $60

Saturday, July 17, 2010

Robbe "Geier" Flying Wing


Built from the long out-of-production Robbe "Geier" kit, which I found on eBay. Used the ribs etc. from the kit as patterns to cut pieces from balsa stock. Built-up fuselage instead of using plastic pod from kit, also using the transmitter's electronic V-tail mixing instead of the mechanical mixer from the kit.

Wingspan1.5m
Area46dm2
Weight925g
Wing Loading20g/dm2
EngineOS-15


Flies slowly, but can also go fast, very easy to handle. Motor runs for about 5 minutes. Typical flight time is 8 minutes unless it catches a thermal. Lands in grass. Not a great glider, but fun to race around the sky. When up high and only a black silhouette, it looks just like a bird.

KCRC Model-of-the-Month August 2010.



Monday, July 5, 2010

Chipsair Wackeltest

A scratch-built airplane for testing the OS 'Wankel' rotary engine.
Wingspan150cm
Wing Area34.5dm2
AirfoilEppler 197
Elevator6.25dm2
Stabilizer3dm2
Weight1700g
Wing Loading49g/dm2
A basic high-wing design with a slight old-timer look. Building started with the wing, using the E-197 outline printed with Profili. The rest was designed ad-hoc based on which pieces of wood happened to be available and what 'looked about right' with maybe a little inspiration from the DeHavilland Beaver to get the stabilizer outline and some 'round' windows on the side. Details of the front were determined after the rest of the plane was already covered to locate the engine such that the CG would be at 25% of the wing cord.
To reduce stress on the wankel engine, full-throttle runs are limited. In addition, the oil content of the fuel is raised by adding 2oz castor oil per gallon.
The plane flies great, like a trainer, but with more than enough power for vertical climb-out after takeoff. Most of the time I fly at 1/3 throttle. At full throttle it can flip and roll like crazy. On landings, it bounces easily if still at 'floating' speed.

KCRC Model-of-the-Month July 2010.


Friday, July 2, 2010

The Ultimate AL-811 Tuneup Checklist

Overall Tuneup
  1. Amplifier HV, STBY, OFF
  2. Adjust Antenna Tuner
  3. Set Band Switch
  4. Transmitter power low
  5. Turn ON. Check Tubes lit, Plate Voltage ~1.7kV, Plate and Grid current 0mA
  6. Preset LOAD and PLATE
    MHzLOADPLATE
    7.12.257.5
    14.03.08.75
    14.153.38.75
    14.33.758.75
    18.13.38.7

  7. Ip, XMT OPR. Check plate current Ip=0mA. Key in SSB mode. Ip~60mA
  8. In CW mode, increate Xmtr power until Plate Current 450mA or Grid Current 100mA
  9. Tune PLATE, LOAD, PLATE for max power. Keep LOAD a little to the right of max. output power. Stay below 100W input, 450mA plate, 150mA grid.
ALC
  1. Set Xmtr power to get about 400W amplifier output
  2. Connect ALC line, adjust ALC (back of amplifier) so that output starts to drop a little bit. From now on, Xmtr output is limited to generating 400W amp out.

Thursday, June 24, 2010

List of Things

Things to try, buy, finish, ... in no particular order
Done:
  • Traxxas Slash
  • Linear Amplifier, abt. 500W
  • Marklin "Ticket To Ride" game

Friday, June 11, 2010

APRS Links

Sunday, June 6, 2010

Comcast Arris Cable/Phone Modem Signal Levels

After intermittent phone problems via our Arris Touchstone digital phone and cable modem, a Comcast technician adjusted the signal levels and checked connectors outside of the house. Now that everything is good again, they look like this:

Go to http://192.168.100.1 to view the RF status.
  • Downstream should be around 0 dBmV (currently it's -1 dBmV)
  • Upstream should be around 45 dBmV
A few weeks later, there were still too many times when the modem seemed to restart/reboot on its own or otherwise loose connections (most LEDs on its front off). It was replaced with a Thompson RCA DHG536 modem that uses the same http://192.168.100.1 to view its status.

Wednesday, June 2, 2010

QRZ.COM Web Parser Limitations

Writing a web page parser for QRZ.COM recently became harder because you have to log in to see the more detailed information about operator location etc.

That's probably why Ham Radio Deluxe and other programs announced that they'll
stop supporting their QRZ.COM web page parser and instead use only
the QRZ.COM XML interface.

Good news: The interface allows name and country lookup for every
QRZ.COM user.

Bad news: Have to be registered. That's free, but means that all lookups
are traced to your user ID.
For the full information (grid, location, license info, ...) you have
to be a subscribed user, about $25 per year.

May not be that much money considering that QRZ.COM must have considerable
costs for keeping the page running.

Anyway, XML format detail is currently here:

Another option might be the FCC ULS data, access to which is described here: