Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test communicate with Microchip SEC1210 on Linux #148

Open
tuananh-lab opened this issue Oct 24, 2024 · 15 comments
Open

Test communicate with Microchip SEC1210 on Linux #148

tuananh-lab opened this issue Oct 24, 2024 · 15 comments

Comments

@tuananh-lab
Copy link

Now, I used driver ccid-1.4.4 then I run pcscd, pcsc_scan, opensc not detect SIM card on the module SAM SEC1210.
I edit file /usr/local/etc/reader.conf.d/reader.smsc.conf via document.
I edit file /usr/local/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist VendorID and ProductID of Microchip SEC1210
/dev/ttyUSB0 is connect UART between module SEC1210 with computer
FRIENDLYNAME "SAM SEC Serial"
DEVICENAME /dev/ttyUSB0
LIBPATH /usr/local/lib/pcsc/drivers/serial/libccidsmsc.so
CHANNELID 1

I tried use driver CCID-1.6.1(include Microchip in file Info.plist) but pcscd and pcsc_scan not work
How can you help me?
I must communication with SEC1210 to ensure module work.

@tuananh-lab
Copy link
Author

Sim card Viettel (Vietnam, contact, ISO/IEC 7816) can be detect by module SEC1210? Driver ccid-1.4.4 can support sim card Viettel?

@LudovicRousseau
Copy link
Owner

https://ccid.apdu.fr/#support

@tuananh-lab
Copy link
Author

@LudovicRousseau please answer directly here. Driver ccid-1.4.4 can support Microchip SEC1210 and sim card Viettel(Vietnam, contact, ISO/IEC 7816) on SAM SEC1210 single slot can detect by pcscd, pcsc_scan ???

@LudovicRousseau
Copy link
Owner

https://blog.apdu.fr/posts/2020/11/how-to-get-smart-card-support/

@tuananh-lab
Copy link
Author

The way to communicate through your blog is quite complicated.
Can you tell me how to integrate CCID driver onto Android?
Is it possible to cross compile CCID driver from Linux and then port it to Android?

@FeitianSmartcardReader
Copy link
Contributor

FeitianSmartcardReader commented Nov 12, 2024

@tuananh-lab we were build pcsc under android, if you want call PC/SC API, you can have a look here:
https://github.com/FeitianSmartcardReader/FEITIAN_MOBILE_READERS/tree/master/Android_SDK

@tuananh-lab
Copy link
Author

@FeitianSmartcardReader
I need to integrate CCID driver onto the board using Android 13, the board is communicating with IC SAM SEC1210 via /dev/ttyHS5 port. Now I want to enable that port as a pcscd port so developers can call the API when needed.
Currently, I cannot build the source directly on the board, so I want to cross compile from a Linux machine using Android NDK to create a library and then push it to the board. Do you have any suggestions on how to integrate the CCID driver along with porting PCSC to Android?

@tuananh-lab
Copy link
Author

I found a suggestion on how to port PCSC driver on Android at https://github.com/zhengyi0802/android-pcsc but I don't see specific instructions. Do you have any solution?

@FeitianSmartcardReader
Copy link
Contributor

it looks he already modify the make file, you can have a look android.mk.

@FeitianSmartcardReader
Copy link
Contributor

I was build ccid and pcsc on embedded device, you can have reference too.
https://www.pcscreader.com/docs/embedded_system.html

@tuananh-lab
Copy link
Author

Thank you for your feedback, I think I need to integrate the operating system level, I have the operating system source and I want to integrate the PCSC driver build as a module so that the final image built to flash into the circuit will be ported. /dev/ttyHS5 will be identified as the pcscd port, of course dynamic libraries will have to be integrated in the paths and the reader.conf file will also be available and future developers will use the pcsc API Just ready to call.

@FeitianSmartcardReader
Copy link
Contributor

You can also utilize USB and adhere to the CCID protocol to package the API, without relying on the PC/SC API. This approach is much easier. However, if you have a large project that depends on PC/SC, then I concur with the points mentioned above.

@tuananh-lab
Copy link
Author

Because the SEC1210 module integrated on our board only supports UART, I need to enable the UART port as a pcscd port. My task is to provide a platform that ensures PC/SC services run on Android boards so that software developers can later operate with the smartcard on our board. I'm having difficulty finding any standard documents for porting CCID drivers and pcsc to Android.
I think it's impossible to install it directly on each board because we are the manufacturer I need a way to integrate it into the source and build the final image and make sure everything is installed. If you have any information please send it to me. Thank you very much.

@tuananh-lab
Copy link
Author

I'm asking here for Tx and Rx from the SEC1210 module connected to the personal computer at /dev/ttyUSB0 port via USB TTL FT232.
How can the pcscd service identify the dev/ttyUSB0 port as a card reader device?
I tried adding the Info.plist file but failed.
I am using CCID version 1.4.4 and pcsclite 1.9.0.
This is the device detected by my computer:
Bus 001 Device 043: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC

@tuananh-lab
Copy link
Author

Do you have a Java program to test that calls the API from the libraries: libpcsclite.so, libccidtwin.so so that I can ensure that I have successfully installed PC/SC on my Android board?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants