Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [keyple-dev] About using SAMs

Hello Jean-Pierre,

you understood my task correctly.

I already made a first version of the custom plugin (and the diagram you pointed out was an invaluable help) but I got a bit lost thinking about the SAMs interactions.

Thanks to your explanation I can now clearly see what I need and how to implement the solution.

Regards,

Max

Il 26/07/2022 22:23, Jean-Pierre Fortune ha scritto:
Hello Max,

Thank you for your interest in Keyple!

If I understand correctly, you want to run Keyple in a proprietary terminal that has 4 SAM slots and probably a contactless interface. Am I right?

Since we are not talking about PC/SC readers, the PC/SC plugin can be used as a template but you will need to make a new plugin adapted to the hardware specifics.

For that, we have this page https://keyple.org/learn/developer-guide/reader-plugin-add-on/ which I hope contains the necessary information to get this project started.

One way to start is to create the empty plugin objects in this diagram and be guided by the interfaces to implement.

As you have 4 SAM slots, it is indeed wise to follow the choices of smartcard.io and make the plugin provide as many reader objects as there are slots (searchAvailableReaders()).

Each reader can have a name like "SAM Reader x" with x in the range [0,3]. 

If the hardware has a contactless interface and forms an inseparable whole the plugin should also provide a contactless reader with a suitable name.

Once the plugin is developed, its registration with the main service will be done like any other Keyple plugin and the use by the application level should be trouble-free.

The SAM reader can be selected by the application according to the card that has been identified.

An alternative architecture could also be to have only one SAM reader and a method in its extension to select the slot but this will probably have the disadvantage of being less flexible in use.

You should not need a new "Card Extension add-on" at this point, as it is mainly related to the card technology.

In any case, please feel free to add to this discussion to expose the problems and needs you may encounter.

Regards,
-- 
Jean-Pierre Fortune



Le mar. 26 juil. 2022 à 16:50, Max Paschetto <mpaschetto@xxxxxxxxx> a écrit :
Sorry for the self reply. I think that reading the
javax.smartcardio.CardTerminal documentation I got it right:
   "Note that physical card readers with slots for multiple cards are
represented by one CardTerminal object per such slot"
so I don't need any card extension but instead a configurable instance
of a Terminal that will allow me to access the four SAMs.
Thank you,
Max

Il giorno mar 26 lug 2022 alle ore 16:08 Max Paschetto
<mpaschetto@xxxxxxxxx> ha scritto:
>
> Hello there,
> I would like to ask you a question.
> I have a terminal that can read a smart card and has slots to support
> up to 4 SAMs.
> This terminal is not a PCSC reader, so I had to implement my reader plugin.
>
> Following an example like
>     https://keyple.org/learn/build-your-first-app/java-app/
> it looks like I should declare two different Readers, one for the
> smart card and one for the SAM.
>
> I tried to use the same reader to read both the smart card and a SAM.
> If I try to read a SAM using the CalypsoSamSelectionAdapter like
>
>     samSelectionManager.prepareSelection(
>         calypsoExtensionService
>
> .createSamSelection().filterByProductType(CalypsoSam.ProductType.SAM_C1))
>
> I can not find the SAM. If I do not specify the filter selection I get
> in return the smart card, not the SAM.
>
> I think I have to implement a card extension to be able to read from
> the four SAM slots:
>     https://keyple.org/learn/developer-guide/card-extension-add-on/
> I am right?
>
> Thank you,
> Max
_______________________________________________
keyple-dev mailing list
keyple-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/keyple-dev

_______________________________________________
keyple-dev mailing list
keyple-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/keyple-dev

Back to the top