tofferoma
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
Trending in Questions
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
Hello,
I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind.
However, when I launch mix phx.server, I get an error...
New
Hi everyone,
I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding.
I sta...
New
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
I’m working on a small exercise involving update_in/3, and I came up with this solution:
data = %{
name: "Periodic Table",
category:...
New
I’ve got trouble wrapping my head around the order in which functions are called in this snippet (from Phoenix’s authentication):
toke...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ai
- #ecto-query
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #metaprogramming
- #hex










Showing Posts 13 to 4- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
LudovicRousseau
No idea.
Maybe.
ghannam80
Is it possible in principle to use those NFC libraries to exchange information between 2 NFC enabled mobile phones ? As an example use it between customer and merchant to get payment details instead of QR or card payment?
LudovicRousseau
My Erlang sample is also ready.
See Ludovic Rousseau's blog: PC/SC sample in Erlang
Thanks
LudovicRousseau
My Elixir sample is ready.
See Ludovic Rousseau's blog: PC/SC sample in Elixir
Thanks to alll
tofferoma
@LudovicRousseau I took the liberty to put together an elixir example, which can be found here: GitHub - tofferoma/elixir_pcsc_sample · GitHub
hope it helps
tofferoma
I added a pull request for running the code as a relx release via rebar3_run plugin. Maybe someone finds it interesting.
Looking forward to the elixir version
LudovicRousseau
I added “pcsc” in
src/blog.app.srcas you suggested and I see some progress.Now I have:
Error -2146435026 is SCARD_E_NO_READERS_AVAILABLE and is not really an error.
Reported upstream at [warning] got pcsc_reader_error: {error,{pcsc_error,-2146435026,no_readers,"Cannot find a smart card reader."}}; restarted ok · Issue #4 · arekinath/erlang-pcsc · GitHub
Thanks @tofferoma.
I may ask for more help very soon about Elixir
tofferoma
So after some more research it is enough to add pcsc to the applications in
src/blog.app.srcThis makes the
rebar3 shellcommand work. However, packaging a NIF with an escript seems to be more complicated [1], [2]. The shell example should be enough as a proof of concept though, as the packaging/release method is up to the user.hope this helps
[1] Escript: can not load argon2_nif - wrong approach for CLI?
[2] escripts look for nifs (.so) in wrong location · Issue #2129 · erlang/rebar3 · GitHub
tofferoma
Hi,
changing my rebar.config to
gets me further.
With the
{escript_incl_apps, [pcsc]}the error changes fromundefined functiontonoproc. The library should now be packaged properly with the escript.The
noprocerror occurs in this case, because the pcsc application is not started. So I tried adding it in the apps declaration{apps, [pcsc, blog]}← works only for shell so far.When I run
rebar3 shellI still get an error because my architectures don’t match, and the NIF can’t load the C code. I’ll try to get around this, but maybe this already solves your problem.Edit:
I got it working in the shell on a different machine
still no luck with the escript tough …
Thanks and good luck
Chris
LudovicRousseau
I am trying to use erlang-pcsc from @arekinath.
But that is my first Erlang program and I blocked on a stupid problem
I created a sample code at GitHub - LudovicRousseau/erlang-pcsc-sample: Sample code of PC/SC in Erlang · GitHub
I use
rebar3 escriptizeto create a binary.Then I start it using:
My code does not find the pcsc functions. I guess it is trivial to fix once you know Erlang a bit more.
My goal is to add an Erlang PC/SC sample to Ludovic Rousseau's blog: PC/SC sample in different languages
I also tried:
Here the function
list_readers()is found but I get an exception.Sorry to ask stupid questions. Can someone help?