WARNING: All the Cinterion related content from this blog will be removed to go to the javacint wiki soon. Please get used to going there.

You might have faced this error with your X765 chip. The program crashes with this error :

^EXIT 00010000,02d6414253485f4c434c2c70726f6365647572655265636f72645f702d3e6e756d6265724f66526567697374657265645461736b73203c3d204d41585f4e4f5f524547495354455245445f5441534b53

If you convert the hex array to some text, that will give you :

#ABSH_LCL,procedureRecord_p->numberOfRegisteredTasks <= MAX_NO_REGISTERED_TASKS

Which might mean something to someone. But the point is, you won’t find any help. Mostly because it’s an uncommon error.

The error comes from the GPRS connection management. I had it when I was using a wrong APN (with the “AT^SJNET” command) to connect to a host. In my program, connection failed with a classic IOException (“Profile not found”) but 1 or 2 minutes later, the chip was ALWAYS crashed (with the “^EXIT” URC). So, the only solution I found to correct this problem was to automatically detect which APN is required.

This might also improve the ease of deployment of your programs. I like putting as much as possible auto-detection / auto-configuration code as possible. It takes a little time to write it but saves a lot of troubles (last minute configuration, human errors, human explanations, etc.).

The APN auto-detection code is like that :

public static String AutoDetectApn( ATCommand atc ) {
    String[] apnList = {
        "\"gprs\",\"objcobytel.com\",\"\",\"\",\"\",0", // Bouygues Telecom : "Objet communiquant" / "ObjetCo" / "ObjCo"
   synchronized (atc) {
        System.out.println( "Waiting 30s..." );
        try {
            Thread.sleep( 30000 );
        } catch (InterruptedException ex) {
        for (int i = ; i < apnList.length; ++i) {
            try {
                String apn = apnList[i];
                System.out.println( "Trying apn " + apn + "..." );
                atc.send( "AT^SJNET=" + apn + "\r" );
                SocketConnection conn = (SocketConnection) Connector.open( "socket://" );
                return apn;
            } catch (Exception ex) {
                System.out.println( "Failed : " + ex.getClass() + " : " + ex.getMessage() );
    // We couldn't find any APN
    return null;

And it is only launched when the SIM Card has been changed. To detect that, I have some simple code like this :

{ // APN auto-detection
    String imsi;
    synchronized (atc) {
         imsi = Common.getIMSI( atc );
    if (settings.confLastImsi.compareTo( imsi ) != ) {
        System.out.println( "Sim card changed ! Auto-detecting APN..." );
        synchronized (atc) {
            String apn = Common.AutoDetectApn( atc );
            if (apn != null)
                reg.confAPN = apn;
        settings.confLastImsi = imsi;
        // Whatever happens, we still need to save the current IMSI