Hi,
Take a look into the file /proc/tty/driver/serial
Here you see all found uart and used linux driver and uart parameter (port,
irq,..)
With follow function you can unbind the linux driver
static int uart_unbind(int ttynr)
{
char dev[64];
int fd;
struct serial_struct serinfo;
// do unbind
sprintf(dev, "/dev/ttyS%u", ttynr);
fd = open(dev, O_RDWR | O_NONBLOCK);
if (fd >= 0) {
int ret = ioctl(fd, TIOCGSERIAL, &serinfo);
if (ret == 0) {
serinfo.type = PORT_UNKNOWN;
ret = ioctl(fd, TIOCSSERIAL, &serinfo);
}
close(fd);
return ret;
}
return -EFAULT;
}
We are using the modular xeno_16550A driver
And we are loading this with
system("/sbin/modprobe xeno_16550A io=0x3F8 irq=4");
better solution are welcome 😉
Regards
Johann
> -----Ursprüngliche Nachricht-----
> Von: Xenomai [mailto:[email protected]] Im Auftrag von Pintu
> Kumar
> Gesendet: Montag, 26. Februar 2018 11:59
> An: [email protected]; Jan Kiszka <[email protected]>; Philippe
> Gerum <[email protected]>; Greg Gallagher <[email protected]>
> Betreff: [Xenomai] [RTDM/rt-serial] How to verify 16550A on Ubuntu
> desktop
>
> Hi,
>
> I have enabled RTDM serial driver 16550A in kernel and I am using it with x86-
> 64 Ubuntu 16.04 desktop.
> CONFIG_XENO_DRIVERS_16550A=y
> CONFIG_XENO_DRIVERS_16550A_PIO=y
>
> Now I wanted to verify this driver using a sample application such as
> : cross-link
> But, when I check, the driver is not available under: /dev/rtdm/ (rtser0,
> rtser1)
>
> Is it possible to use this RT serial driver on Ubuntu PC?
> Please let me know how to install this driver and verify it.
>
> I wanted to modify some part in the driver and verify it.
>
> Need your initial support please!
>
>
> Thanks,
> Pintu
>
> _______________________________________________
> Xenomai mailing list
> [email protected]
> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fxe
> nomai.org%2Fmailman%2Flistinfo%2Fxenomai&data=02%7C01%7Cjohann.o
> bermayr%40sigmatek.at%7C2a831f53799d44bc0ec008d57d07f97f%7Cbcb1d8
> 7ad2bc486ea62b9ac9c746bc1b%7C0%7C0%7C636552395567117346&sdata=W
> crSRALRwjO590ZckkGOQm58MvTGd%2BT%2BxrW%2BQTFMw4g%3D&reser
> ved=0
_______________________________________________
Xenomai mailing list
[email protected]
https://xenomai.org/mailman/listinfo/xenomai