tofferoma

tofferoma

How to access PCSC card readers via erlang/elixir?

Hi,

i was wondering if there is a way to access smart cards via a PCSC reader.
I was unable to find any lib or bindings to do so (here’s a list samples in different languages [1]).

Maybe there is a different way to accomplish the task, or there has never been a use case for erlang centric applications.

Thanks in advance
T

Most Liked

arjan

arjan

A while back I wrote a library which interfaces with libnfc compatible card readers:

https://github.com/arjan/nerves_io_nfc

It uses a NIF under the hood to do the device IO. It is quote limited at the moment though, it has only been used to read Mifare NFC cards. But it maybe could get you started.

arekinath

arekinath

I’ve just recently had reason to put together a proper libpcsc binding for Erlang:

https://github.com/arekinath/erlang-pcsc

If you’re still looking, let me know what you think. Also includes some conveniences like ISO7816 command and response chaining support in an “APDU transform” so you can just send a long data field or get a long reply back.

I don’t use Elixir a lot myself, so I’m not sure how the API will look from that side, but I’m happy to try to improve it.

tofferoma

tofferoma

Thanks a lot. I will give it a try once I find some time a reader :).

In the meantime, you might want to contact Ludovic Rousseau to add the library to his list of PC/SC samples in different languages [1]

[1] Ludovic Rousseau's blog: PC/SC sample in different languages

Where Next?

Popular in Questions Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> somethi...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

Other popular topics Top

New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 43487 311
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement