Archive for September, 2010

Today I am going to post about Proguard, an obfuscator for Java. A lot of you probably have heard of it and use it with your j2me applications. But for those of you who haven’t heard of it, I advise you to take a look at this article which will help you with any new projects with Cinterion (TC65, XT65) or MTX terminals.


Using an obfuscator with our j2me applications is interesting, more interesting than being able to “obfuscate the code”, as it reduces the total “.jar” file size generated. Never forget (although sometimes some of us seem to do so ;) ) that we’re not programming a Core2Duo processor,rather we are programming devices with very limited RAM and FLASH memory. For example, an MT65 GPRS modem has 400Kb RAM memory and 1.7Mb FLASH memory. Using an obfuscator will make the most of the precious FLASH memory, and especially the RAM memory in our modems.


To give us an idea, the new MTXTunnelv5.0 firmware that comes out soon (this month) takes up around 130Kb without obfuscating and 80Kb obfuscating. You can see that the reduction is quite significant.


What do you have to do to use an obfuscator?


Well first of all you need to download it.


With eMule?


No, it’s free.


Where is it?

You will find it here:

Download it and unzip it inside the Eclipse folder i.e. within:


Then go to Window > Preferences > J2ME > Packaging > Obfuscation and select the suitable PATH like you can see in the following screen:


Once you have done this you can “compile” your file obfuscating it. Instead of making a “Create Package”, to do this we make a “Create Obfuscated Package”.

Yes it worked, but there was an error.

This is because you need to specify a complete path to a JDK and you probably have a JRE. Change it, to do this go to Window > Preferences > Java > Installed JREs and select the appropriate JDK directory. In my case:


I hope that you find it useful. Now I’m going to go to sleep as I have to gain some strength for tomorrow, I’m trembling with fear as tomorrow my son celebrates his fifth birthday and Sonia has invited her friends round. At first it was 2 or 3 friends, then it was 5 or 6, then 7 or 8 and today I was told it was a whopping 12 or 13. Also I expressed my happiness with the tea that she has prepared. There are no ham sandwiches no, but she has prepared an endless number of rolls filled with lotsssss of chocolate (Think of my sofas, the walls…) Anyway I think that I will stay on the top floor of my house (where my computers are) ensuring that no brats get into the restricted area. :)


Tags: , ,

Comments 4 Comments »

As you all already know, I have talked about the MTX65+G modem on many occasions in this blog, it’s a GPRS modem with integrated GPS. It has a Cinterion XT65 module on the inside, which has very similar features to the well known TC65 (cpu, features etc.) but it also includes a GPS. This GPS module is from the uBlox company is specifically put together with an Antaris 4.

Normally when programming the MTX65+6 modem (i.e. the XT65) in Java, we do it in 2 ways. Either we use the ATCommand class with the command that allows Cinterion (AT^SGPSR) to read current GPS positions (this is the most popular method, I use this method myself) or we use the API Location for J2ME (JSR 179).

However, there’s another way to worth the GPS. As you know the TC65 module has 2 serial ports and the XT65 only has 1. The reason for only having one serial port is that the other has been routed to the serial port that is assembled with the GPS module i.e. the serial port with the XT65 that controls the GPS.


El MTX65+G / XT65 allows us to communicate directly with the GPS module in an analog manner no matter how the serial communication is running. This means that if we open Java from the serial port associated with the GPS, we can directly read NMEA frames returned by the modem.


Bah, why would I want to fight with NMEA frames when the TX65 gives the GPS position with Location class or rather using the AT^SGPSR command?


As I said above the XT65 mounts a uBlox GPS. This GPS module has a number of settings which you can adjust to refine results. In some situations you may be interested in modifying/adjusting these settings and not using the ones given by default when you buy a MTX65+G or a XT65. You cannot adjust these settings with Java, but to do this the GPS module must be in transparent mode (removing NMEA frames) i.e. when the modem starts we put the GPS in transparent mode.

Today, for those who are interested, I am going to post about an example project where I will show you how to read NMEA frames from JAVA (it is posted in the user download section in It will be the basis of the program that I will use with the next example that I post, where we will see how to modify some of the GPS module’s internal parameters to adjust our localization application to the max.

See you another day. Good night ;)


Tags: , , ,

Comments 4 Comments »