Saturday, February 24, 2007


Wild Hogs
Next week, a movie called Wild Hogs is coming out. This, I think, will be akin to the time that Malcom Forbes started riding Harleys, in terms of what it will do to the motorcycle industry. Already bursting at the seams with beneficial factors such as high gas prices (and motorcycles' obvious fuel economy), this movie is bound to continue a long time trend of increasing popularity for motorcycles, and especially Harleys among Americans. I think it will replace Poker as the next big thing. In any event, us long-time riders are well into this sport, and we who ride to work every day have noticed that it is the little things, like retaining all your limbs, fingers, hearing, eyes, and so on that really matter to a rider. To tie this back to cell phones, which I have been talking about a lot lately, I want to point out just how great the Sony Ericsson walkman phones are for a motorcycle rider like me. I was just out riding today enjoying the luxury of a radio on two wheels, usually only avaiable to those with high-end fairings on high-end bikes. Oh, and before I start, I want to bring you full disclosure: I am not afilliated with SE in any way, and I'm not paid to talk about these phones; this is just a hobby of mine for now. If they want to send me a w810i or something to review, though, I won't complain.

Fairing speakers
If you drive a car every day, you may take something like radio for granted. You get to listen to the radio pretty much any time you want, and you can actually hear it most of the time. On a bike, things aren't quite so simple. If you do go the fairing route, you have a couple of speakers built into your fairing, and usually some controls on the handlebars to adjust volume and whatnot. To be able to hear those speakers over the substantial wind noise, it is important to crank them up far beyond what you would ever do in a car. This means a lot of wattage output, and it just adds to the ongoing hearing damage I spoke about earlier, not to mention creating a kind of noise pollution beyond just the loud pipes on most Harleys. Other than that, they're ok. Oh, and they cost about a hundred bucks.

I also have an iPod mini (since supplanted by the iPod nano) which I love, because it holds 6 gigs of songs, rather than the measley 1 gig of a Sony memory stick micro (m2) on the Sony Ericsson phones. If they just went with SD memory or something, we could get a lot more on it. On the other hand, having only 1 gig of space made me choose the songs I liked more carefully, instead of having my entire collection on the phone. If iTunes would selelct the songs instead, my problems would be over. Just yesterday, I found this tool to let you use iTunes to do just that, with your Walkman phone, or several other types of portable devices, including the Playstation Portable.

In any event, I tried the iPod on my motorcycle, and apart from having to listen to the same 1000 songs over and over, rather than fresh radio content, the default iPod earphones are not nearly as good as the ones that come with the Walkman phones, especially when it comes to external noise. For one thing, the iPod earbuds are much larger and more rigid than the Walkman earbuds, so I can't even wear them inside my full face helmet. Being a big-brained geek, I have to wear an XXL helmet, and even then my face is squished inside the thing like a chipmunk. There's just no extra room, even for little things like iPod earbuds. The Walkman earbuds fit almost completely inside the ear, and the rigid part of them is so tiny as to be unnoticeable. Further, the loose rubber parabolic lining around the earbud forms a seal with the inside of your ear to block out a huge amount of external noise. This means you don't have to turn up the volume so much on your phone, and you also don't hear the wind and motor noise as much. Even if you turn the phone off completely, these earbuds are the best earplugs I've ever used on a bike. Don't accept any imitation knockoffs, get the real thing from Sony Ericsson when you buy your Walkman phone.

Phone calls
Oh, and as an added bonus, if you're using the earbuds as earplugs or to listen to prerecorded music or the radio (all of which these phones support), you just have to push a button to answer the phone when someone calls you. Again, car drivers will not appreciate this at all. It is beyond inconvenient to try to reach into your pocket and open a phone while you are riding a motorcycle. It is simply impossible. You have to keep your right hand on the gas or brake, and your left is generally used to clutch in, so your hands are full when you ride. Alternately, you could use bluetooth handsfree headsets with this phone, but I don't recommend it for bikers, because of the noise factor. Finally, one more feature that is supported is voice dialing, which lets you call hands-free with a magic word. Making phone calls might still be a little dubious when you're going down the highway at 100mph with no windshield, but for around town, it's not bad.

Ride on
So, if all this (and the movie) makes you want to join us on the road, have fun, be safe, and if Harley wants to send me a Road King to review, I'll be happy to do it.

Wednesday, February 21, 2007

Debranding w300i walkthrough

Why debrand?
First I want to talk about the pros/cons of debranding. If you have already decided to do it, skip this section; however if you don't know the cons I recommend you read this. I debranded from Cingular; your pros/cons may vary somewhat. I have a Sony Ericsson w300i phone that I got new for Christmas. I immediately began developing software for it. By debranding it, I was able to overcome a major weakness in development, namely I can now test my Bluetooth applications on my phone without getting them signed by Cingular. So, the biggest pro is that you can set permissions on even unsigned Java apps to fairly reasonable defaults if you debrand. Second pro is that some carrier-added limitations are removed. You have to research this to find out what they are. For my phone, Cingular disabled Flash themes. To me, this is not a big deal, because I don't care much about ringtones/themes/etc. Some carriers disable mp3 ringtones; a much bigger deal as far as I'm concerned. On the con side, debranding caused my phone to lose mobiTV, mobiRadio, and mobile e-mail applications that Cingular had installed. It is not currently possible to put these things back on, because they are signed by a Cingular certificate that is stored in the Cingular-branded phones only. Generic debranded phone will not have this certificate. Menus and such moved around, and a few buttons that used to do one thing now do another, but these are minor points. More problematic is that you will void your warranty on the phone, and you might break the phone to the point that you need a service cable to fix it. Finally, as a con, the debranding process will destroy anything you had in your phone, including ringtones and Java games you have purchased, themes, contacts, music, etc. Even if you move your Java games to the memory stick, they will not be there after you debrand. Finally, if you do anything that ruins your phone, I am not responsible. Don't use this as your only source of information. Read up on things first if you don't know what you are doing.

Debranding services
Some cell phone service centers will debrand your phone for you. You can find them with a simple Google search. They charge about $60 for this service, and you generally have to get the phone to them physically, perhaps waiting overnight. If you are not highly technically inclined, go this route. If you might make a typo or you might not understand all of the following instructions, have someone else do it, by all means. Better yet don't do it at all, because you have no real reason to.

Quick and easy debrand
For this phone, it is my belief that if you do a Master Reset from the General Settings menu, you will debrand your phone. The default configuration is to go back to a generic Sony Ericsson file system with only Sony Certificates, etc. This will have the same effect as debranding. You lose the ability to back anything up this way, however, and you also lose all your carrier-provided features, such as ringtones, e-mail programs, etc.

Debranding Servers
There are two companies that I know of that will sell you some software and credits to debrand your phone. These are Wotanserver and Davinci Team. I started to use Wotan Server, which is fairly straightforward, but in the end I opted to do it myself, as described in the rest of this post. To debrand through Wotan Server, you just sign up on the server, pay a little money for a credit, download their client, and you're ready to go. To actually do the debranding, you start the software and follow the instructions. What you have to do is remove the battery from your phone, take out the SIM card and memory card, put the battery back in, and you are ready to connect. To connect, you start the software and wait for it to ask you, then you hold down the "c" button on your phone as you plug the USB cable into it with your other hand. The software will then proceed to flash your phone. As noted earlier, this wipes the phone clean as if you had just bought it. No contacts, etc. You have to go through the setup wizard all over again. If you don't like some of the new settings, you can't really change them unless they are already configurable on the phone. This disadvantage is somewhat mitigated by doing it yourself, because you can go back and hack back into the phone to fix things.

I only recommend this method to programmers and such. With this procedure, you can get into the guts of the phone and look around, and make changes. You can also do all kinds of things that may not even be legal, so be careful. In this instance you are breaking in to the phone. The best-case scenario of doing this, right now, is that you downgrade your main firmware to a more generic version that is not quite compatible with Cingular's file system. Fully charge your phone before you begin.

You will need the following software to get started:
Phone XS++V1.2 or later. At this link are links to the program; it is a free community-created tool for do-it-yourselfers. It comes in a RAR file, so you will need WinRar. You can also get Far manager 1.70 from the same place. Finally, you will need some drivers that some with the Sony Ericsson Update Service. The drivers that come with this will work for your purposes. XS++ installs to the folder you unrar it to; FAR manager and the rest install like normal windows programs and are run from the start menu. Each of these programs may have its own requirements, like Macromedia Flash player, .NET framework, Windows XP, and so on.

Once you have all these programs installed, you will need to add a plug-in to FAR manager. First get SEFP v010044 and unzip it to your computer. This will unzip to a folder called SEFP010044, which contains another folder called SEFP. Click on the SEFP folder can copy it. Then go to C:\Program Files\Far\Plugins, and paste SEFP at that level. Next get SEFP v010051 and unrar it and do the same copy/paste trick with SEFP. You do need both SEFP's because the second is an update to the first. This time Windows will warn you that you will
overwrite files, etc., just click yes. Finally, get the final file for your CID49 phone, and unrar it. This is called .zip, but it is actually rar'ed. This, too, has an SEFP folder under it, which again gets pasted into C:\Program Files\Far\Plugins, and again overwrites several files in that folder. Once you are done, go to the folder called C:\Program Files\Far\Plugins\SEFP, and you will see a program called sefp0.10.0.51patch.exe. Click on this program to run it, and it will ask you to apply a patch. Click do it. Nothing much seems to happen, but it is done. Close the window. If you miss any of these steps, you will get various error messages. Note that you are also required to have a regular COM port set up on your computer, even though you won't use it.

The final requirement is to get the firmwares that you are intending to use on your phone. These can be obtained, for example, from Note that this is primarily a Spanish site, which can present some challenges to registration, etc., which is required. You may also have to pay a couple of Euros to get access to the download area. On there, you can get R9A036 main and R9A036 file system, which are the ones you want for the w300i phone only. If you have some other phone, you are responsible for gettting the right firmware files. These won't work, and will kill your phone. You also want the customization files. Unzip/unrar all these and put them in the same folder with PhoneXS++V1.2, which is called that. Then go to your db2010cid49_4_alpha folder, and also get w300_p3k_dcu.49R.ssw and put it in the same folder with the rest. Note that there should be a couple of subfolders called files_to_upload and own_custpack which came from the customization files. Leave this folder structure intact.

Getting started
The first step is to remove your battery so you can take out your SIM card and memory card. Put the battery back in. Then run XS++ by double-clicking on its executable. This will bring up a small screen on which you can press the Start button. Once you do that, you will need to connect the phone, which you do by leaving it off, but holding down the "c" button while you attach it to the USB cable. If it recognizes your phone it will tell you so in the status window and switch to a view where you can put a MAIN file, an FS file, and customize. You may have to unplug the phone, take out the battery, and try again the first time, after it finds the device and so on. You don't ever want to customize with XS++1.2, because it doesn't work right on the w300i. Also, unless you are debranding your phone you don't want to update your file system. Even if you are debranding, you don't want to flash the file system just yet, because you want to back up your old one. It may some day be possible to restore branding when the R4EA031 firmware is found.

Flashing the phone
Now we reach the point of no return. Once you flash the first break-in file, you will be forced to at least update your main firmware (which will probably actually downgrade it to R9A036, unless you can get the right firmware). Click on the ... button on the right of the Main Firmware box in XS++. Then browse to whereever PhoneXS++V1.2 is located, which is where your w300_p3k_dcu.49R.ssw file should be. Choose that file for Main firmware, and make sure you have only checked Flash Main firmware. Click on the Flash button at the bottom, and it will begin. It will only flash 5 blocks this time, and it will probably hang at the end. This should only take about 20 seconds. Once it says 5/5, finishing flash, it will hang, and you can click Stop button, and ignore the warnings. It will say error and it failed, but it didn't. At this point your phone will not turn on, so don't turn it on. Unplug it from the USB cable, and pop the battery out and back in.

Far manager
Now run FAR manager from the start menu. Once it comes up, hit F11, which isn't even onscreen. This will give you access to the Plugins menu. From here, choose SEFP. This can be done by hitting the S key, which in the future you will want to do to not upset your settings. Here are some troubleshooting tips from

  1. If you get the error: "Unknown exception", Exception address: 0x7C812A5B...... The plugin will be Unloaded!
    This is a bug. It's because you don't have any COM-ports, so create a fake COM-port connection. I did it with my BT Dongle.
  2. if you get the error: " can be used with Service Cable ONLY".... browse to the SEFP folder and patch sefp.dll with sefp0.10.0.51patch.exe.
Choose DCU-60 cable, 115200, and w300_w810_z550_ in the three menus. Note that you make your choices simply by browsing over these choices without even clicking. This is easy to mess up. When you have your choices solid, approach the Enter The Matrix button from the bottom so you don't browse over your choices.
  1. If you get the error: "Script error code 0"
    This is because you didn't put in the SEFPv010044 before you put in the SEFPv010051. You have to do both, because the second one is just an update to the first. Then after that you have to do the sefp0.10.0.51patch.exe as described above.
This will ask you to connect your phone, which you do by holding down the C button and plugging it in. Soon a menu will come up on the left side with the words FLASH and FS. The flash feature doesn't work for FAR manager, so choose FS by double-clicking. This will then download some more things to your phone, and eventually after a nervous pause, your phone's file system will appear on the left side of the screen. Since you didn't yet flash your file system, you can make a backup of the one on the phone. That is accopmlished by choosing each of ifs, tpa, etc., and choosing the copy option from the bottom of the screen. This will coply the folder and all its contents to the location on the right side of the screen (C:\Program Files\Far by deafult). Once you have backed up your file system, click the .. on the left side. It will ask you if you want to close the CSFS loader, just say yes.

Flashing and customizing
Note that this section is unnecessary if you just wanted to hack in to your phone and not debrand it. You can still do all kinds of things with FAR manager without debranding, but you will need to do the next section steps to get your phone to run again. For now you will pop the battery out and put it back in, and start XS++ back up. Choose the start button, connect the phone as usual with "c" button held down, and select Flash File System. Now go choose the W300i_R9A036_FS_AMERICA_1_RED49.fbn file that you downloaded earlier, and start the flash. This will erase everything in your phone and start fresh. This task should complete normally without hanging. When it is finished, you are still not done. Disconnect, pop the battery out and in, and go back to FAR manager. Choose F11, S, keep the settings and Enter The Matrix, then FS. This time, you will want to find the folder where you put your customization files, called own_custpack. Open that folder on the right panel, and you should see the tpa folder on the right. There will also be a tpa folder on the left. Select the lone tpa folder on the right, and choose copy. This puts the folder from the disk onto the phone to customize it. Now the phone is debranded. Click the .. again on the left, until it asks you to exit CSFS loader, say yes. Finally you are done and ready to restore the main firmware. Remove and replace the battery.

Restoring the main firmware
This is the step that is necessary whether you debrand your phone or not. Start XS++ again. Check the Flash Main firmware checkbox only. Select the W300i_R9A036_MAIN_NAM_1_RED49.mbn file, and then choose the Flash button. This will start the process of copying about 336 blocks to the phone. When this completes, which should finish normally, your phone is ready. Disconnect it, take the battery out and put the SIM card and memory card back in, and turn it on. This should be the first time you actually turn on your phone since you started. It won't work anywhere in between. It will go through the original setup if you debranded it, otherwise it will just start as your normal phone; however some things will no longer work because of the step backward in firmware. In particular, a Cingular branded phone will have the Cingular Music menu item show up as Missing, but it will still work. Other things may not work so well.

Friday, February 16, 2007

Cingular cripples Google Maps on Cingular-branded phones

Draconian policies
Cingular's highly-restrictive Java security policies make using even popular applications like the Google Maps Java plug-in very tedious on Cingular branded phones. The policies are far more restrictive than the defaults for manufacturers of the phones. What this policy means is that we developers of applications must have a special relationship with Cingular, and get our applications signed by Cingular (who don't even trust us to get our own certificate; we must send our application to them), in order to even test our applications on our own phones.

Google Maps
Even Google's own Google Maps application is rendered more or less useless because the user is prompted over and over to make a connection to the web during casual use of the Google Maps Java plug-in. Granted Google could probably get their applications signed, but note that signing an application with a Cingular Preferred certificate will make it not install on non-Cingular phones. I assume this practice is similar amongst the other carriers, and so you would have to make numerous versions of your application to make it work, creating a different kind of problem for both users and developers.

Contrast with (better) more open policies
The manufacturers default firmware makes the phones far less restrictive. For example, Sony Ericsson will allow you to connect through bluetooth even from an unsigned application, but it will require prompting the user when the applictaion trys to connect. It will allow you to choose permissions on an app-by-app basis, and if you are silly enough to trust someone like Google, you can set a blanket permission on the app or at least an ask-once-per-session permission. Not the case if the phone is branded by Cingular; it is impossible to make such a connection without a Cingular Preferred certificate. The process for obtaining such a certificate is quite opaque; their website simply states that they are only handing out certificates to those with whom they already have a buisness relationship.

Legal trouble?
See these threads on their developer forums for several discussions between developers and Cingular representatives (free registration may be required). As outlined in this post from ArsTechnica a couple of days ago, this could result in legal trouble for the monopoly carriers once attention is paid to the problem. Perhaps we can stir up some attention by digging this post.

Currently, the only option open to an end-user (since we can't control what Google or Cingular do) is to go to sites such as Davinci Team or Wotan Server and get your phone debranded. This process is different from (and more risky than) unlocking the phone. It involves putting a new firmware on the phone, which causes you to lose all manufaturer-placed applications and features, along with any information you have stored on the phone. Aternately, you can get an unbranded, unlocked phone like this one.

Monday, February 12, 2007

Free Java games for your SonyEricsson phone

This post is to walk everyday owners of Sony Ericsson phones, such as the w300i or w800 series through the process of obtaining free (legal) games that can be downloaded directly to your phone and installed, without a data plan and without data charges, as long as you have the regular USB cable (and a computer with Internet and USB). This cable comes with the phone if you order it online from Cingular. If you don't have one, you can get it here. Yours might not look exactly like this one, but if it came with your phone it should work. You will also need a memory card to do the install. This phone is kind of worthless as a Walkman without the memory card, so you might want to go ahead and get the full 1 gig Memory Stick Micro (m2) card here. These are the only items you will have to purchase for this process, and they are useful for other things, such as playing music and synchronizing your phone calendar with Outlook too, so you will continue to use them.

If you don't have the cable, I believe (though I haven't tested it) you can use bluetooth instead. This involves having bluetooth hardware on your computer, and turning it on on the phone as well, and making the connection, all of which is beyond the scope of this article. If you have success with this, please post below in the comments. The remainder of this article assumes cable use only.

Once you have the cable, and you have installed the memory card (just slide the back off the battery compartment, and there is a small hole labelled M2; with the phone face down, the card should be face up and the arrow should point toward the phone), you need some free software from SonyEricsson. Their site is a little difficult to navigate, so I will walk you through it as of today. If you're in the US, go to this link and choose your phone from the list on the bottom. To get to this link from the main site, simply go to and choose your country, and then choose product support from the start page under "I have a Sony Ericsson phone." Once you have chosen your phone from the drop-down list, the list will appear blank again, and move to the left, which is weird. However, above that blank list should be a picture of your phone, indicating that you have properly chosen the phone already. Under Software and Setup, you'll see a link for Software downloads. This is the one you want. When you click that link, you should see a link to Sony Ericsson PC Suite. The direct link is here for my phone, but I recommend going through the steps to make sure you get the one that is compatible with your phone. Don't worry if the picture suddenly changes from, say, a W300i to a W800i, like I said the site is goofy. While you are there, you may want to get disc2phone, which will allow you to put music on your phone; a subject for another day.

Once on that page, you'll see a tiny link at the bottom saying "download setup xxx". Do this, and install the program. It will appear in your task menu as a picture of a candybar cell phone, and it will be installed as Sony Ericsson/Sony Ericsson PC Suite from the start menu. Now you are ready to plug in the USB cable and then plug the cable into your phone. As soon as you plug the phone in, it will want you to select "file transfer" or "phone mode" from the phone itself. Choose "phone mode"; you almost never need file transfer except when you are running disc2phone. Windows may go through some of its gyrations to install USB drivers and such; reboot when it asks and so on. At some point the PC Suite software will be connected to your phone, and the icon will lose it's red "X" and will just look like a phone.

At this point, you are ready to get some free games and send them to the phone. You can find some at (be sure to click through to, not You can get games, utilities, and so on. They're free, so they might not all work with your particular phone. If you get stuck in a game that you can't seem to leave, just hold down the back button for a menu. Let's say you choose games, board, and you want Dots 1.0.0. There will be two downloads, a jar and a jad. Generally you only need the jar file. Save it to your desktop (you might need to right-click and choose Save target as...). Then right-click on the cellphone icon in your task tray, and choose File Manager. This will bring up an explorer-like interface with your phone listed in it. Double-click on the phone, and you will see Memory Stick and Phone Memory. Use the + sign tree on the left side to explore the folders below this. Under Memory Stick is MSSEMC, under that is Media files, and under that is other. Click on other in the tree, and the area to the right should appear blank (unless you've done this before). Now open up a regular windows explorer (Start/My Computer and hit Up icon to get to the desktop). From there, drag your .jar file (such as Dots.jar) from the desktop into the SE explorer "other" folder. The phone may prompt you at this point to accept the file. Say yes.

Now that the .jar file is on the phone, you are ready to install it. Go to the file manager on your phone (you can leave it connected for the time being). The file manager is under the regular phone menu, and it has an icon that looks like a folder. Select the file menu, and scroll down to the "other" folder and open it. In there should be your jar file. Choose install, and it will ask if you want it in games or applications. Games is most likely. When it is done, you can start it right away, or you can get to it later from the entertainment icon (looks like a ps3 controller), under games. If you have trouble getting out of a game, hold down the back button for a menu.

In addition to, you can also go to Sony Ericsson itself for a number of free games (this link will get you to the wap server to choose your phone; your phone will have a set of applications and downloads). If you try to navigate to this link you can't get there, so just click on that link and select your phone-name. Anywhere else you can find J2me .jar files (known as midlets) might also work for your phone. Good luck! I will try to answer any questions posted below.

Cell Phone development - w300i


In November, the two-year contract on my cell phone ran out. This allowed me to upgrade my phone to a new phone. I really only needed to get a new battery, because the one I had was down to about a four-hour recharge cycle. However, it was cheaper to get a new and better phone than to get a new battery, because of the contract extension. I initially looked at the Motorola RAZR, and while researching it, found some hacking information. As a professional developer, this got me thinking about programming the phone in more official ways than hacking, and this led me to the Java 2 Micro Edition (J2ME). I also wanted a phone that had good mp3 playback, so I wouldn't have to carry a separate iPod. What I really wanted was the iPhone, of course, but it hadn't been announced yet. In the end, I selected the Sony Ericsson w300i, a nice Walkman phone packed with features for the price (it was $9.99 with the Cingular contract extension, since reduced to $0.00). As a consolation, a few days after the iPhone announcement, Sony Ericsson announced eight new phones, which have similar development environments to the w300i.

w300i features
The w300i has J2ME support, including the JSR184 3D gaming API as well as a Mascot Capsule micro 3D. It also supports bluetooth for headset use, computer USB connection, FM radio, mobile TV and e-mail, and multiplayer gaming. As you will see, this last bit was something of a sticking point with me, but as of today it has a happy ending! More on that later; first I want to walk you through getting started with development for this device.

Developer signup
Having received the phone just in time for Christmas, I immediately began looking around for software development kits (SDK's). The best place to start, if you are a Cingular customer, is here, at You will have to create an account, but it is free. Within that site is a lot of good information about phones, including Sony Ericsson. If you want to jump right in and get started with an SDK for the SE phones, it is here. The sites seem to follow the pattern of, including Motorola and others. Before you install the SE SDK, though, you will have to click on the release notes link to get your prerequisites set up. This includes the Sun J2SE SDK if you don't already have it. You will also need DirectX 8.1 or later, to run the emulators. With these installed, you are ready for the SE SDK mentioned above.

Sample projects
Once you have installed the SDK, you will have a new set of menu items under Sony Ericsson/Java ME SDK for CLDC. CLDC and MIDP are abstractions/subsets of Java that work for mobile phones. The w300i and most modern mobile phones use CLDC 1.0 and MIDP 2.0, which means your phone emulator will appear under the WTK2 menu under Sony Ericsson/Java ME SDK for CLDC/WTK2. You can also integrate all of this into an IDE, but you don't need to; it runs fairly smoothly as it is. The first program to run is Default Device Selection, which you only need to run once. Choose SonyEricsson_w300_Emu from the dropdown and hit ok. Done. Now you will want to run ktoolbar under the same menu (WTK2). There should be a number of sample projects prepopulated into this program, so you can just pick Open Project and choose one to run.

There is one sample that is a fairly complete application, called Bluegammon. It plays backgammon as single or multi player, through bluetooth. Or at least it would, if Cingular's security on this phone weren't so draconian. At any rate, without even connecting the phone you can run this program in the emulator, simply by opening the project, selecting the phone you want to emulate, and choosing run. A phone interface will come up, and the important thing to note is that the only way to interact with the application is through the buttons of the phone. You will try clicking on the phone screen itself, just out of habit, but when it doesn't work, you will remember that the buttons of the phone are what you need to click on. When you are ready to build the .jar and .jad files, which are the actual distributable executables, you just go to the ktoolbar Project menu and choose Package/Create Package. Don't worry about obfusacting or signing for now. If you have a Cingular-branded phone, the signing won't do much anyway unless you are already a Cingular Preferred vendor. I'll cover debranding your phone in a later post.

Installing programs
This post will walk you through installing .jar files onto the phone, through the data cable, without even using the SDK. Anyone can do this, without signing up as a developer. Here, I will cover on-device debug, and installing the projects that you have built from sample code or on your own.

Connecting to phone
From ktoolbar, you can open and build a project, run it, and create the .jar files, as I have discussed. Once you have done that, what you really want to do is run the program on the phone. The documentation is not very clear on this, but I will clue you in to the simple steps you need to do. From the "All Programs/Sony Ericsson/Java ME SDK for CLDC" menu on your computer, there is a program called "Connection Proxy Settings". This opens a file in notepad. The only thing you need to do in that file is change the comm: setting to comm: COM4. This should work for most computers, but you may have to go higher. Save that file and exit notepad. With your phone plugged in, and in Phone mode (not File Transfer), then choose the DeviceExplorer from the same CLDC computer menu. (It's OK if you have PC Suite installed and it connects to that too). The DeviceExplorer will automatically start the Connection Proxy. If the Connection Proxy fails to connect to your device, you might have to choose the settings icon (looks like a little green gear) from its menu. This will let you choose a port and baud rate. Again you want COM4.

Connection troubleshooting
In order to get connected, I had to open the PC Suite program (the little cell-phone icon in your system tray) and from its menu choose Tools/Phone Monitor Options... which brings up a dialog box. In that dialog box, there is a tab called COM ports. Here you want to make sure that any real com ports you have on your computer are disabled. That's a little anti-intuitive, but the device proxy drivers set up a fake com port above the ones on your computer. Reserved can be left at No. IMPORTANT NOTE: never shut down your computer with the phone connected. This messes up PC Suite and causes a program called generic.exe to crash when you reboot. It also makes your computer really slow. If this happens, just connect and unconnect the phone again, and restart the computer (this may take a while).

On-device debugging
Contrary to what I thought at first, you don't have to install anything special onto your phone to do on-device debugging. Once DeviceExplorer is connected and running, you should see a menu of stuff on your phone on the left, and a WTK applications folder on the right. If you open up this folder, you will see all of your projects from ktoolbar under it. If you open one of these, such as Bluegammon/bin, you will see your .jad and .jar files. To install to the phone, just right-click the .jad or .jar and choose Install. Note that this lets you skip all the stuff outlined in my other post. This puts the program on your phone, on the left. Then you can select the item on the left, and click the "play" icon in the menu above it. This starts the program on your phone. Now you can see the output from that program running in the window below. This includes System.out.println output, as well as exceptions. If you have Cingular, just go to the menu on the phone and try to play via bluetooth and set up a server. This will cause a security exception unless you sign the program with a Cingular Preferred certificate, and turn on bluetooth manually on the phone. Alternately, you can debrand the phone to overcome this limitation, through something like or This is different from and independent from unlocking. I will walk through this process in a future post.

Final important note:
Once you have DeviceExplorer running, the order of shutdown is important, or it will cause their programs to hang. Start by shutting down the device explorer. This will leave the device proxy running and connected. Disconnect before shutting this down, or it will hang. You can disconnect the phone without exiting the PC Suite program; that is, leave it minimized in the system tray. It will show up with a red X again when you exit it. You can shut down ktoolbar whenever you want; I haven't had issues with it.