preloader

Quickstarting with your LEIA-Solo board

  • Friday, Mar 19, 2021
blog-image

Quickstarting LEIA-Solo

Congratulation ! You have received your LEIA-Solo board(s) ! Let’s start with the overall tooling and board description.

The basics

Quicstarting the hardware, software and firmware is documented here.

The firmware

The firmware API is fully specified here and can be accessed using the python library of the smartleia library.

This library is packaged for Debian (see https://h2lab.github.io/smartleia.github.io/installation.html) and can be installed using pip.

The software

The smartleia library expose an efficient smartcard oriented interface in order to communicate with the target. This interface is fully documented here.

Don’t hesitate to take a look to the overall LEIA-Solo documentation and tooling informations.

Contacting H2Lab for LEIA-Solo

  • Technical question: leia-faq.technical [at] h2lab.org
  • Other question: leia-faq.general [at] h2lab.org

FAQ, Problems, incompatibilities

During our tests, we have found some various problems that you may encounter:

I can’t communicate with LEIA-Solo board!

1. Do not use ModemManager on GNU/Linux

ModemManager may be installed by your distribution. This service tries to communicate with any ttyACM-based device, making interactions with LEIA-Solo unstable to other tools. You may uninstall or deactivate it temporarily.

2. Check the ttyACM numbers in your dmesg

There are some cases where the udev mechanisms upgrade the ttyACM numbering dynamically for already plugged devices. You might have another ttyACM device connected. This may impact the python layer, even if we try to handle this use case and check successive devices.

3. Are you using direct access or VPCD-based access ?

If the communication is made using VPCD, the vsmartcard VPCD relay must be installed and the smartleia main loop must be executed first and keeped started in background:

$ python3 -m smartleia


        The connection with LEIA is opened and is connected to pcscd through virtualsmartcard.

        You can change the link with the smartcard with the following commands :

            configure( protocol_to_use=0,
                       ETU_to_use=...,
                       freq_to_use=...,
                       negotiate_pts=True,
                       negotiate_baudate=True)

            t0()    Equivalent to configure(protocol_to_use=0)
            t1()    Equivalent to configure(protocol_to_use=1)
            dfu()

        You have access to leia through the `leia` variable.

        Type exit() or CTRL-D to exit.


>>> Starting LEIA PCSC relay for host 127.0.0.1:35963

I didn’t manage to use LEIA-Solo as a smartcard reader

Be sure that you have installed the vsmartcard VPCD backend to your PC/SC installation. The relay is packaged under Debian Bullseye and higher:

$ sudo apt install vsmartcard-vpcd

On other distros, it can be compiled from sources. The upstream project can be found here: https://github.com/frankmorgner/vsmartcard

To check that the VPCD library is load by PC/SC, you can stop the pcscd service and run it in foreground using:

# pcscd -fad

You should get, in the pcscd logs, the following.

...
valuatetoken() Add reader: Virtual PCD
...

Questions ?

Any questions, remarks ? Contact us on any of our social networks or communications interfaces !