Wednesday, May 23, 2012

Replacing Seals on a Fox RL Fork - The Missing Manual

Fox provides information on replacing the oil and seals for a F29 (i.e. Float 29er) RL or RLC fork shock here:  However, when I tackled this myself, on an RL model shock, there were quite a few things that were not adequately explained for a DIYer in Fox's instructions.  Hope this helps someone else who is wrenching on their own bike instead of taking it to a shop and rolling the dice on getting a capable mechanic.

Step 1 - Removing the rebound knob.
Note: I'm not the only one who had troubles here:
  • Fox's instructions fail to say what size wrench to use for the hex screw in the rebound adjuster knob.  I found the screw to be ver sloppy with a 2mm allen wrench, and too small for a 2.5mm allen wrench to fit.  All fittings on a bicycle SHOULD be metric, but in this case, a SAE 3/32" (which is about 0.094 inches, or about 2.4mm) fits much more snugly into the screw, reducing the chances of stripping out the head on the hex screw. 
    Note: For other poorly fitting hex screws you encounter, this chart is helpful:
  •  Fox's instructions fail to suggest how to hold the rebound knob to avoid damage to the fork's internals or the knob as you apply the torque necessary to loosen the hex screw.  This photo shows how I managed to get a grip on it using curved needlenose pliers and a piece of innertube with a hole punched in the middle.

Step 2 - Removing the lockout lever on the RL model shock.
  • The pictures in Fox's instructions show the lockout lever that uses 3 grub screws and retention balls. Newer RL shocks (2010+?) do not have the 1.5mm grub screws.  The lever is retained using a spring clip that expands into a slot inside the blue aluminum lockout lever.  It needs to be popped loose using a hammer against a soft-material drift that won't scratch the lever or the crown on the fork.  I used a short piece of thick-walled 1" PVC pipe (plastic), but a wooden dowel would also probably work.  
  • It would also be useful to remember how the lockout lever aligns with the hex shaped end of the hollow adjustment shaft.  Before removing the lever, it might help to use a scoring tool to make an alignment mark on the flat side of the shaft that lines up with the handle of the lever.
Here's what the inside looks like so you know what you're trying to pop

Step 3 - Removing the Top Cap
The only tip here is that although Fox's instructions say you might want to grind down a 26mm socket so it will mesh better with the wrench flats on the top cap, they don't mention _how_ to grind down a socket or specifically what grinding makes a difference.
  • HOW:  If you have a socket driver bit for a drill that's the right sized for the 26mm socket, you can spin the socket against coarse sandpaper with a high speed drill for 10 or 15 minutes (depending on the hardness of the socket's metal).  If you're using a battery powered drill, be sure you switch it to "drill" speed instead of "screwdriver" speed or it could take WAY longer to grind the socket down.  
  • WHY: Fox's picture shows a bevel on the outer edge of the socket, which might seem like a good idea to keep from scratching the finish on parts of the fork _around_ the top-cap.  However, that's NOT the point of grinding it down.  Many sockets are made with a bit of a bevel on the _inside_ edge that serves as an alignment ramp, making it easier slide the socket onto normal nuts or bolts.  That beveled part might be a few millimeters deep, which is not a concern for normal nuts and bolts.  However, unlike a normal nut or bolt, the fork's top-cap wrench faces are only a few millimeters thick.  That means a typical socket might only engage the top-cap's wrench faces with the beveled part, giving it a very sloppy grip on the part.  The point is to grind the end of the socket down past the bevels, so that the socket's inner faces are exactly 26mm, all the way to the leading edge, giving a solid mesh between the socket and the top-cap.
  • After you have the front edge of the socket ground flat, then you could also bevel the outer edge to prevent scratching the fork, or to make the socket smoother to handle in the shop, but that part probably isn't entirely necessary.
Here is a photo of the 26mm ground down socket (on the left) and another socket that has not been ground down.  Notice the cupped bevel on the not-ground-down socket (on the right) and the flat, abrupt inner edges on the one that is ground down to get a firm grip on the fork's top cap.

 More to come when/if I have a chance to help one of my riding buddies replace the oil and seals in their Fox fork/shock.  The rest of Fox's instructions were okay regarding the "how" part, but still left out a lot of the "why" part.

A company called Real World Cycling makes aftermarket seal kits for quite a few shocks/forks.  Their product is named Enduro seals (not to be confused with the Specialized bike model).  It might help fill in some gaps to take a look at their instructions for replacing the seals.  Their products seem to be a pretty good alternative to the stock Fox parts too.
 If you order something from Real World Cycling, tell them you found their products from this blog post and maybe they'll send me a shirt or a hat.

Tuesday, April 3, 2012

Retail Renegade

It was around Christmas time when I was working at a mall electronics store during the break from college.  Back then, this particular electronics store was dragging behind the rest of the computerized "point of sale terminal" retail world.  We wrote up each sale manually.  You heard that right... we actually had to use a pen and a little pressure-copy paper sales ticket book.  Partially because of the time it took to process each customer this way, and partially because the store was just that busy, we were wall-to-wall with toe-tapping, impatient customers, anxious for their turn to refuse a name and address, plunk down a wad of cash, and escape the noisy, claustrophobic tunnel shaped store to return to the soothing echoes of water fountains outside in the main corridor of the mall.  There were probably ten of us working that afternoon, each facing down our own micro-mob of 10 or so customers that grew by one as fast or faster than we could reduce it by one.  Even the store manager was tending to routine sales, shoulder to shoulder with the rest of us, obviously unable to attend any more esoteric activities for which he would normally be accountable.

Then, into our peripheral vision stormed a woman, somewhat past middle age, wielding an answering machine with wires hanging out everywhere.  With brazen disregard for the conventions of waiting one's turn, she barged her way to the counter and demanded to know "Who's the manager?"  Several of us silently pointed to the store manager, who I'll call Bob, because that was his name.  The narrow store full of 100 plus irritated and weary patrons fell to a hush of whispers as the woman barged her way across several lines to Bob's station at the counter.  The woman then asked Bob to verify, "Are you the manager?"  Bob answered incredulously but politely "Yeeessssss."  The crowded store was now populated by a wide-eyed, slack-jawed, and morbidly silent mass.  All activity ceased, as everyone waited to observe what came next.  Even the fountains in the mall corridor seemed to pause and listen.

The woman then announced, "I have kind of a long story."  Everyone in the store was now stunned into stillness, not even daring to rustle paper for fear of missing Bob's reply.  Bob was now confronted with the task of succinctly shutting down one of the most obnoxious, oblivious, and self-centered old bats that ever darkened the door of a mall electronics store so inappropriately during the height of the holiday rush.  Maybe Bob was just being his "smarty-pants" self but to the sensibilities of everyone present (except the woman herself), Bob became the retail hero of the day with his short reply, "Could I just hear the end of it?" Everyone erupted in laughter and applause as the woman huffed and barged her way back out of the crowded, over-busy store, ranting threats about reporting this or that to the district manager. 

For the next half hour or so, Bob got many handshakes and congratulatory pats on the back.  The tensions were a little lighter among the customers who got to witness Bob's particular brand of retail justice.  The woman really seemed to believe that she had the right to push her way ahead of everyone else, and she may have been humiliated by Bob's wry response (her own fault), so she may have actually felt justified in complaining to the district manager.  Bob may have then received a reprimand from the district manager as a formality  But, assuming the facts were verified, any disciplinary action certainly came with a wink and an off-the-record at-a-boy.

I only worked with Bob for a few years before moving on to non-retail jobs.  However, he proved time and again to be one of the most helpful, insightful, witty, and understanding managers (retail or otherwise) with whom I have ever had the privilege to work.  This is only one example of the things Bob did, whether intentional or just because he was being Bob, to make the mall-retail employment experience bearable, and even enjoyable.  Thanks Bob!!

Thursday, March 8, 2012

JBoss AS 7 - How to set the context root for an EJB3 WebService

Apologies to anyone who read one of my other blog posts and thought this one would be something interesting for anyone other than the very specific few who want this particular answer.  I tried to warn you with the title of the post.  For those of you who are reading because the JBoss Docs are, as ever, disorganized and littered with gaping holes, into which you are supposed to pour your guesses, past experience, head scratches, and frustrated, perplexed gazes, read on...

This is a simple answer that came from another week long session of searching, reading between the lines of the many attempts to document JBoss 7, and a little bit of guessing.  This particular topic applies to JBoss AS version 7 or 7.1.

Previous versions of JBoss used a file named jboss.xml to set these things.  JBoss AS 7.x uses a different file named jboss-webservices.xml instead.  And, the new file doesn't go in the same place as the old file.

If you have a contextual backdrop of general JBoss knowledge, the information you need is reasonably complete here:  Otherwise, you probably need some of that context too.

Building an EAR for deployment in JBoss 7, which contains an EJB3 jar file as a module, using maven to build the jar and the ear file, gives you, by default, a really UGLY context path for the EJB WebService endpoint that shows the entire name of the jar artifact.  For instance, if your EJB maven project had an artifactId of WeatherServices-FIVE-DAY-FORECAST-EJB, and its version was 1.0.0-SNAPSHOT, then the jar artifact name would probably be WeatherService-FIVE-DAY-FORECAST-EJB-1.0.0-SNAPSHOT.jar.  Thats ok since maven gives us all a healthy shove towards naming jar artifacts in a way that makes it VERY hard to screw up and use the wrong version of some library.

Then you might have Maven build an ear file, using the maven-ear-plugin to include the EJB jar file using an ejbModule directive as follows


Then when you deploy that ear to JBoss AS 7, you get an endpoint address something like


Suppose what you wanted was more like this:


After days of googling and guessing (hopefully fewer days if you find this first), you figure out that you need the file called jboss-webservices.xml in the EJB jar's META-INF directory, and it has to have contents like the following:

<?xml version="1.0" encoding="UTF-8"?>
<webservices version="1.0" 

The things that were not clear from the documentation, which took some trial and error, were:
  1. Does jboss-webservices.xml go in the EJB jar file's META-INF? (yes), or the ear file's META-INF? (no).
  2. Is there a way to specify the context root for an ejbModule in the maven plugin, like you can for a webModule? No. And if you've found a way, please post it in a comment.
  3. Is there an alternative to the @WebContext jboss specific annotation in the EJB @Stateless class for a JAX-WS service?  Apparently not.  The port-component tag in jboss-webservices.xml is supposedly intended only to configure JAX-RPC services.  See:

Thursday, March 1, 2012

Samsung Galaxy S2 AWOL on Windows 7 x64

For weeks now, I've been transferring files to and from my Samsung Galaxy S II via Bluetooth.  Bluetooth is sometimes convenient, for a hands free speakerphone or headphones, or other things like that, but for file transfer, it just isn't capable of the necessary speed.  So, I finally got to a point where I needed to transfer several larger files to the phone, and Bluetooth wasn't up to the task.  But my phone wouldn't connect via USB, and nothing I tried would make it connect either.  Then after several hours of searching through forums and reading numerous guesses about why Windows 7 won't see the phone's USB devices or load the right drivers, and trying the many pedestrian, junior-wizard-wannabe, ineffective solutions, I finally, almost accidentally, tripped over the obscure bits of information to get it working.  Most of the stuff in the middle here is just editorial context so this article might match more of the keywords people might be using to search for this information, so if you just want the answer, skip ahead to the numbered, step-by-step stuff at the bottom.

The particular version of the SG2 is the SGH-T989 / T-Mobile version, but that probably doesn't matter.  I'd like to rant for a few paragraphs (ok, maybe a few _pages_) about the boneheadedness of each cell service provider having their own, slightly different, version of essentially the same Samsung phone, which makes it VERY annoying to choose accessories that will actually fit one or another version, but I'll leave that for another day.

I was a bit skeptical about some of the information I found at first.  Some of the instructions looked like something that would to appear in 2600 magazine ( describing how to take over operator control and phrack the local telco to get free long distance.  But, that was back in the day when that sort of thing would have been a superlative geeky achievement.  There's a bit below that starts with "Enter the following symbols and numbers:" followed by a super double secret special code that only Samsung/Android uber-hackers would have any way of knowing.  That had me wondering what post-land-line, 1-900 equivalent, $10 per minute nonsense I was about to be lured into calling.  Then it occurred to me that as long as I didn't type 911 or hit the connect button, it would probably be safe enough to proceed with caution.

The forum messages where I found part of the solution said that the troubles occur "when the phone is upgraded to Android 2.3.4 and above," but I would amend that to say that the troubles could occur if the Android version _is_ 2.3.4 or above, even if the phone came out of the box with that version already on it.

The problem is that Windows 7 does not recognize that the phones has been connected via USB.  And, as the forum messages stated (more or less), even if the correct device drivers are installed on the computer, Windows 7 can't figure out what the device is and completely fails to figure out that the USB connected device actually needs to use those drivers.

The symptoms that might help you decide whether this solution holds promise for you are:
  • The Windows Device Manager shows "unknown device"
  • The Windows Device Manager shows "Bluetooth Peripheral Device"
  • Device install dialog shows "No Driver Found" for a Bluetooth Peripheral Device
  • Device install dialog shows red X beside a few devices.
  • Using the USB Utilities / USB Mass Storage Device "Connect storage to PC" function does not work.
  • Using the "USB Debugging" development feature does not work.
  • (More symptoms added later if it happens to me again so I can see the messages, errors, device names, etc.)
The things you could have tried that didn't solve the problem might include:
  • Installing the Samsung USB device driver
  • Installing the Samsung KIES sync application
  • Enabling "USB debugging" on the phone settings under Applications - Development
  • Enabling "Allow mock locations" on the phone settings under Applications - Development
  • Attempting to use the "Connect storage to PC" feature on the phone settings under "Wireless and network" - "USB utilities".
  • Finding the device in Windows Device Manager and clicking the "Update driver" button on the Driver tab in the device's properties dialog.
So, here's the magic solution.  (It's weird.  It's aggravating that it's hidden.  There's only a 95% chance that it will work.  73% of all statistics are made up on the spot.)
  1. Open the phone dialer as if to make voice call.
  2. Enter the following symbols and numbers:   *#7284#
  3. Wonder with amazement how that would result in a settings dialog appearing on the screen.
  4. Find the USB section (there should only be 2 sections, UART, and USB).
  5. If the USB option is set to MODEM, tap PDA
  6. If the USB option is set to PDA already, tap MODEM, and then tap PDA
  7. Watch the screen on the Windows 7 PC to see if the Device Installed notifications show up.
  8. Open Windows (File) Explorer on the Windows 7 PC to see if the Removable Disk devices show up now.  Note, you still probably won't be able to access files on those devices, but if they show up, that's a good sign.  If you click one of the Removable Disk drives letters in Windows at this point, it will probably show a prompt to "Please insert a disk into Removable Disk (E:)" (or whatever drive letter it is mapped to.)
Now if you're running KIES to sync the phone data to the PC, you probably don't need to do anything else besides start the KIES application, but if you want to access files on those "Removable Device" drive letters that showed up, there's one more thing you have to do.
  1. Go into the settings and choose "Wireless and network", then choose "USB Utilities"
  2. Tap the "Connect storage to PC" button (for training purposes)
  3. Notice that for some aggravating but unknown reason, you get a message stating the obvious "Attention - USB is connected. Remove the cable"
  4. Tap OK and do as it says... unplug the USB cable.
  5. Now, tap the "Connect storage to PC" button again and it should show a message saying "USB utilities - Connect USB cable to use mass storage"
  6. Plug the cable back in and the android robot icon should show up with a message saying "USB connected"... but wait... there's more.
  7. Tap the "Connect USB storage" button
  8. Finally, the phone should display a message that says "USB storage in use" and the Removable Disk drives on the Windows 7 PC should now allow access to the files.  (Note: There are two removable drives if you have a micro SD card installed, but if there is no SD card in the phone, there may be only one Removable Disk showing in Windows).

I would put a link and reference to the original forum post where I found this information, but even that information had been echoed from somewhere else, so instead of tracking down the original sources of this magic helpful information, I'll just leave that for you to find in your favorite web search engine if you really feel like doing that.

Please leave comments if any of this is unclear or if you have additional tips to share (or even if this fixed it for you and you just want to say thanks).  I have comment moderation turned on, so don't worry if your comment doesn't show up immediately.  I'll get to it and publish it usually within a few days.