[android-developers] Re: NFC Secure Element
When the card emulation is detected, the call is routed to nfc_jni_transaction_callback() of SecureElement. From here the event is posted to NfcService for example AID_SELECTED events are all posted to NfcService. I was wondering if there is way to communicate to SecureElement through this handle. If I try to open SecureElement parallel y, the call throws error that "External RF Field is detected", when this channel is open, I believe there must be a way to wait until this mode is finished and communicate back to SecureElement or use the same channel to communicate. In fact, If I view the ice-scream sandwich code, there is new event subscription APDU_RECIEVED in the secure element callback. It looks like the PICC interface is open now. Hopefully we should be able to communicate. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: NFC Secure Element
I am not sure if anybody explored NfcExecutionEnvironment class. There are APIs to communicate to secure element. I don't see any key requirement. I could listen to AID_SELECTED event from NfcService. I am trying to send data to SE. I get error that "External RF Field detected", what does this mean. Should I be waiting until the external reader sets mode or i have to initiate the NFC mode. regards malls On Feb 6, 5:51 am, "s.rawat" wrote: > Hi Nemik, > You wrote : > *Yea, that's right. All it does currently is read; at least via the > Java API. If you look at the kernel source though, a bunch of ifdefs > which allow for emulation were all disabled. So full compliance with > the NFC standard will have to wait for a future kernel release. * > > waht are these JAVA APIs ?Can we use them for reading NFC Secure Element - > Mifare 4k? > Rgds, > Saurabh > > "..pain is temporary.quitting lasts forever.." > > > > On Mon, Feb 6, 2012 at 7:08 PM, s.rawat wrote: > > Any comments...plz respond if you are reading this mail ! > > rgds, > > Saurabh > > > "..pain is temporary.quitting lasts forever.." > > > On Wed, Feb 1, 2012 at 1:21 PM, p z wrote: > > >> I think maybe you can. > >> and plesae share your rom when you finished.thx. > > >> On 2月1日, 上午8时15分, malls wrote: > >> > Fernando, > > >> > I was wondering if I can emulate the card in my application and send it > >> to > >> > the terminal. > > >> > regards > >> > malls > > >> -- > >> You received this message because you are subscribed to the Google > >> Groups "Android Developers" group. > >> To post to this group, send email to android-developers@googlegroups.com > >> To unsubscribe from this group, send email to > >> android-developers+unsubscr...@googlegroups.com > >> For more options, visit this group at > >>http://groups.google.com/group/android-developers?hl=en- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: NFC Secure Element
I don't see any interface of passing the keys to open secure element in the android code. I am not sure how many people claims that you need google Keys to open SecureElement. May be I am missing something. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: NFC Secure Element
Fernando, I was wondering if I can emulate the card in my application and send it to the terminal. regards malls -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: NFC Secure Element
Fernando, In that case, what's api to send apdu to external SE and how can we have external SE added to the phone. regards malls -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: NFC Secure Element
Fernando, Thanks I could create custom image with nfc enabled by using your help. Just to clarify myself, if we are connected to external reader, I should be able to directly read/write APDUs from my app right. should I be using NFCService.transceive(..) method to read/write from the external reader. regards malls On Jan 4, 6:17 am, Fernando Miguélez wrote: > Well, options are enabled in cascade. The problem comes because the first > option is not enabled. Besides, if you look at the Wireless Settings > screen, there is only the "NFC Settings" option, but not the one that lets > you enalbe/disable NFC directly from that screen. That is beacuse the Nfc > service in not available. Connection to a computer in debug mode will draw > some light. > > Instead of compiling the whole image again I suggest you to compile just > the Nfc.apk system application and replace the original one. You must > remount /system partition in read/write mode and overwrite the apk inside > /system/app. Then you must kill the nfc service by means of DDMS view of > the ADT (you must connnect the phone in debug mode and since you have > compiled in userdebug mode you will see all the running proccesses). The > service will restart automatically. > > When it comes to read/write the card by means of an external reader, any > Mifare Classic 4K compatible RFID reader will do. If you try to access > directly to the SE from an Android application I am afraid to disappoint > you but that is not possible, at least I wasn't successful at it and nobody > I know either. The reasons are well described in other posts and on > stackoverflow. > > Regards > > > > > > > > On Wed, Jan 4, 2012 at 2:56 PM, s.rawat wrote: > > Thanks ! > > I will also try from my side recompiling it.So you mean I should get the > > Check boxes enabled for > > > *Only Card EmulationMode* > > and > > > *Use External SE* > > > My main aim is to write to the NFC card in card emulation mode so that it > > can be read by any Card Reader.is it possible after your patches are > > applied using teh android SDKs or do we have to write some native > > application. > > Rgds, > > Softy > > "..pain is temporary.quitting lasts forever.." > > > 2012/1/4 Fernando Miguélez > > >> Great work. > > >> Obviously there is something wrong with the compilation. Have you tried > >> to connect in debug mode the phone to a computer with Android Development > >> Tools and see what the traces look like. They may offer a clue. My > >> suspicion is that NfcService is crashing. I will review my notes tomorrow > >> if I find something different to the steps you followed to build the image. > > >> On Wed, Jan 4, 2012 at 9:17 AM, softy wrote: > > >>> Hi All, > >>> Thanks Fernando Miguélez Palomo for posting the patches.I have applied > >>> it to 2.3.4-r1 Android gingerbread and compiled /flashed it on Samsung > >>> Nexus S and was able to see the NFC Settings changed(though i cant select > >>> them, they are disabled) > >>> I have blogged the whole steps > >>> here<http://techshek4u.blogspot.com/2012/01/applying-card-emulation-patch-...>.Plz > >>> let me know if I miss something. > > >>> @ Fernando Miguélez Palomo > >>> What next after that.How can i test this.Any source code or tool /card > >>> reader description will be enlightening. > >>> Rgds, > >>> softy > > >>> -- > >>> You received this message because you are subscribed to the Google > >>> Groups "Android Developers" group. > >>> To post to this group, send email to android-developers@googlegroups.com > >>> To unsubscribe from this group, send email to > >>> android-developers+unsubscr...@googlegroups.com > >>> For more options, visit this group at > >>>http://groups.google.com/group/android-developers?hl=en > > >> -- > >> You received this message because you are subscribed to the Google > >> Groups "Android Developers" group. > >> To post to this group, send email to android-developers@googlegroups.com > >> To unsubscribe from this group, send email to > >> android-developers+unsubscr...@googlegroups.com > >> For more options, visit this group at > >>http://groups.google.com/group/android-developers?hl=en > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: NFC Secure Element
Thanks Saurabh and Fernando, that worked just adding the library. Just Curious is it supposed to be part of android build, not sure why am I missing that file. On Jan 26, 11:09 pm, "s.rawat" wrote: > Hi, > > I faced this issue.Plz paste the file attached in the mail to the * > /system/lib* directory as suggested by * Fernando* .And yes you have to do > remount the system partition as RW. > Rgds, > Saurabh > > "..pain is temporary.quitting lasts forever.." > > 2012/1/27 Fernando Miguélez > > > > > > > > > There must be an error with patches since other person had the same issue. > > Just copy it manually to the /system/lib directory of the phone (you have > > to remount the system partition as RW). > > > 2012/1/27 malls > > >> Dear Fernando > > >> I tried to patch as per your instructions and root the device. I get > >> error saying libpn544.so not found. I don't see this file created after the > >> compilation. Where is it trying to load from. > > >> regards > >> malls > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en > > > > libpn544_fw.so > 77KViewDownload -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: NFC Secure Element
Softy Could you please share android client code snippet to send APDU command to SE after the patch. regards malls -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: NFC Secure Element
Fernando, Here is the logcat output that I am getting. Is libpn544.so supposed to be built as part of this build process or am i missing something. I have checked, there were no errors during the compilation anywhere. D/NFC JNI ( 4179): NFC Service : loading JNI I/NfcService( 4179): Starting NFC service D/NFC JNI ( 4179): ** Init Native Structure ** D/NFC JNI ( 4179): ** Init Native Structure ** D/NFC JNI ( 4179): ** Init Native Structure OK ** D/NFC JNI ( 4179): ** Init Native Structure OK ** I/RegisteredComponentCache( 4179): ComponentInfo: ResolveInfo{405641b0 com.andro id.apps.tag.TagViewer p=0 o=0 m=0x108000}, techs: android.nfc.tech.Ndef, D/NFC JNI ( 4179): > Set LLCP LTO to 150 D/NFC JNI ( 4179): > Set LLCP LTO to 150 D/NFC JNI ( 4179): > Set LLCP MIU to 128 D/NFC JNI ( 4179): > Set LLCP MIU to 128 D/NFC JNI ( 4179): > Set LLCP WKS to 1 D/NFC JNI ( 4179): > Set LLCP WKS to 1 D/NFC JNI ( 4179): > Set LLCP OPT to 0 D/NFC JNI ( 4179): > Set LLCP OPT to 0 D/NFC JNI ( 4179): > Set NFC DISCOVERY A to 1 D/NFC JNI ( 4179): > Set NFC DISCOVERY A to 1 D/NFC JNI ( 4179): > Set NFC DISCOVERY B to 1 D/NFC JNI ( 4179): > Set NFC DISCOVERY B to 1 D/NFC JNI ( 4179): > Set NFC DISCOVERY F to 1 D/NFC JNI ( 4179): > Set NFC DISCOVERY F to 1 D/NFC JNI ( 4179): > Set NFC DISCOVERY 15693 to 1 D/NFC JNI ( 4179): > Set NFC DISCOVERY 15693 to 1 D/NFC JNI ( 4179): > Set NFC DISCOVERY NFCIP to 1 D/NFC JNI ( 4179): > Set NFC DISCOVERY 15693 to 1 D/NFC JNI ( 4179): Start Initialization D/NFC_LIST( 4179): Allocated node: 0x292868 (0x4496fa70) D/NFC JNI ( 4179): phLibNfc_Mgt_ConfigureDriver(0x00295ad8, 0x0008) D/NFC JNI ( 4179): phLibNfc_Mgt_ConfigureDriver(0x00295ad8, 0x0008) W/NFC_i2c ( 4179): sleeping a little longer... D/NFC JNI ( 4179): phLibNfc_Mgt_ConfigureDriver() returned 0x[NFCSTATUS_SUCC ESS] D/NFC JNI ( 4179): phLibNfc_Mgt_Initialize() D/NFC JNI ( 4179): phLibNfc_Mgt_Initialize() E/NFC-HCI ( 4179): Could not open libpn544.so D/NFC JNI ( 4179): phLibNfc_Mgt_Initialize returned 0x000d[NFCSTATUS_PENDING] D/NFC JNI ( 4179): phLibNfc_Mgt_Initialize returned 0x000d[NFCSTATUS_PENDING] D/NFC JNI ( 4179): NFC client started D/NFC JNI ( 4179): NFC client started D/NFC JNI ( 4179): Callback: nfc_jni_init_callback() - status=0x[NFCSTATUS_S UCCESS] I/DEBUG ( 3190): *** *** *** *** *** *** *** *** *** *** *** ***^C -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: NFC Secure Element
Dear Fernando I tried to patch as per your instructions and root the device. I get error saying libpn544.so not found. I don't see this file created after the compilation. Where is it trying to load from. regards malls -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en