Thursday, September 29, 2005

moto4lin on Mac OS X

Thanks to quite a bit of help from the lead developer for moto4lin (who hails from Ukraine), I was able to get moto4lin compiling and working on Mac OS X, and I've solved 2 of my top issues with my new phone due to this through SEEM editing.
It turned out that there were quite a few obstacles to getting this working. I had made an attempt at this a while back with no luck. I assumed when I couldn't compile p2kmoto because libusb was missing that it was futile because libusb was a Linux specific library. Later, I saw a post on motomodders.net from a moto4lin developer (Dion) which claimed that moto4lin could be ported and asked for a Mac user to help test it. I later was able to chat with the developer through Jabber over the course of the past couple weeks. First we were able to get libusb compiled and installed since this already had Mac OS X support. Next, we started by trying to compile the p2kmoto library and associated p2ktest command line tool. This is the lowest level device interaction code. At first I couldn't compile at all due to the autoconfigure stuff having some problems. Finally I hand made a makefile to compile the two files of interest. Then there was a lot of back and forth testing p2kmoto. At first, it was able to switch the phone into p2k mode, but not do anything more after that. The phone would freeze until I either removed the battery or unplugged and replugged the USB cable several times. A bit later we realized that the p2kmoto code was assuming the host system was little endian, which was causing problems since the phone is natively big endian and it was swapping the bytes unnecessarily. I then fixed part of the problem and was able to get a slightly different error and not lock up the phone. A couple days later Dion provided me with a fixed p2kmoto.c and I was able to run through the full test successfully yesterday evening. Then we started working on getting moto4lin compiled and working. Once I had Qt installed, this was actually not too bad. Dion ported the changes over from p2kmoto to moto4lin and sent me updated files for that, and I made a couple small tweaks to get the build environment working. So currently I have a working moto4lin.app which I was able to do seem edits and browse the phone filesystem with. So far I've fixed the dashes not showing up in phone numbers, strange SMS messages for voicemail notification, and turned off the startup animation. I also had to turn off the voicemail dial for the 1 key in order to keep my automatic password entry. I just added a phone book entry with the voicemail number and password and assigned that to speed dial 1. Now, if only I could figure out some way to deactivate the side buttons when the flip is closed. Update: I was able to deactivate the "smart" button on the side by editing the key mapping SEEM. No more unintentional ring mode changes! As a bonus I didn't have to disable the volume up and down buttons so everything else works as before.

10 comments:

Natalie Townsend said...

I have no idea what you're talking about but congratulations! wanna chat tomorrow?

Jason Townsend said...

Yeah, that would be cool.

Don't worry about not understanding... it's sort of a geek moment but the main idea is I was able to customize my phone to fix some annoying issues with it from before.

Sam said...

I have to admit, I had to do a bit of investigation to fingure out what this software does myself! Even so, you get a gold star for contributing to the Mac open source world.

Anonymous said...

Please update your posting for your main issue.

Jason Townsend said...

Which issue are you referring to?

Natalie Townsend said...

hey Jason, have you abandoned your blog? I have returned to find the same post at the top of the page almost 4 weeks later. where's the love?

Jason Townsend said...

No... I haven't abandoned the blog, just haven't done a post for a while.

Anonymous said...

Can moto4lin work via Bluetooth? or does it need a USB cable?

Anonymous said...

I cannot get moto4lin to compile on OS X for anything. I've tried everything, even had all packages installed the app required, but still nothing.

Is it at all possible you could post the compiled app somewhere for Download?

Anonymous said...

christoper, check out www.modmymoto.com and get binaries of moto4lin and others.

I'm trying to get the flasher package working but libusb just won't compile. Ugh. moto4lin though is mostly functional, if not poorly documented.