Using SpringCard PC/SC Couplers with a Raspberry Pi 4

SpringCard PC/SC Couplers like the H663 family (CrazyWriter HSP, Prox’N’Roll HSP, TwistyWriter HSP…) and the new SpringCore family (PUCK…) are well supported by Linux systems thanks the open-source PCSC-Lite stack and its CCID driver. All these devices are easy to operate on early Raspberry Pi with little to no specificities.

This has changed on Raspberry Pi 4 and Raspian Bullseye and their new power-saving policy: by default, the system now shuts down any USB device that appears as being “unused” — which is namely the case of any PC/SC Coupler until a card is inserted or presented ;-).

For correct operations of any SpringCard PC/SC Coupler with a Raspberry Pi 4 and Raspian Bullseye, the integrator must therefore disable the USB power control, and this article explains how to do so. It may also be useful to anyone trying to troubleshoot disconnection issues affecting any PC/SC device when used together with an embedded Linux system where USB power saving is enabled by default.

IMPORTANT DISCLAIMER :

Please note that SpringCard is not responsible for any procedure that end user performs. YOU’RE FOLLOWING THIS PROCEDURE AT YOUR OWN RISK.

MATERIALS USED IN THIS TUTORIAL

For this tutorial, we used a SpringCard CrazyWriter HSP PC/SC coupler, a Raspberry Pi 4 (32 bits) and its accessories such as a keyboard, a mouse, a screen and a charger (for power). Raspberry features are as follows :

Once you have connected the hardware together (see image below), follow the next 4 steps.

If you wish to install the PCSCLite driver, follow this tutorial : install PCSCLite

1 – GET DEVICE TREE ENTRY :

lsusb -tvv

2 – CHECK POWER CONTROL FOR THIS PORT :

cat /sys/bus/usb/devices/1-1.3/power/control

If the result is “on”, your device ‘s power is not under the Kernel control. Your device is always powered.

If your device is in “auto” state, it means that the kernel may ask it to reduce its consumption. It may work in most cases but here is a way to disable this “auto” feature. This takes us to step 3.

3 – CREATE A NEW UDEV RULE FILE

nano /etc/udev/rules.d/usb-power.rules

add a new rule to force “on” mode on devices with the relevant idVendor/idProduct couple :
# SpringCard CrazyWriter ACTION==”add”, SUBSYSTEM==”usb”, ATTR{idVendor}==”1c34″, ATTR{idProduct}==”91b1″, TEST==”power/control”, ATTR{power/control}=”on”

4 – REBOOT

Note : If you encounter this kind of behaviour with a SpringCard coupler that works on the Raspberry, please do this. If this does not work, please contact us via our technical support at support@springcard.com


Posted

in

, ,

by

Tags: