1

Reading around Nokia forums, it seems that accessing the Cell ID and related information from Nokia S40 series phones is virtually impossible unless your MIDlet is signed, and even this would work only for S40 3rd Edition FP1 and above.

I tried the following on a Nokia S40 Dev Platform 2 phone, using Java ME:

System.getProperty("com.nokia.mid.cellid");

However the value returned was null.

Is there any workaround to this, can the cell ID be read by other methods, like Modem AT (I guess this will only work with a phone connected to the PC), SIM Application Toolkit or other?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Kevin Boyd
  • 12,121
  • 28
  • 86
  • 128

2 Answers2

2

And even if it is S40 3rd Edition FP1 (or above) and signed - it has to be signed by Nokia! (really). I don't know about other workarounds, but I have also tried JSR-179 and failed to do this.

Orr Matarasso
  • 771
  • 1
  • 7
  • 17
  • Around the forums they have mentioned that through the WMA api you can use CBS to get a string that contained information about the Cell-ID. Any ideas? – Kevin Boyd Aug 20 '09 at 15:26
  • On certain networks you can listen on certain CBS ports to get cell information. E.g. vodafone UK transmits the current cell's STD code on port 50 every minute or so. However, this is only done on 2G, not 3G. And other networks do not do this. In other words, not to be relied upon! – funkybro Jul 11 '12 at 09:49
0

I'm using LocationProvider class from the SDK. Here's my function:

public LocationProvider getCellIdLocationProvider() {
    try {
        int[] methods = {Location.MTA_ASSISTED | Location.MTE_CELLID
            | Location.MTE_SHORTRANGE | Location.MTY_NETWORKBASED};
        return LocationUtil.getLocationProvider(methods, null);
    } catch (LocationException e) {
        System.err.println("Failed to get cell id location provider.");
        return null;
    }
}

it's possible that you use GPS as well (if the device has it) by changing the methods with other options. Just make sure that in the device specs it has JSR 179.