[Android] PIN Code entry

Alexander Mueller XelaRellum at web.de
Tue Dec 16 22:22:23 CET 2008

They code that calls this is in the function "requestEnterSimPin" in 

     if ( datalen == sizeof(char*) ) {
         asprintf(&cmd, "AT+CPIN=%s", strings[0]);
     } else if ( datalen == 2*sizeof(char*) ) {
         asprintf(&cmd, "AT+CPIN=%s,%s", strings[0], strings[1]);
     } else
         goto error;

Its the only place where AT+CPIN is being sent. And I checked other 
places on the net and all of them suggested AT+CPIN="pin" and 
AT+CPIN="puk","pin" (for pin code change). So should be easy (if this 
really is the problem).


Christensen, Mikkel schrieb:
> Hi Alex,
> Problem is that the CPIN request needs to look like this:
> AT+CPIN="4223"
>  not 
> AT+CPIN=4223
> Your RIL sends without the quotes around the PIN code.
> Best regards,
> Mikkel
> -----Original Message-----
> From: devel-bounces at lists.openmoko.org [mailto:devel-bounces at lists.openmoko.org] On Behalf Of Alexander Mueller
> Sent: Monday, December 15, 2008 3:48 PM
> To: Sean McNeil
> Cc: devel at lists.openmoko.org
> Subject: Re: Android image and some instructions
> Hey Sean,
> attached is the adb logcat -b radio output.
> I have tried this with androidfs.jffs2 from 12/05/08 and the kernel 
> image from uImage-android from 12/04/08.
> Before that I updated the GSM modem with the MOKO10 release. After that 
> I checked the GSM with debian (from another SD card) to make sure GSM works.
> The result is as before: I get asked for the PIN code and after entering 
> it I receive "Incorrect PIN code!".
> Alex
> Sean McNeil schrieb:
>> Hi Alexander,
>> The issues I know of are:
>> - WLAN currently not working
>> - Unit suspends but will not awaken
>> Yes, the keyboard entry needs work. We need some sort of virtual keyboard.
>> Regarding the SIM pin number, obviously you get the dialer when it asks 
>> because you said you enter the pin and it rejects it.  There is a little 
>> information on my wiki page about tools and if you can perform the 
>> following and send to me the results, we can figure it out pretty quick. 
>> Please do the following:
>> 1) Power up the phone while you are plugged into your host that has 
>> Ethernet-over-USB setup as described elsewhere in the OM wiki. The phone 
>> will come up as
>> 2) Download the adb program pointed to at my wiki page.
>> 3) type the following command when the phone starts the pulsing robot:
>>       ADBHOST=neo ./adb logcat -b radio
>> This will display all the log messages from the RIL. It might be useful 
>> to have to regular logcat as well (just leave off the -b radio). You can 
>> stop the program with a ctlr-c at any time. If you get --waiting for 
>> device--, then issue the kill-server command and try again.
>> Sean
>> Alexander Mueller wrote:
>>> Tried it yesterday and I love the UI: the first consistent look and 
>>> feel since I started playing with FreeRunner.
>>> Thinks that dont work
>>> - GSM doesnt work. It asks for my PIN but tells me it is wrong
>>>   (not true)
>>> - WLAN doesnt work. Error while scanning the networks
>>> - No keyboard entry (but I think this is a known issue)
>>> Alex
>>> Sean McNeil schrieb:
>>>> I've started writing things down and have found a home to place an 
>>>> image of Android for people to try out. You can find my musings at:
>>>>    http://wiki.openmoko.org/wiki/User:Seanmcneil3
>>>> This will take time to get down right, but hopefully now you will all 
>>>> be able to begin playing with Android.
>>>> Cheers,
>>>> Sean
>>>> _______________________________________________
>>>> devel mailing list
>>>> devel at lists.openmoko.org
>>>> https://lists.openmoko.org/mailman/listinfo/devel

More information about the devel mailing list