ese-relay connects libese's functionality to a local abstract socket on an Android device. The primary purpose is to ease development and provision with test hardware without bringing up all the development tools needed.
ese-relay uses the same wire protocol as the Virtual Smart Card project by acting as the "viccd" service. This enables use of any tool that supports pcsc-lite without any additional development.
The format is always Ln d0..dn Ln is a network byte order 16-bit unsigned integer length of the data. d0..dn are uint8_t bytes to tunneled directly to/from the card.
If Ln == 1, it indicates an out of band control message. Supported messages are 1:0 - 1:4:
FRIENDLYNAME "Virtual PCD" DEVICENAME localhost:0x1000 LIBPATH /usr/lib/pcsc/drivers/serial/libifdvpcd.so CHANNELID 0x1000
This will cause pcscd to connect to localhost port 4096 on start as per the vsmartcard documentation.
$ adb shell ese-relay- $ adb forward tcp:4096 localabstract:ese-relay
$ /etc/init.d/pcscd restart # (Or whatever your init system requires.)
$ java -jar gp.jar -info