Posted by Scott Hughes
Fri, 17 Mar 2006 00:51:00 GMT
Since posting my OneWireViewer App+Source for Mac OS X last August, I still see fairly regular downloads of it in my stats. I also still see lots of hits from google searches for “1-wire” and “mac osx”. I thought I’d let any interested parties know that we are gearing up to release our 1-Wire Public Domain Kit (C code) very soon (likely this month). I put in some effort for this release to create a specific Serial (DS9097U) and USB (DS2490/DS9490) build for Mac OS X. The release will include full source and a build file, as well as pre-built Universal Binaries of all of the example apps. Those without much programming knowledge looking to integrate 1-Wire into bigger systems should appreciate that.
Learning how to build the Universal Binaries was a bit of a chore, but once you get the hang of it it’s fairly simple. The biggest complication was building a Universal Binary for libUSB and since I wanted my libUSB-dependent app to be Universal, I had to jump through hoops to get it to work. I was able to get 0.1.12 to build an Intel library just fine on my Intel Mac (though <= 0.1.11 didn’t work for me, so mind your sources). I couldn’t get it to build the Universal binary due to it’s use of ‘ar’ and ‘ranlib’ (which, according to this tech note from Apple does bad things to Universals). I’m not a configure or makefile whiz and I got a little stumped on the parts of the makefile where gcc was being used to generate new makefiles dynamically (wasn’t aware of this feature before). Apparently when using -MT (to generate new makefile rules) you can’t pass multiple architectures along with your compile command (i.e. “-arch i386 -arch ppc”). I ended up doing things the hard way and just compiling the PPC binary on a PPC mac, and then merging the two with lipo (i.e. “lipo -create -output uni.lib ppc.lib intel.lib”). After all that, I discovered a nice pkg installer for a Universal libUSB that someone else was nice enough to pre-build and distribute for us. I recommend this installer for the easiest path to a Universal binary of libUSB.
My next task is to recompile my Java-to-libUSB-to-1-Wire solution (for OneWireViewer and the rest of the examples in the 1-Wire API for Java) as a Universal Binary. I also need to put a little effort into making it work with libUSB on Linux, so I can update the “live” WebStart version of OneWireViewer with virtually out-of-the-box support for every platofrm. The 1-Wire API for Java was scheduled for release this quarter (ending in 2 weeks), so I hope to have all this done in time to ship out the door with the release.
Posted in 1-Wire, Code | Tags 1-Wire, iButton, MacOSX | 7 comments
Posted by Scott Hughes
Mon, 06 Mar 2006 05:08:00 GMT
It’s usually pretty tough living on the bleeding edge, but Apple has made things a lot easier with their switch to Intel. Thanks to Rosetta, you can still run just about all of your PowerPC applications under emulation. Since the emulation is obviously going to be slower, I’m trying to stay clear of any PowerPC apps if I can, especially if they are meant to run all the time (daemons). Apple created a handy logo to identify apps which are Universal (containing binary code for both Intel and PowerPC architectures), but I’ve found that there are some apps that still aren’t using logo. This means I typically have to visit the changelog of my favorite apps and search for the keyword “universal”. Optionally, you can download the app, select it in the finder, and hit Command-I to get its information screen. From there, you can see if it’s a PowerPC app under the “Kind” heading. It’ll read either “Kind: Application (Universal)” or “Kind: Application (PowerPC)”. If I find that it’s a PowerPC app, the url for it gets dragged into my “Waiting For Universal” folder in my Bookmarks Bar.
I did get bit by an app recently and I didn’t see it coming. I noticed a frustrating amount of slowdown on my MacBook Pro, especially when switching tasks. I searched for a long time to figure out which app I had loaded that was slowing me down by so much. My memory usage was extremely low, so disk swapping wasn’t the problem. CPU usage was next to nothing, so I was stumped as to what it could be. I had a 5-10 second delay when switching apps or when bringing up the dashboard, so something was definitely misbehaving. I checked my Console (Applications/Utiilities/Console.App) and I found that I had several plugins for Quicksilver and Mail.app which were throwing linker errors. The errors came from the fact that they are PowerPC plugins that got moved over via the Migration assistant. Even after removing those, I still had the noticable slowdown.
Finally I tried the Activity Monitor (Applications/Utiilities/ActivityMonitor.App). If you right-click on the column headers, you’ll see a drop-down to select which fields are available. Select the “Kind” field. Now sort on that field and you’ll see all of the PowerPC applications (those running under Rosetta) on your machine. These are the most likely to be causing slowdown, especially the daemon apps who are constantly performing work in the background. I found my culprit easily: The Delicious Library Dashboard Widget. Delicious Library was a Universal app, so I wouldn’t have suspected it. But the handy widget included with it has a separate binary component and that’s built as a PowerPC application (either that or the installer for the latest version failed to overwrite my old widget). After removing it from the Dashboard, I was again cruising at full speed. I sent Delicious Monster some feedback about the widget; seems to be an easy enough fix that I’ll bet it’s corrected before my RSS feed is updated.
If your MacBook Pro (or other Intel Mac) is experiencing slowdown (so early in its life!), I’d suggest you perform the same investigation. As an aside, here are some of the apps in my current waiting list now:
Posted in OSX | Tags MacBook, MacBook_Pro, MacBookPro, MacIntel, MacOSX | 4 comments
Posted by Scott Hughes
Sun, 15 Jan 2006 19:30:00 GMT
I just couldn’t resist its siren call… I’ve been looking for a good reason to upgrade and Steve Jobs finally announced it at the last MacWorld. An Intel-based Apple laptop, with a 4-5x power increase over the previous generation of PowerBooks. I’d been looking to upgrade the Mac Mini to something beefier, but the stats on the PowerBooks didn’t have me convinced that I would’ve noticed too much of a performance increase. I thought I was going to be stuck with one of the desktop G5’s, but I was really hoping that I could finally find a high-performance laptop as my next desktop replacement.
I went with the $2499 model:
- 1.83Ghz Intel Core Duo
- 1GB PC2-5300 DDR2
- 15.4” Widescreen Display
- 100GB 7200 RPM HDD (upgraded from the 5400 RPM drive)
- 802.11g, Bluetooh 2.0, Gigabit Ethernet, iSight, USB 2.0, Firewire 400
It’s an expensive machine, considering that I usually self-build my machines for well under $1000. I did get a slight discount on it, which basically equated to the retail price without tax. It’s my first real laptop machine (omitting a retired clunker or two that someone’s given me), though it will spend most of it’s time docked on my 20” lcd monitor at home. I am looking forward to the ability to undock it and bring some work with me.
The Mac Mini will likely become my HTPC (Home Theater PC). I’m not sure how that’ll work out, but now that you can install Apple’s Front Row on any Mac, I just need to find some way to remote control it.
Update:

The wait is killing me!
I can’t wait for this thing to ship. Apple is torturing me with the mid-February ship date. Some folks are reporting that they are getting their units the week prior.
I guess the demand is pretty high. Hopefully that translates into making the demand for all the apps that I want to run on an Intel Mac equally as high, so I’ll see Universal Binaries without much delay.
BTW, this obsessing over ship date contrasts nicely with my wife’s treatment of her Nano. She got it in before she received the screen protectors, so she just left it in the box and waited patiently for two weeks. I guess that makes us a good pair, technology obsessive vs. technology calm and accepting.
Posted in Technology | Tags Apple, MacBookPro, MacOSX | 2 comments
Posted by Scott Hughes
Tue, 10 Jan 2006 17:48:00 GMT
… Your keynote brings the entire internet to a grinding halt. All the tech news sites are at full stop as Mac geeks sit constantly refreshing the page, to see which rumors are true. Full disclosure: I’ve been refreshing TUAW’s live chatcast, so I’m contributing to the problem. So far, looks like iPhoto has added Photocasting.. But only for .Mac users. Nothing else has caught my eye yet, but I’m hoping for affordable Intel-based laptops to be announced.
Posted in OSX | Tags Apple, MacOSX | no comments
Posted by Scott Hughes
Tue, 20 Dec 2005 22:17:00 GMT
I’ve been drooling at the dual- or quad-core G5’s for a while now, trying to decide whether or not I want to spend that kind of money on a new computer. I’m really very happy with the Mac Mini; you certainly can’t complain about its price. But I do still have some speed concerns. Specifically, application startup time can be horrendous. Applications which hog a lot of memory (like Firefox) can be unbearable to restart. The current solution has been to never shut anything down. Sometimes switching between applications becomes cumbersome, but never as slow as a fresh startup. Before I traded up to the big Macs, which have way more power than I’ll really need, I want to see if it’s possible to give the Mini just a little more juice.
Read more...
Posted in Technology | Tags benchmark, Firewire, MacMini, MacOSX | no comments
Posted by Scott Hughes
Fri, 04 Nov 2005 14:28:00 GMT
I had my first frightening Mac crash last night. I was using CocoaMySQL to set up the latest Typo and Rails on a test server, when the app locked up by taking up 100% of the cpu. This is something CocoaMySQL does for me frequently, but I tolerate it because it is a nice interface and I can usually just restart it (and I haven’t found a better GUI alternative).
Read more...
Posted in OSX | Tags crash, mac, MacOSX, mini, osx | 6 comments
Posted by shughes
Fri, 05 Aug 2005 15:33:00 GMT
In my previous post (TiVo and Mac OSX: Remux Redux), I discussed a GUI and command-line option for re-muxing video from a TiVo on OSX. Well, the command-line option was based on a perl script called TivoTool. The developer of that perl script has gone on to create a very slick GUI around it.
I got an email from the developer a few weeks ago about the new GUI, and I’ve been meaning to write about it, but I had a few problems with earlier revisions. For example, I couldn’t get it to save my video on an external volume… The new file would simply disappear. That said, I’m very excited to see that the tool is being very actively developed, with a new release today that adds some slick features.
I have to say that with this tool, I no longer regret leaving behind the win32-only TyTool.
Technorati Tags: MacOSX, TiVo
Posted in OSX, TiVo | Tags MacOSX, TiVo | no comments
Posted by shughes
Fri, 05 Aug 2005 01:52:00 GMT
I had a few people post in the comments about getting a copy of the OneWireViewer update I did… A few email me privately. I’ve been emailing it out to people as it’s requested, but now that I have a good web hosting service, I may as well put it out on the intarweb proper-like.
For now, this is a binary-only distribution. I want to do some more testing with it and make a similar binary distribution for Linux before I make this official. Once I’m convinced that it’s as robust as the PC solution, we’ll move it over to the official Dallas Semiconductor ftp site. Although most of the source is available online (1-Wire API for Java and 1-Wire Public Domain Kit on maxim-ic.com, libusb on libusb.sourceforget.net, rxtx on rxtx.org), some of the glue I used to make this work isn’t. I’ll try to make that available soon to people who want to dig around in that part of it.
Don’t blame me if this application sets your pretty Macintosh computer on fire.
OWV-Beta-2.dmg (2.4mb)
If you have any success with this at all, please leave a comment and let me know.
Technorati Tags: 1-Wire, iButton, MacOSX
Posted in OSX, 1-Wire | Tags 1-Wire, MacOSX | 29 comments
Posted by shughes
Tue, 05 Jul 2005 03:10:00 GMT
Take a look at this screen capture to see how I spent my 4th of July vacation weekend.
I ended up taking the libusb build of the 1-Wire Public Domain Kit and creating a JNI-wrapper around it. Now I’ve got a nice USB Adapter driver for the Java API (and hence for OneWireViewer). I’m going to look into modifying the WebStart download so that it will deliver the new USB adapter and the binary (JNI) portion of it. Possibly, I can sneak the libusb drivers along with that as well, without causing too much confusion. Maybe make 2 builds, one that includes libusb for people who aren’t cmd-line savvy enough to build their own and one that doesn’t.
The good news is that this should work on Linux, Mac OSX, and Windows. Windows users will have to install a .inf file first, but it will be a single-click application for Linux and Mac.
Update (7/10/2005): I used JarBundler to create a nice .App bundle of this for Mac OS X users. It’s pretty nice to have a installable .App of OneWireViewer that supports both the USB Adapter (DS9490) and the Serial Adapter (DS9097U) on Mac OS X. Unfortunately, I don’t have a good place to host it.. I’m not sure in it’s current form if it’s suitable for an official release to go up on the dalsemi ftp servers. So, if you’d like to try it, just leave a comment and include your email address (not in the comment, but in the regular email address field, where I will be able to see it but noone else will) and I can email you a copy of the app. It’s 2.3mb compressed.
Posted in 1-Wire, OSX, Code | Tags 1-Wire, iButton, MacOSX | 9 comments
Posted by shughes
Tue, 28 Jun 2005 03:00:00 GMT
A couple of weeks ago, I made a comment in Chris’ blog post about how he tried to ruin his laptop with a bottle of water. For your convenience, here’s my relevant addition to his story where I tried to ruin my delicate Apple hardware…
Last weekend, Nicole was using my brand new Mac Mini. Of course, that also means she was using my almost brand new Dell 2005fpw 20” lcd… Not to mention my mostly new wireless keyboard. And, she was drinking coffee while doing this. So, I’m playing fetch with the dog downstairs. The way our apt is laid out, we have a second floor with a sort of balcony over the living room which is where my mac mini lives. I decide to give the dog a good challenge by tossing his toy over the balcony edge to where Nicole is sitting. Nothing but net… The toy went straight into the coffeee, splashing coffee everywhere. Keyboard was the worst hit, but I did actually get a big splash on the Mac Mini. It looks like it’s going to survive, but I have a nice brown stain on the felt in the slot loader to remind me of what an idiot I am. I think I got the keyboard back to a good state, though if the N sticks on me again, I’ll have to buy a new one. Can’t tolerate sticky keys, you know…
Today, thanks to a remnant of that mess, I learned a couple of things about my Mac Mini…
- Dried coffee is like hardened cement when placed between my computer desk and the rubber bottom of the Mac Mini and will, in most circumstances, require an actual chisel to separate the two.
- That little power cord in the back slips out of the Mac Mini like a frightened, greased pig at the county fair.
- Mac OSX does not berate you for improper shutdown of your system, unlike Windows XP.
That third point is an interesting one to me. I’m very familiar with recovery on Windows, given that prior to WinXP crashes were quite frequent… I’m sure Mac OSX must have some sort of method for recovering orphaned files and, perhaps, booting into a safe mode if I installed something which hosed the boot process…
I need to add that to my “to research” list…
Technorati Tags: MacMini, MacOSX
Posted in Humor, Personal, OSX | Tags MacMini, MacOSX | no comments