Hi,
im running a Gentoo Linux virtual machine as a Hyper-V guest.
Hyper-V does not support serial ports, therefore i have bought a Digi PortServer TS16 Rack.
I have successfully installed dgrp v1.9-29. The only thing i had to do is convert the start scripts in /etc/init.d to Gentoo style.
Most of the ports should be used in “RealPort” mode.
10 smart card readers are connected to ports 4-13 with RJ-45 (altpin on) to DB-9M modem cables.
Basic communication with the smart cards is possible. I can connect using minicom and see all characters i type echoed by the smartcard. RX/TX counter in dpa.dgrp increases.
The baud settings by minicom are active on the physical port (9600 8N2).
The smart card insertion detection uses the DCD signal. When a smart card is inserted into the reader DCD goes low.
The Linux smartcard software recognizes the insertion and accordingly sets the RTS signal to low to reset the smart card.
And here the trouble begins: Normally the smartcard should answer with the ATR (answer to reset) but the RTS signal stays active. I’ve tried numerous ditty-rp/stty settings but without success.
The Linux smartcard software is written in C and open source. I searched through the code and found the place where RTS is set. ioctl is used.
Here is a similar, much simpler C program to set/reset RTS:
#include
#include
#include
#include
main() {
int fd, sercmd, serstat;
sercmd = TIOCM_RTS;
fd = open("/dev/ttyXX03", O_RDONLY); // Open the serial port.
printf("Setting the RTS pin.
");
ioctl(fd, TIOCMBIS, &sercmd); // Set the RTS pin.
// Read the RTS pin status.
ioctl(fd, TIOCMGET, &serstat);
if (serstat & TIOCM_RTS)
printf("RTS pin is set.
");
else
printf("RTS pin is reset.
");
getchar(); // Wait for the return key before continuing.
printf("Resetting the RTS pin.
");
ioctl(fd, TIOCMBIC, &sercmd); // Reset the RTS pin.
// Read the RTS pin status.
ioctl(fd, TIOCMGET, &serstat);
if (serstat & TIOCM_RTS)
printf("RTS pin is set.
");
else
printf("RTS pin is reset.
");
getchar(); // Wait for the return key before continuing.
close(fd);
}
Even when RTS is set to low the read out value is still high.
What can i do to transparently pass through the RTS signal to the smart card readers?
Please help!
Best regards,
Axel
Btw: although i have not set all ports to RealPort mode, there always were 16 virtual vty ports created. Is this normal?
My dgrp.backing.store file:
XX 192.168.1.7 10 auto default default default default never default