Skip to content

Instantly share code, notes, and snippets.

View jgmel's full-sized avatar
🏠
Working from home

Juan Gómez Melero jgmel

🏠
Working from home
  • Phicus Tecnologia SL
View GitHub Profile
@jgmel
jgmel / phoenix.sh
Last active November 9, 2017 15:50
Phoenix Card Reader-USB Smartcard Reader
#!/bin/sh
main(){
NCARD=0
PREFIX=phoenix
rm -f /etc/udev/rules.d/99-usb-serial.rules
for n in /dev/ttyUSB*; do
let NCARD++
UDEV_SERIAL=`udevadm info -a -p $(udevadm info -q path -n ${n}) | grep -B 12 'FT232R USB UART' | grep 'ATTRS{serial}'`
cat >> /etc/udev/rules.d/99-usb-serial.rules <<EOT