OpenCellId for Windows Mobile

I talked about this yesterday, but it’s ready for sharing now.

screenshotWhat is this?
It’s a OpenCellID client for Windows Mobile

What does that mean?
It uses the GPS device connected to a Windows Mobile device (either internal or connected over Bluetooth) to identify exact latitude / longitude coordinates.

It combines this with the cell id of the GSM tower that your phone is currently communicating with.

These two measurements are uploaded to the database at OpenCellId.org

Why?
Because if enough people do this, then we will be able to build up a picture of where each GSM cell is.

Then people without GPS (either because their mobile devices don’t have GPS, or because their indoors) can work out where they are by looking up their current GSM cell in the OpenCellId database.

Will it work on my phone?
If you don’t have a Windows Mobile phone, then no.

If you have a Windows Mobile phone that isn’t WM5 or WM6, then no.

If your phone doesn’t have a touchscreen, then no. (Although let me know, because I could make a non-touchscreen, ‘smartphone’ version.)

If you don’t have .NET Compact Framework (v2 or newer) installed, then no. (Although it is free, so you could go get it)

Otherwise… erm… maybe.

Maybe?
Getting the CellID is a little tricky. There is some discussion on this from when I first came across it which goes into more detail, but in short, your phone might not have the RIL.dll file needed to access the GSM cell data.

Mobile data is expensive! I don’t want to pay for this!
I thought you might say that. The GSM/GPS data is stored until you press the “Upload All” button. There is no data usage before this. So you can wait until you get to a fixed Internet connection before you upload the data to OpenCellID.

Actually, I pay a flat rate for data access so don’t mind it sending every update when it’s ready
Ah. Well, then you’re in a minority that I didn’t cater for. Sorry.

Let me know if it’s a big issue, and I’ll add a setting to allow for sending updates immediately.

Won’t this all be a massive drain on my phone’s battery?
Yeah, probably.

Put it this way, I wont be using this unless I’ve got a power supply or I know I’m gonna have power soon. But that still leaves when I’m in my car with the phone connected to the car charger, so that’s good enough for me.

Does it work backwards? Can I look up the location of GSM cells with this?
No. I’ll probably write something to do that soon though. Let me know if you’d be interested in it.
As well as the client pictured above, the CAB installer also installs “Where am I?”. Run this, and a Google Map will be opened displaying your current location. You can run this even if you don’t have a GPS device for collecting location updates.

Can I see my GSM updates anywhere?
The data can be accessed from OpenCellId.org, which includes a map of the last 200 cells to be located. (Although there are currently nearly 30,000 cells located, so your last updates might not be on the map for long.)

I have a question / request / complaint!
getsatisfaction.com/dalelane is a good place to start.

Tags: , , ,

35 Responses to “OpenCellId for Windows Mobile”

  1. tomsoft says:

    Hello deleane,

    Thanks for this great contribution! I’am currently testing it on a windows mobile device! (I am new to it, so I just need to understand how to pear it with my bluetooth receiver! 😉 ).

    Reagrds,

  2. David Carrington says:

    Downloaded, but I’m indoors and unable to test.

  3. javadog says:

    Dale,

    Count me in as someone interested in a Smartphone/WM6 Standard version for the T-Mobile Dash.

  4. dale says:

    Update: Removed need to manually specify COM port details

  5. […] sharing my OpenCellId client last week, I was encouraged to try rewriting the GPS code for it using the Windows Mobile GPS […]

  6. Stefano says:

    I tried the “where am i” application but it opens a web page that sais that the request was illegal or malformed. Any clue?

    Stefano

  7. dale says:

    @Stefano – What was the URL of the web page?

  8. dale says:

    @Stefano – The problem with your request is that the size of the map requested (480 pixels by 673 pixels) is bigger than the maximum supported by Google’s Map API (640 by 640 pixels). You can see that if you manually edit the URL to have a smaller size, the URL works.

    As I recall (it’s been a while since I played with this!) I got the phone’s screen resolution, and used it to generate the request. So I assume that your phone has a higher resolution screen than anything I tested the Where Am I? code on… out of interest, what is it?

  9. Stefano says:

    It’s a SonyEricsson, a new model Xperia X1, the first that runs on Windows Mobile. By the way, since I’m quite new to the WM platform, can you point me to some tutorials? What IDE did you use?

  10. dale says:

    Visual Studio 2005 with the Windows Mobile SDK

  11. Stefano says:

    I think I’ve found another bug.

    If you (like me) have an Italian setting for the decimal separator (comma instead of period) you end up submitting wrong data (i.e. no decimal).

    It is not an issue anymore, because I changed my setting, however the problem are the measures that I’ve already submitted.

    I tried to contact people at OpenCellId to remove those measurement, because only who knows the API key is able to remove them. Don’t you think it should be a good idea to let people specified their API key and use yours as a default?

    Let me know if you plan to release a new version, I’ll be more than happy to test it out.

  12. dale says:

    @Stefano – Thanks for letting me know. I don’t have any immediate plans to work on this code again, but I’ll keep those in mind if I work on it some more.

  13. Joubert says:

    Hi! First of all, congratulations for your great work!

    Now the bad news 🙂 I’m also writting an opencellid client for my main project, remotetracker, but i have a big problem: sometimes the RIL api “lock” the cellid and I can’t get new informations forcing me to softreset the device. Did you saw this problem?

    Looking for a solution I found your application. Very good, but you have the same problem I had: some devices does not answer the MNC and MCC codes, always returning zero. You must call the RIL_GetCurrentOperator function to get this information. The first three bytes are your MCC code and the last two bytes are your MNC code.

    Hope this help you, and hope you have my answer 🙂

    Cheers,
    Joubert

  14. dale says:

    @Joubert – awesome, thanks very much for that! I’ve heard of some people who have seen MNC and MCC’s as zero from this code, so it’s good to finally hear the reason.

  15. Joubert says:

    I’m happy to help you. About my problem. Did you saw something like that?

  16. dale says:

    @Joubert – Nah, sorry – not run into that before

  17. Hari says:

    i have a big problem: sometimes the RIL api ?lock? the RxQaul and I can?t get new informations forcing me to softreset the device. Did you saw this problem?

  18. dale says:

    @Hari – No, sorry

  19. exafteral says:

    Hi Dale!!
    Thank you,
    This is a very interesting project.
    Is it opesource?
    Actually I do the research in St. Petersburg State University (Russia) for the GSM-positioning algorithms. So, actually, it would be great if I could view the code which gets the CellID from the phone? Is it possible?

    As far as I know – the cellphone usually can see not just one cell. It works with one, but can see others, even from another networks. Do U have any idea how to get this information?

    Thank you for your project!
    P.S.: Could you share the code?

  20. dale says:

    @exafteral

    The project is not open source. However, I have blogged about how I access the Cell ID – https://dalelane.co.uk/blog/?p=241 (you should also read the comments, such as the one which points here, as people have suggested improvements to the code which are not reflected in the post)

    I do not know how to get neighbouring cell IDs, sorry.

    Kind regards, D

  21. exafteral says:

    Thanks for the fast answer.
    I’ll try to write my own code.
    Do you know anything about similar open source projects for Windows Mobile?

  22. dale says:

    @exafteral – I dont know about any open source projects… but you did see that the blog post I referred to included all of the source, didn’t you? That’s why I gave you the link! 🙂

  23. exafteral says:

    *)) got that.

  24. Jacek says:

    Hi

    Could you tell me if I can use all RIL functions described on page
    http://msdn.microsoft.com/en-us/library/aa921525.aspx
    on Windows Mobile device ?
    On this page there is information that it is supported only in Windows Embedded CE, so I’m little confused.
    I need to develop some application which should run on Windows Mobile and I wonder if I could use RIL.
    Is it necessary to purchase license in order to use RIL ?

    Kind regards

  25. dale says:

    @Jacek – I don’t know, sorry.

  26. Eugene says:

    Hi!

    Still getting zeros instead of LAC and MCC values 🙁 (“4” in CellId)
    Using of an advise of Joubert given above, leads me to getting
    “0-5461330-1634166093” in label/logs.

    Any idea what is it ? 😀

    With respect,
    Eugene.

  27. Ressor says:

    Any chance of sharing the source code so that I can learn about how this all works?

    Thanks,
    Ressor

  28. dale says:

    @Ressor – Source code for what – getting the Cell ID? Have you seen https://dalelane.co.uk/blog/?p=241 ? (Note – check the comments before using it)

  29. […] GSM Cell Ids, using my own hand-rolled systems or newer services like Google Latitude, dopplr, OpenCellID and […]

  30. andy says:

    Dear Dale

    is it any chance you can change your code to vb.net? i am really new to the programming world.
    i have tried several code converters but i keep getting error messeges in my compiler.

    many thanks
    andy

  31. dale says:

    @andy – No, sorry.

  32. Malcolm says:

    Hi Dale

    Are you aware of a method to detect CellID and neighboring CellID’s? At any given time a GSM device can detect up to 7 Cells.

  33. dale says:

    Malcolm – No, I don’t think it’s possible, sorry.