Analytics

Sunday, July 25, 2010

HTC Desire/Android GSM Protocol Issue

I was playing with ASN1 and Supplementary Services over the Weekend. My goal was to provide extended user information during a call setup. So the first step was searching for information of how it could look like, this involved going through the GSM Spec, the 2nd part was wrestling with asn1c to generate some dummy data (as I couldn't find a trace doing that), the 3rd part was being able to generate that from OpenBSC and send it to the phone.

Well, long story short. It doesn't work, the better phones ignore the data I am sending, all the others refuse to show incoming calls, the Phone failing the most is a HTC Desire with Android. First of all OpenBSC has a pretty simple USSD implementation and it doesn't like that, now when you place a phone call (while Android decides to do a USSD request in the background), OpenBSC will close the channel, not do any Call-Control and on the Android one screen shows the call is terminated, in the decoration it is still active, then the wakeup/sleep logic gets confused, you can not hang-up and then the phone is restarting.

The executive summary: Not implementing USSD in your network (we send an error and such) can make Android phones reboot if someone is placing a call at the time android retries to send the USSD query.





Tuesday, July 20, 2010

Debugging hints I

Being an Engineer one need to resolve problems and sending a mail to a mailinglist and asking for help is most of the time not the problem solving skill you should use. So here is a list of some easy hints...

  • Finding a build error (using make) in a log file. You might use a tool like OpenEmbedded that keeps the log file around and you have a build failure. First of all check the end of the file, but one might have compiled with -j X and the failure was a bit earlier. The best way to find the error is to search for '***'. E.g. inside or less or vi type (/\*\*\*) and it will bring you to the first compile error... GNU make is kind enough to flag the error.
  • The compiler is bitching about something that might not make any sense. With C languages a program called CPP, the C PreProcessor, is ran over your code and it might include funny headers changing your code. What I normally do is to use the compile line as seen in the terminal and replace the -c with a -E as this will only preprocess and then look at the code. The pre processed code is long, search for includes from places you don't expect and such...
  • If a program points you to a log file, read it. In the case of autoconf (configure) a config.log is written, now the bad news is that the error is not at the bottom of the file. What I do is to look at the text of the last test and search for that inside the config.log, it brings me to the failing test...
  • Dealing with remote crashes. You have a segfault but don't know when/where it is happen and it is hard to reproduce? Just use ulimit -c unlimited in a shell and run your script/applications, the kernel will place a core dump in the directory and you can use gdb and your binary to inspect it.
  • Running a libtool based binary/lib from inside the build directory. You can use libtool --mode=execute gdb tests/sms/sms_test and then libtool will setup the environment and invoke your command..

more hints at a later time...

Friday, July 09, 2010

Anti-Pattern 23 - Make sure to not get feedback

  1. Create a website to compete with an established one.
  2. Make something bad like handling cursor/space keys in the side and alienating people using keys to navigate.
  3. Create the impression one can give input, place a feedback button.
  4. Use a form, allow the user to enter text.
  5. Make sure the submit is not just a simple submit but make it go through javascript so you can reference variables that do not exist
If you follow these steps, you are guranteed to burn money, lose busines and you will not get feedback from your customers.




Monday, July 05, 2010

Hybrid Application Example with QtWebKit

In general one of the fascinating aspects of WebKit is the focus on just being a Web Content Engine as it can be seen in the Project Goals. One of the results is that one can easily build a Web Browser around it, or embed it into a Mail Client, a Chat Client, or into your application to handle payment in amazon, display Wikipedia or similiar things.

On the other hand it is possible to embed native widgets into the Web Content using WebKit/GTK+ and QtWebKit, or use the JavaScript Engine API to bind native objects into the JavaScript world. I have started using the moiji-mobile.com name to push WebKit usage for these kind of hybrid applications. I am going to create examples showing how to create applications using QtWebKit, how to deploy them on real hardware, howto handle content development on mobile devices and more.

The first part of this series is a simple example of what could be a SIP based desk telephone using QtWebKit and native technology. In this example I am embedding QObjects to provide information normally not available in the Web, I embed a QWebView inside the content to provide a browser and I am painting on top of the HTML content from the QWebView to provide touch feedback and the code can be found in my git repository.


shot0002