PPS Support in driver

We’re attempting to capture DCD transitions w/ the Xr920 card on Solaris 10 x86. The ioctl calls in the following code snippet fail with an invalid argument. Is this not supported by the driver?

#include
#include
#include
#include

int
main(int argc,
char *argv[])
{
int fd, code, one = 1, i;
struct ppsclockev ev;

fd = open(argv[1], O_RDONLY);
code = ioctl(fd, TIOCSPPS, &one); /* Enable PPS */

for (i = 0; i < 10; i++) {
    code = ioctl(fd, TIOCGPPSEV, &ev);
    printf("PPS Event: serial=%u, time=%d.%08d

",
ev.serial, ev.tv.tv_sec, ev.tv.tv_usec);
sleep(1);
}

}

code = ioctl(fd, TIOCSPPS, &one); /* Enable PPS */

The ioctl call to enable this is failing w/ an invalid argument.

Message was edited by: ctmckay

Hi.

The TIOCSPPS/TIOCGPPSEV ioctls are NOT handled by any of the Digi Solaris drivers.

Its possible (probable?) that you could probably find a STREAMs module that could be stacked on top of the Digi driver stream that will intercept these ioctls and translate them into a more standard ioctl that the driver
would understand.

Scott Kilau

Not sure.

I just did a “google” search for those ioctls and came across a couple articles that suggested there was a
ppsclock STREAMs module that could do it.

BTW,
What Digi Solaris driver/product are you using?

Scott,
Thanks for the info. Do you have any suggestions on where I would find more info on doing this? Particularly the part about intercepting the ioctl calls and translating them into something the DIGI driver would understand?

Thanks,
Chris