bahn.de and broken web services

bahn.de and broken web services

Once more I need to buy stuff online, now I wanted to buy a train ticket online as I am afraid the discounted price will be gone once I am at the trainstation…

The payment option I want to use is only available when you are registered, so I registered, using a ‘+’ in my email address and then it didn’t work. I assumed like many shitty websites they believe a ‘+’ is not a valid sign in an email.. in this case my account name was taken. Then they tell me that under “My Train” I can register my bank details, well they don’t provide a Link to that page… so I had to spend time searching it. Then I say I want to enter my bank details and after three pages in their dialog it fails because apparently it thinks it already has my bank details… well… no… I believe this error is due me not having registered my bahncard, so I tried to register my bahncard but it requires a pin code that they will now send me by snail mail…
Why do companies always hire the most crappy web porgrammers on this planet? Why do they invest more money to make stuff go wrong, than to just make it work. Another example is the train search and going back… if they would use a Web Framework like Seaside it would remember my source and destination, my bahncard details.. etc. Why is bahn.de paying for a bad website? Maybe they should hire experts, it can’t be more expensive than these companies hiring idiots….
Searching for Cell Broadcast

Searching for Cell Broadcast

Is there someone that can provide me with a trace with Cell Broadcast Services on the Abis link? I am not really figuring out what should be provided to the BTS… I assume that the nanoBTS takes care of scheduling the message and one provides one big message instead of the four separate things?

Please comment, drop me an email or such.
Back from the DevDays

Back from the DevDays

Like many others I was at the DevDays. I happened to be in Munich for GSM related things but managed to attend half a day on Monday and half on Tuesday. I was very happy to reconnect with friends from Australia, Oslo, Brazil and the US and I am always impressed by the team that the Qt unit has recruited and still manages to recruit. Creating awesome technology is just the consequence of that and as written in earlier posts, Qt Quick is great and the Qt Creator integration is getting good as well.

While still having your attention. Is there any interest in low-level GSM stuff in the KDE Community? The OsmocomBB project is close to make phone calls in a commercial GSM network and we could use a simple GUI running on a Linux host OpenBSC on the other hand is the swiss-army-knife of a GSM network and ideal for tests. E.g. testing emergency calls, security research, generating stuff that is difficult on a commercial network, do prototypes…
And on a private note… I am back to Berlin…
misc notes on using tools

misc notes on using tools

  • gdb-heap is a new project to analyze the heap of a running application. Right now it only knows about python
  • addr2line can help you to go from a SEGFAULT/SIGBUS/Alignment trap to file and line, it needs some tricks to make it work on libraries..
  • you can use gdb with the app and use info sym 0xb7f1121d and info line *0xb7f1121d to at least get the function of where an application crashed.. (thanks to people in #gdb)
Excited by the idea of Soft Processors

Excited by the idea of Soft Processors

I was spending some time the other day looking at Qi Hardwares’ latest project Milkymist One. It is a SoC with the mico32 core (CPU). The mico32 is a free Soft Processor that runs on various FBGAs.

From my point of view the biggest benefit of a Soft Processor is the ability to accelerate dynamic languages with high level (CISC) instructions. The primitive (natively implemented routines) of languages like Python, Smalltalk (SqueakVM, GST), Ruby try to remain stable over time. With a Soft Processor one could share the knowledge of the object layout with the CPU and handle certain routines directly in the CPU.
This is the old battle between CISC, RISC, the speed of RAM and complexity. If things are easy things are faster (RISC) vs. if the CPU knows more it can do things in a better way. I think for script languages (with its own instruction fetch, decode, execute) an implementation in the CPU could probably do a lot better.
The question will be how easily one can reconfigure the Soft Processor, how easily binutils will handle new instructions and how open projects will be to implementations in hardware.
I am excited about the Milkymist…
Deploying WebKit, common issues

Deploying WebKit, common issues

From my exposure to people deploying QtWebKit or WebKit/GTK+ there are some things that re-appear and I would like to discuss these here.
  • Weird compile error in JavaScript?
  • It is failing in JavaScriptCore as it is the first that is built. It is most likely that the person that provided you with the toolchain has placed a config.h into it. There are some resolutions to it. One would be to remove the config.h from the toolchain (many things will break), or use -isystem instead of -I for system includes.
    The best way to find out if you suffer from this problem is to use -E instead of -c to only pre-process the code and see where the various includes are coming from. It is a strategy that is known to work very well.
  • No pages are loaded.
  • Most likely you do not have a DNS Server set, or no networking, or the system your board is connected to is not forwarding the data. Make sure you can ping a website that is supposed to work, e.g. ping www.yahoo.com, the next thing would be to use nc to execute a simple HTTP 1.1 get on the site and see if it is working. In most cases you simply lack networking connectivity.
  • HTTPS does not work
  • It might be either an issue with Qt or an issue with your system time. SSL Certificates at least have two dates (Expiration and Creation) and if your system time is after the Expiration or before the Creation you will have issues. The easiest thing is to add ntpd to your root filesystem to make sure to have the right time.
    The possible issue with Qt is a bit more complex. You can build Qt without OpenSSL support, you can make it link to OpenSSL or you can make it to dlopen OpenSSL at runtime. If SSL does not work it is most likely that you have either build it without SSL support, or with runtime support but have failed to install the OpenSSL library.
    Depending on your skills it might be best to go back to ./configure and make Qt link to OpenSSL to avoid the runtime issue. strings is a very good tool to find out if your libQtNetwork.so contains SSL support, together with using objdump -x and search for _NEEDED you will find out which config you have.
  • Local pages are not loaded
  • This is a pretty common issue for WebKit/GTK+. In WebKit/GTK+ we are using GIO for local files and to determine the filetype it is using the freedesktop.org shared-mime-info. Make sure you have that installed.
  • The page only displays blank
  • This is another issue that comes back from time to time. It only appears on WebKit/GTK+ with the DirectFB backend but sadly people never report back if and how they have solved it. You could make a difference and contribute back to the WebKit project.
    In general most of these issues can be avoided by using a pre-packaged Embedded Linux Distribution like Ångström (or even Debian). The biggest benefit of that approach is that someone else made sure that when you install WebKit, all dependencies will be installed as well and it will just work for your ARM/MIPS/PPC system. It will save you a lot of time.
    OpenBSC updates

    OpenBSC updates

    I am almost back from a trip to iceland, I was fortunate enough to focus exclusively on GSM. In the last week I have continued to build osmo-bsc (a true BSC based on code from the on-waves/bsc-master) branch, I have worked on the NAT to make the IMSI filtering more useful and to add (hardware) transcoding to the MGCP MGW. The NAT changes are already in production, the transcoding will follow soon.

    IMSI filtering in the NAT/MUX. There is the use case that in certain areas IMSIs are not allowed that are normally allowed in your network (e.g. on a test cell, only allow test IMSIs). Now in general the first message (GSM0808 Complete Layer3 Information) should carry the T-MSI/IMSI and a NAT/MUX could filter based on this message (which I did). The reality is a bit different, in the case of a Location Updating Request most phones send you the TMSI of a different network, in that case the NAT/MUX will need to inspect every message until the real IMSI and TMSI (TMSI reallocation) is revealed and then apply the filter. I have added this part to the NAT and it appears to be working. While doing this we also encountered a crasher that was hiding and only happens on unreliable networks (e.g. not during unit testing).
    For the last days I was working on a funny real life issue. In our case certain connections have an adaptive bandwidth. E.g. when a voice call is setup we will only slowly get the bandwidth we need. This means that on the first couple of RTP packets we will have a huge jitter. Now luckily we are using a proprietary MGW that puts out press releases of their field proven Jitter Buffer technology… which means that money was spend on PR instead of making it work and we had to run the audio through a different hardware based decoder/encoder to really handle the jitter. In the next couple of weeks we are hopefully able to replace this MGW with our own.
    Using Video in QML – the hacky way

    Using Video in QML – the hacky way

    For my current QML project I am required to embed video “into” the QDeclarativeView. I think the proper way will be to use the Qt Multimedia package that comes with a QML VideoView but for this project the customer wanted to use a specific proprietary media player (I wish I could call names).

    I started with creating a QWidget called VideoWidget and added three Q_INVOKABLE methods, one is setPos(x, y, w, h), setUrl(url) and play(), and bind one instance of that widget to the QML runtime. In the QML code I have one Rectangle {} where the video should be and us onWidthChanged, onHeightChanged, onXChanged, onYChanged to call the setPos on the QWidget. This mostly works but on start the x,y is not set properly but I am lucky as my video is not shown on start.
    The next part is to actually host the video. In the first incarnation I was using the QAxContainer to host activeX content. Normally I use the testcon.exe, load the control, figure out which methods to invoke and then convert it to dynamicCalls. The only issue I faced was that ActiveX control just locked up on my copy of Windows7 but thanks to wine I could figure out what to do.
    The only thing that was missing is to position the video on top of the QML content that appeared to be more difficult. The natural choice is to have the QDeclarativeView as parent to the VideoWidget, but that didn’t work, having a common QWidget as parent to the VideoWidget and QDeclarativeView also didn’t work. I had to resort to have two top level windows and trying to make them appear as one, so I had to handle QWidget::event(), use QWidget::setAttribute to have no taskbar for the video, etc.
    Now this award winning closed source media player has quality and performance issues and I needed to try something else, sadly loading VLC in testcon.exe does not work properly, as it refuses any dynamic call to it, so in the end I am using Phonon for the video playback. The great thing about that solution is I can remove the hack with two top level windows and have a common QWidget as parent, and in the future I might be able to embed the videowidget into the QGraphicsScene of QML.
    The bad part is DirectShow which doesn’t handle rtsp/mms and I am failing to find a ASX stream which works over HTTP. The best I can find is the flumotion demo site but that doesn’t offer a standalone URL I can throw to my player.
    Detecting IMSI Catchers

    Detecting IMSI Catchers

    I was wondering how and if IMSI Catchers can be detected and how much work it would be to support that in OsmocomBB. The only problem is that I have not seen any IMSI Catchers, have not written one and have read too little about it.

    So how does an IMSI Catcher operate? Well, I have no idea and need to speculate. In contrast to a real network it is only meant to be used by a few Mobile Stations (MS), it is supposed to be the most attractive Cell, by nature it should have more SDCCH than TCH.
    The next step in thinking is to figure out how to achieve some of the above goals. As it should only work with a few handsets the System Information might/should contain an Access Class allowing only certain IMSIs to attach, one should see a lot of Location Updating Reject messages or unanswered messages. To be the most attractive cell the signal strength should be higher than the others, the channel configuration might be guessable by looking at the RACH and see which kind of channels are requested and assigned (keeping track of them).
    The next thing would be to use a database like OpenCellID, or some other database and check if the LAC/CI has been seen in this area, comparing the SI to the other SIs of the same operator…
    I plan to start such a thing as it is mostly about statistic and stochastic and I have become too rosty on these topics. The question is how likely (t-test) is that this SIx is coming from the real network, how likely is that this RACH pattern is coming from the real network.
    any ideas and comments?
    Going from dummy to real data

    Going from dummy to real data

    I was writing about my current QML project earlier and now was the time to go from dummy data to real ones. For the prototyping phase we were using models created with ListModel and the attributes we need in the UI. For some JavaScript code that is called to execute actions we were using ListModel.get(index) to get the item and then execute code.

    The QML Documentation was bringing me very far. I was using the rootContext of the QDeclarativeView to add a controler object and the models to the QML runtime. The controler is called when the models needs to be updated, e.g. I am calling them from ScriptAction on state transitions. For QML a model only needs to set the rolenames and then handle the different roles. This was working quite nicely, and the old modeltest can help to debug the model.
    After the above a simple ListView { model: myModel } will work nicely. Now I was writing about that we are using ListModel.get and I assumed that it would just magically work for my model as well, e.g. using the rolenames as well. From what I have seen that is not the case. This means your model needs to implement a Q_INVOKABLE QVariant get(int index); and internally use a QMap and somehow duplicate code that is already there.
    Another problem came from updating models. This is something that does not happen with static data, but happens in my case. I was using the big hammer with beginResetModel() and endResetModel() in the model and on the QML side one can use onCountChanged in the ListView to handle a massive update and execute JavaScript. In my case this was used to automatically select the first item and set the currentIndex of another ListView.