Tag - nokia

Entries feed - Comments feed

Thursday, October 28 2010, 12:01 am

Cross-Platform Graphical Library Maddness

An application that provides the user a window with buttons and input boxes is a given in today's graphically driven computer universe. Operating systems of all shapes and sizes provide a programmer the tools and libraries to accomplish their goal of providing such an application. Most of them are pretty boring or are too specialized to be worth taking time to study. The libraries that people should familiarize themselves with are those that can be utilized across operating systems, which include being able to run across multiple types of hardware devices. Two libraries come to mind - GTK+ [has a very interesting history] and Qt (pronounced "cute").


Today, both libraries offer very simple methods of creating a GUI. So, depending on what language your project requires, either one would be able to provide you with a robust and full featured set of options. The current drive to use Qt is entirely commercial driven - by Nokia - who owns Qt. It's the same drive that Sun made with Java. There's no logical reason to use Java. People have just be taught that it [Java] is the best and there is no other language that can do the same job (read: subjective).

I believe the "Qt hate" or "GTK+ hate" stems from the past when Qt didn't offer as many cross-platform routines as Glib (from GTK+) did or vice versa. It has been my observation that people have not spent any time with both libraries and make rash statements about the other library out of ignorance. Most Qt developers view GTK+ as a legacy library that should be abandoned. Don't tell them that there is still active GTK+ development (GTK+ 3.0 is coming soon) driven by a large community, which includes Red Hat.

Need a simple OpenGL widget in your window? There's GtkGLExt, or Clutter for GTK. Starting with Qt 4.0 a similar API for OpenGL handling was implemented.

Need video/audio capability? GTK+ apps can use GStreamer. Qt has phonon.

Need XML or HTML handling? GTK apps can use libxml or GtkWebKit while Qt apps would need to use the Qt APIs.

Nokia is also attempting to drive Qt as a "write once, run anywhere" library. This is great in that it some-what promotes FOSS, but if you wish to use GTK+ you can write once and run anywhere, too. I have done so with a GTK+ app for my $DAYJOB that can compile under Fedora and Windows and does advanced things like TLS encrypted XML packets over a TCP connection and scanning documents (using SANE). Neither library has an advantage.

More recently, Nokia has tried to push the mantra that you can write a Qt app quickly and simply. GTK+ developers can also use Vala to write a GTK+ app quickly and simply. The amount of code to write to accomplish the same goal in each library also ends up being about the same.

I can come up with any more number of examples, but those are ones I have seen used in arguments lately. The person arguing for using Qt has no idea about the matching GTK+ API and vice versa. I think it's great that both Qt and GTK+ offer such a wide range of features that are easy-to-use. You can choose a language (C, C++, Vala, Python, PHP) and write a program that could be used by thousands or millions of people across many different types of devices. Now get out there and start programming.

Saturday, February 6 2010, 10:23 am

Developing Openly on Proprietary Land

My programming adventures continue. Nokia's experiment into Linux with Maemo is very alluring and since I've applied myself into a few Linux projects, I felt it would be worth looking into what Nokia has put together.

The Maemo SDK runs under Scratchbox, a virtual environment created in part by Nokia. The Scratchbox toolkit can run under any Linux distribution, and it requires it. If you wish to run the SDK under Windows, your only option is to use a virtual machine. Once your SDK is running, it is nearly identical to a running Maemo device. In order to use the SDK, basic knowledge of Linux goes a long way, but since Maemo is derived from Debian there are some distribution specific programs. I've been using Red Hat based distributions for years, so it took some time to get used to using dpkg and apt-get to handle packages. After a few months of using my N900, creating and handling packages takes less work under an RPM system, but it's adequate.

Since Maemo is Linux, any Linux application has a chance of life. This makes building new applications or porting existing Linux applications a walk in the park. You can literally compile any Linux program for ARM and run it, however, the necessary screen space and physical size of a N900 can make it difficult to use a large application such as Open Office, which has dozens of menus and toolbars. This is where Maemo ports come in. A finger-friendly UI can be designed and added, even sent to the upstream authors, and makes the app you port usable everyday on your device.

I started with building a brand new application. A stopwatch seemed like an easy first project. I noticed several stopwatch applications already existed, however they were written in Python or were not maintained in a long time. The Maemo Garage is a center for Maemo projects, so I created my own project page and began work. I decided to write in C, the native language of many Linux core libraries, and use GTK for the UI, a cross-platform, and the native toolkit for Maemo 5. During the programming process, I learned the Hildon additions to GTK made by Nokia, and the dbus methods to activate and listen for accelerator changes to allow my applications to turn into portrait mode when the user turns their N900. Here's the first incarnation: Stopish 0.9.0

Other programming projects are endless. I wanted to look at fixing a few usability issues. One was the RSS reader, which used a slider that was too thin for a finger. I submitted a patch to Nokia and it will be included in the next major firmware update. The second was the lack of FLAC tags in the media player. I now enjoy FLAC as my music format of choice, and it's possible to use since the Maemo media player uses gstreamer for media codecs and tracker for tags. In order to add FLAC tags, I had to extend the tracker program to be able to read them. Someone had already created such a plugin for vorbis, and so using it as a template, I made one for FLAC.

There are two Maemo repositories for projects, Maemo Devel and Maemo Extras. Finalized applications live in Maemo Extras, while developers can play with new applications in Maemo Devel Adding my projects to Maemo's repositories was a breeze. Just create a Maemo account and request upload access. I can use scp (SSH CoPy) to send my source code to the Maemo build server and it will package my projects and makes them available on the Maemo Devel repository. From this repository a developer can choose to promote it to Maemo Extras. During this promotion, other Maemo users vote on the application and if enough positive votes are made the project is automatically pushed into Maemo Extras.

Although most of Maemo is open source and source provided through gitorious, there's still a lot left closed - such as the phone, contact, and media player. Nokia's plans include more open source goodness in Maemo 6. The future of Maemo definitely looks bright even if they are forcing Qt down everyone's collective throats.

Saturday, December 12 2009, 08:28 pm

Maemo, Smaemo they Say

The world welcomes another Linux phone. This time around we have something a little more mature and more appealing to the eye. Behold, the Nokia N900:

As with all my blog posts, I won't bore you with details. Google is your friend. After handling the N900 for a week, I begin my review:

  • Feel
    Plastic encased all around, the feel of the phone doesn't feel like plastic. It's a refreshing, solid, stout feel. When I first picked it up it felt heavy, but now I hardly notice the weight. The slider is solid and does not wiggle. It slides in and out of place securely. The keyboard keys are just the right size and it feels great to type on it, but if you don't want to slide out for it, an on-screen keyboard is available.
  • Screen
    While the technology of the screen is not new, I cannot find a problem with it. The 800x480 resolution alone will leave other "phones" in the dust. Most folks now-a-days want the latest and greatest technology and will spit on the N900 for using a resistive screen. I've used touchscreens for a long time starting with Palm Pilots to a Nokia 5800, iPhone, and Google G1 phone. This covers both resistive and capacitive technologies over the past 10 years. The N900 screen is extremely responsive and I cannot tell a difference between it and a G1. I've read other reviews saying the N900 is terrible, but I believe there's some fanboyism hidden under their text. In fact, I wrote brainstorm ideas for this blog post on my N900 with the included stylus. As I was writing I noticed it picked up every tiny detail of my strokes just as if I was using a real pen. Judge for yourself. I used Xournal (Maemo Extras repo) to generate it and Bluetooth'd it to my PC with two clicks of the screen.
  •  CPU/RAM
    The included Cortex A8 is in fact the same as the iPhone and is plenty fast. I have yet to benchmark it, but I have yet to find anything that stresses it too much. The phone remains responsive at all times no matter what you are running. Even when someone calls you.
    RAM isn't too much of an issue as it includes 256 megs of hardware RAM and partitions 768 megs of swap memory on the embedded flash drive.
  • Battery
    Lifetimes of the battery depend on what you do. No news there. Comparing to my N95, I get about the same battery life. One day if I am making calls, surfing the web, and using apps, or two days if I limit my usage to a phone call or two. The included micro USB port and cable allow you to charge anywhere there is a USB port and extra batteries are dirt cheap on Newegg. Battery life isn't too much of a concern to me for how much I get in return out of the device.
  • Linux
    Nokia has made Maemo their Linux distribution and left most of it open source. Maemo 5, included with the N900, provides kernel 2.6.28. However, Nokia felt that IPv6 support was "bad" and left it out of the provided kernel. There's a bug report for it on Maemo.org. It was included for the WiMax N810 tablet, but now it is removed. Quite a head scratcher, especially since Nokia's Symbian OS has provided IPv6 for a long time.
    All of that aside, if enjoy what Linux has to offer and want that same freedom on your phone that is supported by a major corporation, this is your dream come true. Nokia has stuck with a standard Linux environment instead of building their own, and if you are already familiar to Maemo this isn't news to you.
  • Multi-tasking
    Switching between apps is a breeze and is as simple as if you were using a PC. The included compositing manager allows fancy transition graphics and live resizing of windows so when you view all open windows, you can see what is going on without having to bring them up fullscreen. This technology has been present with Compiz (and now finally Windows 7) so nothing too new, but it is great to have it on a device that fits in one hand.
  • Application Compatibility
    Any Linux app will run on the N900. People have Quake 3 or Duke Nukem 3D running on it. Granted, the screen resolution isn't the same as a PC, so some apps are not usable on a small screen. In that case forks of the UI's for some apps are rewritten and made useable. A big example is Firefox. Mozilla's Fennec is Firefox with a UI for mobile devices. It is a full-fledged copy of Firefox and will render every web page exactly the same as if you were on a PC. All other phones include browsers that render differently and do not provide support any where close to Fennec. In fact, I have installed Adblock Plus on my N900. It works identical to my PC. No ads! This is the first device to provides this sort of environment. Not the iPhone, not the Pre, not even the Android phones can hold a candle to it.
    I have even started my own app for Maemo and did it in just a few hours. Check it out on the Maemo Garage where all Maemo apps are hosted.
    Nokia is even providing an Ovi Store for Maemo apps so businesses who wish to sell apps can do so. All of this is centralized through the app manager and relies on Debian-derived repositories for searching and installing apps. It's brain dead simple and keeps your phone clean for easy installing and uninstalling. You don't have to google search for apps.
  • Phone
    Contact support is brilliant. It merges traditional phone contacts with IM contacts and uses the open source libraries of telepathy to do so. I have my friends with not only their phone numbers, but AIM, MSN, Skype, and Jabber accounts all on one contact. This bleeds over into a conversation app that keeps SMS and IM conversations together. It's dead simple and brilliantly put together. The phone can take contacts off of Ovi or S60 phones so I was able to easily sync with my old N95 and get all my contacts and all their details (address, birthdays, etc).
    It's not perfect though. You can't assign a ring tone per person or use provider numbers to check minutes or data information (bugs in maemo.org for them).
    In all my phone conversations, I didn't have a problem with the speaker or mic. Everyone was able to hear me clearly. It does support speaker phone. The really cool thing is that it supports face detection - the phone will blank the screen when it is next to your face (saving some battery). Other high-end, phone-only devices support this same feature so it is nice to see it available here, too.
  • GTK/QT
    Maemo was originally designed for the GTK graphical interface toolkit. Nokia spent many man hours developing special add-ons to GTK for better tablet support, called Hildon. This past year, Nokia purchased Trolltech, makers of the QT graphical interface toolkit. Starting with Maemo 6, QT will take GTK's place. It was purely a high-level business decision as Nokia, with all businesses, are looking to make a profit. Nokia wants to keep Symbian and they have already invested time in bringing QT support to Symbian. With the Trolltech purchase, Nokia hopes to build a cross-platform design with QT so that all their devices they sell can run the same apps. This helps the small amount of businesses still investing in Symbian... because most of them have left to work on iPhone fart apps or work for Google now. All in all, I don't see this move as a bright business decision. I hope GTK still remains prominent in Maemo as it is the toolkit of choice for my programming both at work and at home.
  • Community
    It's a widely known fact that the Maemo distribution is gaining presence. Several Nokia employees have stated that the maemo.org site has seen huge increases in traffic with the release of the N900. Their garage and other sites have sometimes been susceptible to the heavy loads and become unresponsive. Nokia has stated they do plan on moving to better servers and better hosting ASAP.
If you've skipped to the bottom, screw you. My choice to buy this phone was a good one. I see it being a long time device in my collection, that is, until a faster one comes out. ;) There's so much more to write about the N900, but I want to get back to my life now.

Wednesday, August 6 2008, 02:55 am

Nokia and Python, a Tight Pair [Part 2]

Woo hoo!? I read my battery voltage. Take that $300 OBD readers. Success is brewing on the application front. I took some time today to rewrite more of the garmon "port" and got some positive feedback. All that really remains is to write the UI part that will display each sensor reading. Hm...

P.S. Don't mind the "RPM" text, I was going to do an RPM reading first, but a battery reading was much easier. >.<

UPDATE: I posted a much nicer screenshot.

Thursday, July 31 2008, 04:21 am

Nokia and Python, a Tight Pair [Part 1]

Little, neat gadgets are sometimes necessary to keep life from being a complete drag. That's where the ELM327 OBD-II device comes in. A mouthful? OK, sue me. It's a chip that can read your car's information, such as MPH, RPM, air temperature, water temperature (yes, your car uses water), and all sorts of other goodies. The chips sell for around $60 on eBay for Bluetooth versions. Normally OBD-II readers sell for hundreds of dollars and are standalone products, which are very limiting in what you could do. The catch? It's just the chip - no software. However, since the chip has open specifications there are a dozen or so different softwares that are ELM compatible. Garmon is one such software.

When I first got the device I had a dilemma. I could either drag my desktop computer out to my car and ran a long extension cord for power, bought a laptop, or borrowed a friend's laptop. I chose the third option, thinking I was looking to buy a laptop in the future. But wait! I have my Nokia N95 don't I? The only thing that kept me from thinking of my phone is that I would have to write a program in Symbian C++ - a task I wouldn't do unless I was paid a cool mil or two. So for a while I could only use my ELM reader when I was with my friends.

A few days ago my brain finally clicked into gear: Garmon is written in Python and Nokia has released Python libraries for their phones. I could certainly port Garmon to my phone. No need for a stinking laptop! After installing the libraries and running a "Hello, world!" program I knew it would be possible, with a little help with Google, seeing as this was my very first Python program (I'm a C junkie). Stay tuned for the results...

Sunday, April 6 2008, 09:34 pm

Nokia and Gaming do not Mix

If you're a big Nokia fan, I'm sure you're a little disappointed by the final release of the N-Gage platform. The app is too slow, the titles available (and upcoming titles) are weak, and they are all overpriced. $15 for a game that would only be $8 or less on the Playstation 3 makes the N-Gage software the same as the phone version - a failure.

200px-Nokia_N-GageShould I explain my reasons a little more? Sure. Let us start at the beginning. Nokia announced the N-Gage phone in 2003. This phone was plagued with numerous software issues, aside from the huge, ugly bulk part of it. Yes, the picture to the left is a phone that people held up to their faces to talk. After killing off the phone, Nokia pledged a new platform for N-Gage in 2005, which would work across a range of phones already available from Nokia. The big debut of the new platform was set for 2007, however it was delayed due to bug fixing. A pre-release of the software was made available on February, which was not very impressive as it was bug-ridden. Nokia finally released the platform to a few phone models this past and appears to be fairly bug free.

n-gage-n95-appThe application takes about ten seconds to start on my Nokia N95 with the latest firmware; ten seconds too long. Inside, I find the program is too slow as when you want to change a simple screen it delays it a few seconds. Playing a game is pretty straight forward, but you'll be delayed a few seconds on startup, plus you'll have about 10 seconds of waiting through an "n-gage" logo and other annoying company logos. Forget about playing a game instantly. The games can be bought in full for unlimited play or on a time basis of one day or a month. The few games I've seen so far also offer multiplayer gameplay, which is refreshing, but the cost of these games prohibit me from enjoying it. I'll stick to my Linux desktop or Playstation 3 for serious gaming. If Nokia drops the prices on their titles to $10 or less I would take them a little more seriously, but since the Euro is worth more than the dollar (yes, make all the jokes you want) it is a far fetched idea that USA residents will use N-Gage.

If Nokia can improve the application's performance, and reduce the cost of the titles, they may yet find a place for gaming on cell phones, but they have a long way to go as it seems their software development is not in all means speedy.

Tuesday, March 25 2008, 09:10 pm

What is the definition of a "smartphone?"

2007Computex_e21Forum-MartinCooperAfter discussing the reasons to ignore advertising and think on your own on computer software, it's time to cover the same issues with cell phones. What's the cell phone in your hand as of 2008? Can it take 5 megapixel pictures? Does it sport a GPS receiver? How about support for running applications written completely free and open? Have you heard the term "accelerometer?" If you've said no to any one of those questions, please, please continue reading. Most people consider a cell phone that can send and receive calls to be all they need, but they could never be more wrong. Cell phones are the devices that Amercians have yet to discover their full potential, as the rest of the world (Europe, Asia, etc.) have exploded with.

The root of the problem lies in the cell phone providers in the US. Verizon, at&t, T-Mobile, and others, only provide lackluster phones that are cheap, pack little punch, and wear out easily. The cell providers also like to maintain full control over the entire phone, down to the operating system of the phone. Marketing and other business managers of these providers wish to maintain the idea that Amercians are stupid. To a point, everyone could agree with that, but this idea has been around ever since cell phones were introduced in the 90s and has not changed at all. It's time for a change.

iphoneThe iPhone? No. Never mention that terrible name. It's not a smartphone. The iPhone is a marketing major's wet dream. It contains no innovative features outside of the touch screen, which isn't very effective to begin with. When the iPhone came out, the idea of a "computer-like" operating system was the first time such a product was advertised to Americans, however devices like the iPhone had already been in existence for several years. Why didn't you hear about them before? The answer is easy. The cell carriers could only market their low-brow budget phones to "everyday" (a.k.a. dumb) Amercians to gain huge profits, but now they could team up with Apple to market and advertise a device that can only make calls and costs an extremely high amount of money. Never mind the fact that there are dozens of better phones, where the iPhone is laughed at in countries in Asia and Europe.

This begs the question: Why would you ever need something more than a plain-jane phone? Do you ever find yourself lost in the city or on vacation? Need to take pictures but have two devices to lug around? What about those times you are waiting in the airport bored to tears? You could have a GPS to show your exact location and locate nearby places of interest. A camera that would take pictures big enough to print out professionally. Complete music collections at your finger tips, with stereo wireless headphones or 3D games such as Quake. You could also get in touch instantly with a full web browser, e-mail or instant messaging. If you still don't believe you need anything more than a phone, then you need to borrow a device that could do all of this to see for yourself. A Nokia N-Series "multimedia computer" is a start if you want a commercial product. Take a look at the OpenMoko project for a Linux-driven equivalent.

I personally own the Nokia N95-1 "multimedia computer" (Nokia's marketing at work). The phone does everything I mentioned so far, and is expanding every few months with new updates and new applications. Sure, the phone costs a pretty penny, but I haven't spent a dime on updates or legal applications. I've owned it for a year now and I do not regret spending so much money for it one bit. The ability for me to remain mobile, and retain all the abilities of a desktop computer are entirely worth it. I urge you to look for a phone that will do more than take and make phone calls. You'll find yourself being more productive and doing things you wouldn't think possible.

This post will end here, before I bore you half to death again. However, I left off many important points of discussion that I highly suggest you, the reader, follow up on your own. Mobile operating systems, application development, and the hardware inside the devices.

Tuesday, March 18 2008, 08:57 pm

Rainy Day that Wouldn't go Away


The rain didn't stop as the Mavericks fell short in a very big game against LA. I was about to turn off the game until they turned it around and came within one. The final seconds weren't the only news worth mentioning. Questionable officiating was prevalent throughout the game. Several uncalled fouls from body to body contact and slapped arms that resulted in turnovers didn't help the Mavericks either. With Boston next, I am positive looking forward to it as the Mavericks had a great comeback after being 25 points down. The most important games are to come, as the playoffs are just around the corner.

Still no Nokia N95 update! ARGH! Oh, and 6 core Intel CPUs in a few months. Who'd a thunk it?

Monday, March 17 2008, 08:52 pm

St. Pattys Day has Arriveth

Work flew by and with the threat of huge thunderstorms outside I'm indoors as I am every night. I was prepared to update my Nokia N95 up to the latest version of the operating system, but Nokia is delaying the update rollout for some unknown reason. Bah!! I am dying to have Flash 9 support in my web browser. This feels like the Flash 7 -> Flash 9 wait on Linux a few years back. Of course, the phone update is available via other means, but I am going to try and remain patient for the official update from the Nokia updater software.

How about those mavs? They easily beat the worst NBA team on Sunday, but they have the three toughest teams ahead. I have no idea if they will win; if they do I am sure they can head to the Finals with ease.


Australian F1 was a blast. Only 7 cars finished? The lowest ever I believe. Amazing race to start the 2008 season. BMW placed a strong second, and it was Heidfeld's second, second place!