Enabling JMX in JBoss AS 6 and JDK 6

I'm trying to create a demo of VisualVM (a really neat BCI tool that now ships with Oracle's JDK 6) connecting to Red Hat's JBoss Application Server 6. The wrinkle is that there is some interaction with JBoss' LogManager when JMX is turned on. This results in a torrent of class not found exceptions when starting up the Application Server.

To quell these errors, the following lines have to be added to the run.conf:


# stuff for JMX
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=6789"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
JAVA_OPTS="$JAVA_OPTS -Djava.rmi.server.hostname=your.jboss.ip.address"
JAVA_OPTS="$JAVA_OPTS -Djboss.platform.mbeanserver"
JAVA_OPTS="$JAVA_OPTS -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl"

# there's an interaction between JDK 6 and JBoss LogManager when JMX is turned on..
JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
JAVA_OPTS="$JAVA_OPTS -Dorg.jboss.logging.Logger.pluginClass=org.jboss.logging.logmanager.LoggerPluginImpl"
JBOSS_CLASSPATH="$JBOSS_CLASSPATH:/home/orly/sw/jboss-6.0.0.Final/lib/jboss-logmanager.jar"


Note that the above example turns off all authentication for JMX connections.. not something you'd want to do on a server that's on a public IP. But I am lazy.. in any case, if you're using Linux, you can use IPTables to restrict which IP's can connect to your JMX port.

How to Uninstall Expired LauncherPro from Android Phone

LauncherPro is an abomination of an Android application that expires itself after some time. In fairness to the developer, it pops up some nagware screens every now and then. However it then goes off the deep end into pure evil-ness:

Once expired, LP will not let you do anything except launch a browser and go to the LP web site to download the latest version. There are two bad things about this:
  • not everyone has a data connection (my phone line has no data plan); other folks went roaming and disabled their data plan. Imagine their surprise when they get off the plane in their home country and find that LauncherPro has bricked their phone.
  • in my case, Wi-Fi was turned off. LP is so incredibly bone-headed, it won't let you access phone settings to enable Wi-Fi!
Some folks suggest using ADB from the Android SDK to force-uninstall LP. However this didn't work for me, as the phone needs to be in Debug mode for ADB to work.

Guess what.. with LP hogging the home button, you can't go to Settings to turn on Debug mode.

I finally found a workable solution: download the latest LauncherPro APK (or hopefully any other APK). Connect your phone to your PC and mount the SD card. Copy the new APK to the top-level of the SD card and rename it to something short (like lp.apk).

Unmount the phone, then in the phone browser (which is the only thing LP lets you run), type the following in the URL bar:

file:///sdcard/lp.apk

(notice the three slashes)

This will force-launch the Installer application on the phone. Now on my phone, it was set to disallow non-Android Market apps from installing; since the APK is not off the Android Market, the phone popped up an error and offered to let me change the application setting. Which launches the Settings application.

The Settings application also allows you to uninstall applications.

Which finally allowed me to get rid of that misbegotten abomination LauncherPro.

On the other hand, if your phone was already configured to allow non-Android Market apps to install, you may not get the Settings up. In which case, allow the newer LP to install and hopefully the expiration bricking would go away.

Me, I've sworn off LauncherPro forever. Get ADW Launcher instead.

Telescope Mount Hacking

I purchased a Vixen Polaris mount off Astromart about a month ago. With my only past experience a lightweight Chinese equatorial mount, I knew that the Vixen would be a significant improvement.

I had to make a minor modification to the mount so that it can be used at very low latitudes, since Singapore is pretty much on the Equator.

My solution was to remove the existing metal pad which the latitude adjustment screw bore on, and placed a Teflon pad on the screw tip. I used a drill bit to ream out a cup-shaped divot on the Teflon pad. The latitude adjustment screw rests on this divot, and the pressure of the Vixen polar casing on the pad ensures that it doesn't fall off.



I still have to rig a half-pier (the real Vixen ones cost $200, more than I paid for the entire mount and tripod). This will allow enough clearance for the counterweight so the mount can be fully used close to the Equator.

Like many of these twenty-year old Vixen mounts, mine was missing the tripod leg spreader tray. I still had some spare 9mm plywood circles from my on-hold Dobsonian project, so I used that.



I also had an Orion EQ-1M quartz-controlled RA motor drive from the mini-EQ that I bought last year; I had given up on using this motor on the EQ-1 because that mount has a lot of backlash on its worm gear.

A few days ago I had the bright idea of trying to use the EQ-1M on the Vixen Polaris. I was expecting that an additional metal bracket or adapter would be needed to mount the Orion motor on the Polaris. But to my surprise, it bolted right up to an existing bolt on the Vixen housing:

 
Absolutely no mechanical changes were necessary to hook up the EQ-1M to the Polaris; however since there is no clutch, the RA slow-motion knob is unusable with the EQ-1M attached. Not a bad trade-off.

The EQ-1M tracked as designed: which, while better than no tracking, was not so great either. The Orion EQ-1 has a 100-tooth worm wheel, while all of the Vixen light and medium-weight mounts (Polaris, Super Polaris, Great Polaris) use 144-tooth mounts. This meant that the EQ-1M turned too slowly to track for more then 2-3 minutes at a time.

I decided to open up the EQ-1M hand box and see how to adjust the speed. I knew that the EQ-1M uses a stepper motor and was hoping there was some potentiometer inside the hand box that I could adjust to change the speed.



Opening up the hand box was quite straightforward. The first step was to pry off the caps on the key switches. After which I removed the two small screws that hold the 6V power plug on.



I then removed the four screws on the top cover; this allowed the top cover to be pried off quite easily. There was a daughter-board (or if we want to sound complicated, a "mezzanine board") screwed into the main circuit board on stand-offs. This daughter board held the key switches, and also had to be removed.





There were two integrated circuits on the main circuit board: a 74LS05 hex inverter, and an Atmel 89C2051-24 micro-controller. The Atmel had a 3.58MHz clock crystal. It was obvious that a dedicated stepper motor controller chip was not being used; instead, the Atmel was creating the stepping waveforms in software.



It immediately occurred to me that I could "speed up" the stepping waveform by making the CPU run faster. A quick check online showed that the Atmel is an Intel 8051-compatible chip, and can run at up to 24MHz.

The best-practice method of creating precise timing delays on an 8051 uses a countdown timer. Much like the 8253 in the original IBM PC! and crucially, the countdown timer decrements on every machine cycle, which is the main CPU clock, divided by 12.

So it was obvious that, assuming Orion used the best-practice for generating the waveforms, that the stepper frequency was directly related to the CPU clock, which is controlled by the 3.58MHz crystal.

Since the EQ-1M was designed for a 100-tooth worm gear, and the Vixen has a 144-tooth gear, the CPU would need to be sped up by 44% (144 / 100). This meant I would need a 5.15MHz crystal (3.58MHz x 1.44). No such crystal exists off-the-shelf, although Citizen (makers of the Eco-Drive watch, among other things..) has a 5.33MHz part. It's not generally available though (28-day lead time at Mouser) so I decided to go with a 5MHz crystal.

I had a very good experience with RS Online Singapore. I've purchased electronics parts from RS Philippines before, and they've always offered free delivery, but RS Philippines only takes bank deposits, and delivery takes a few days.

Anyway, I was able to buy a 5MHz crystal from RS Singapore; I put in the order at 2:00 a.m. and by 4:00 p.m. same day I had my crystals. I actually ordered six of them (5MHz, 6MHz, and 8MHz) because I wanted to try different speeds in case the 5MHz crystal didn't work out. Also the crystals cost $1 to $2 a pop, and I wasn't sure if RS would deliver a $2 part.

To replace the existing 3.58MHz crystal, the main circuit board had to be removed from the EQ-1M case. This required unscrewing three more small screws that went into the plastic. There were two machine bolts that held the stepper motor cable to the board; I removed these too but it turns out that step is un-necessary.



Un-soldering the existing crystal and attaching the 5MHz one was quite straightforward for anyone who's taken EE 12. The new crystal was much larger, so I had to bend it a bit so it wouldn't touch the keypad daughter board.



I also put a swatch of masking tape on the new crystal so it didn't short out any of the connectors on the underside of the daughter board.



Putting the handbox back together was straightforward; I decided against testing the EQ-1M dis-assembled, because taking it apart again would be quite easy anyway.

And the result: I had expected the mount to keep an object (Lunar crater) in the field for about 15 minutes at 215X, as opposed to 3 minutes un-modded, and 1 minute with no tracking. To my great surprise, the mount kept the Lunar crater in the FOV for much longer than I expected. I don't really know how long it could keep tracking, because I stopped timing after 40 minutes.

Overall, a great success!

And the end-result: my grab-and-go setup.