Replacing The Battery In My MX1000
Friday, February 27, 2009
The battery capacity of my beloved Logitech MX1000 mouse had deteriorated over time. It was lasting only 2-3 days tops before the charge level would turn red, its lowest level. So I decided to find out how I could replace the internal, "non-replaceable" battery.
As it turns out, doing so isn't too bad. There are multiple sites available with instructions. While they are OK instructions, I have a few comments.
I ordered an NP-120 camera battery to replace the one inside the MX1000. Before we put in the new battery, we decided to take apart the old one. Inside the blue casing of the original battery, the three wires are soldered to a small circuit board. It was easy to unsolder the wires, and this allowed us to use the full length of the wire. Having more wire to work with made things a lot easier, because there isn't a lot of room to play with.
It is generally not a good idea to expose batteries to heat, so why would you think to put a very hot soldering iron to it? We came up with a better idea. We cut small strips of brass which we bent into U shapes and soldered the battery wires to the brass plates. Then we put the bent brass plates up against the battery contacts, and held them in place using self-fusing silicon tape. This kind of tape may also be known as "self-vulcanizing tape" although I believe the use of that word is incorrect. The tape isn't sticky at all, but has a layer of plastic which you peel off, allowing the tape to fuse to itself. Before you try to put the battery in the mouse, it is a very good idea to check the contacts by connecting a voltmeter to the socketed end that plugs into the PCB. As usual, red is positive and black is negative.
We ran into more problems when we tried to put the battery back in. It appeared that our tape arrangement had added too much thickness to the battery, and it wouldn't fit very well in the casing. Putting it back together might go well for a bit, but we found it was simply too much when we tried to fit the whole mouse back together. Since we didn't want to change our arrangement of the battery contact, we decided to get rid of the entire battery holder and hot glue the battery to the inside top of the mouse. This ended up working quite well, and the mouse fit together with a snap.
The result is a much better performing MX1000. The battery now lasts a solid 7 days before needing a recharge, and I'm quite happy with that. If I ever need to, I can replace the battery again for $10 and get more life out of a great mouse.
Like hardware hacking? You might try hacking your toner drums to get more life out of them.
Brasero Or: How I Learned To Stop Burning Coasters And Love K3B
Thursday, February 12, 2009
Whenever I burn a CD from an ISO, I md5sum the CD to confirm the data was written correctly. Using the beauty of Linux, I can md5sum the cdrom device directly using "md5sum /dev/cdrom".
One day I was trying to burn OpenSolaris 2008.11 to check out the awesomeness of ZFS. After I burned the disk using Brasero, I tried to md5sum it. I was greeted with a rather strange error: "md5sum: /dev/cdrom: Input/output error". Input/output error? Is my drive going bad? I presumed it was the media. I put in another CD of the same brand and tried again. Nope. The batch of media was pretty old, so I decided to try another brand/batch. Maybe it's my drive? Five coasters later...
At this point I'm starting to think this is a software issue. Was there an update in 8.10 that made this not work? No, it worked on other disks. Googling, I came to this page at BigAdmin which describes the symptoms perfectly.
As it turns out, Brasero was burning the ISO using track-at-once. The problem with this is, as quoted from BigAdmin:
"the last block may be confused with the lead out area, and some drives will not read it properly. Thus your MD5 checksums will fail. You can pad the last blocks using the -pad option of cdrecord, but your checksums still might not match as you have added additional data to the CD that was not present in the original ISO image."
The solution? Make sure to set the record mode to disc-at-once (session-at-once may also work) in your CD burning software. I simply could not find this setting in Brasero, so I installed K3B and found it easily under "Writing Mode". Lesson learned.
Has this ever happened to you? Leave a comment!
Hacking Toner Drums To Get Your Money's Worth
Wednesday, February 11, 2009
There has been a recent trend in consumer printers that really annoys me: Printers that lie to the user and report that they are out of ink or toner when they are not.
A couple days ago the toner light started flashing on my relatively new Brother HL-2140 laser printer. It had printed less than 500 pages since I bought it, and I really wasn't too impressed with the starter drum. In addition, the last pages I printed left no indication that the toner was running out. I had heard rumors that there was a way to trick the printer into thinking that the toner drum was full, thus enabling me to continue to print. I pulled information from multiple sites, so I will summarize here:
- Turn off printer, unplug
- Take out the drum
- Find the holes / areas used for detecting how much toner is left.
- Cover found holes with something opaque. A small piece of paper and transparent tape works well, as does black electrical tape.
- Put the drum back in
- Plug in and turn on printer
After doing this to my own printer, the toner light went off, I continued to print about 30 some pages just fine, and everything seems to be working. I've heard of people getting quite a bit more life out of their toner drums using this method, but I'm ordering a new drum to be on the safe side.
Photos of what I did on both ends of the drum:
Did this work for you? Do you know more about how the printer senses the ink level? Leave a comment!
Hackett and Bankwell: A Comic About Linux
Wednesday, February 4, 2009
Quite a while ago at the Ubuntu MD Team's release party for Intrepid Ibex, Ron Swift showed the group something really cool: The first issue of an educational comic about Linux called "Hackett and Bankwell." The first issue covers the adventures of characters Woody Hackett (tux) and Jerome Bankwell as they help a documentary production studio install and use Ubuntu. The thing is... it's really not dorky. No, seriously! Check out the first issue in PDF form here.
Hackett and Bankwell Worldwide, related characters, names, and all related indicia are trademarks and copyrights of Intarcorp LTD, licensed by Intarcorp LTD. Image copyright Intarcorp LTD.
Supposed Ubuntu Speedups - Concurrency=shell, readahead profile
Wednesday, December 31, 2008
After seeing Lifehacker blog about a number of Ubuntu speedups, I decided to test some of them to see their actual effectiveness.
The test machine was a Lenovo T61 with a Core 2 Duo T7500 @ 2.2 ghz and 3GB RAM. All boot times are from the grub menu (started when I pressed enter to start the boot) to the appearance of the login screen. I started with a completely fresh installation of Ubuntu 8.10 which I updated and rebooted 3 times. The default settings are "concurrency=none" in /etc/init.d/rc, but I'm unsure of the default readahead settings. It's possible Ubuntu tries to create a profile after installation, but I have no proof of that, so I assume there is no profile.
The results:
- No modifications (concurrency=none, no readahead profile) - 29.8 sec
- Concurrency=shell, no readahead profile - 29.2 sec
- Concurrency=shell, readahead profile - 28.7 sec
- Concurrency=none, rebuilt readahead profile - 29.2 sec
Here is my full action log:
- Install 8.10
- Update
- Restart x 2
- Restart, timed boot - 30.0 sec
- Restart, timed boot - 29.6 sec
- Set concurrency=shell in /etc/init.d/rc
- Restart, timed boot - 29.9 sec
- Restart, timed boot - 29.1 sec
- Restart, added "profile" to end of grub line
- Timed boot for profile creation - 1 min, 27.7 sec (This is normal)
- Restart, timed boot - 28.7 sec
- Restart, timed boot - 27.9 sec
- Restart, timed boot - 29.6 sec
- Set concurrency=none in /etc/init.d/rc
- Restart, added "profile" to end of grub line
- Timed boot for profile creation - 1 min, 29.1 sec (This is normal)
- Restart, timed boot - 29.3 sec
- Restart, timed boot - 29.1 sec
Ubuntu boot times - CD vs USB flash drive
Saturday, November 1, 2008
New with Ubuntu 8.10 "Intrepid Ibex" is the ability to create a bootable USB flash drive with a persistent filesystem.
I compared the time to start from when I pressed enter for "Try Ubuntu" until the desktop had loaded with the panel, icons, and wallpaper. Here's what I found:
USB flash drive: 1:44
CD: 2:40
That's a pretty significant improvement in speed! Also, since there's no CD to spin up, anything requiring data off the drive occurs with much less lag. Of course, your results may vary. Transfer speeds on flash drives do vary. I found that my Cruzer Micro 2GB was much faster than a PNY Attache 1GB.
This is so great, one of my flash drives will probably be dedicated to it. :-)
Amazon S3 upload script
Thursday, October 9, 2008
I want to share with you a script I've been hacking on to quickly and easily upload files to Amazon's S3 service. upload_to_s3.py takes the name of the bucket as a parameter, and a list of files to upload from standard in. It is intended to run in the background, and communicates to the user by libnotify/pynotify. When it's done uploading, the clipboard is set with the url(s) to the file(s).
Please note that before using upload_to_s3.py, you must enter your S3 access key and secret access key in the script.
Example usage:
cd /directory/with/media/files/The script requires Amazon's S3 Library for REST in Python. As of version 2007-11-05, I had to follow user uuorld's suggestion to modify line 295:
find | grep -v ".svn" | python /path/to/update_s3.py
"I found that changing the lineBig thanks go out to Adrian Holovaty for his script that I hacked on quite a bit. See his blog post here.
headers['Date'] = time.strftime("%a, %d %b %Y %X GMT", time.gmtime())
to
headers['Date'] = time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime())
resolved some issues I was having with different locales using 24 or 12-hour clocks."
As always, please feel free to email me comments or suggestions about the code.
I'm using this script to incorporate right click uploading into Thunar. Here's how I'm doing it:* Edit -> Configure Custom Action - > New
* Name: "Upload to S3 random"
* Command: `echo %f | python "/path/to/upload_to_s3.py" bucket` (You need to change the path and the bucket. Do not include the backticks.)
* Icon -> Action Icons -> gtk-go-up
* Appearance conditions -> All except directories
Unfortunately, I don't believe you can use a custom action to upload multiple files using this script because Thunar space delimits the paths. When your paths have spaces, you can no longer separate each file.
Enjoy!
UPDATE:
It seems S3 has become more strict about the headers required in file upload, so this script needs a minor patch to add the Content-Length header. In the conn.put call, add
'Content-Length': len(filedata)
to the data dictionary.