Hello everyone,

a while ago, there was a discussion in xdg [1] about DBus support for
smartcard activity. I've hacked together a bash script for that purpose:

#!/bin/bash
pcsc_scan -n | { while read RESULT; do 

        ATR=$(echo $RESULT | perlgrep "ATR: ..35m(.*)\e")
        [ "$ATR" ] && dbus-send --session
--type=signal /org/debian/alioth/pcsclite/reader0/slot0
org.debian.alioth.pcsclite.CardPresence string:"$ATR"

        RMV=$(echo $RESULT | grep "removed")
        [ "$RMV" ] && dbus-send --session
--type=signal /org/debian/alioth/pcsclite/reader0/slot0
org.debian.alioth.pcsclite.CardPresence boolean:false

done }

However, I think it would be a bit smoother to directly integrate this
into pcsc-lite. The best to add support would be in eventhandler.c,
correct?

Florian

[1] http://lists.freedesktop.org/archives/xdg/2009-August/011008.html
-- 
SENT FROM MY PDP-11

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to