Skip to contentSkip to conversation

Serial Port Driver (rtser): No RTSER_RTIOC_WAIT_EVENT

Xenomai-help Jonas Witt 2 participants 10 messages May 10, 2007 – May 11, 2007

lore
Share & tools
lore

Jonas Witt

author
#0 lore raw

Hi everybody,

i am having a problem with the serial port driver in xenomai for a while now..

I have tried different programs like
http://www.captain.at/xenomai-serial-port-example.php

I have also changed the code of cross-link.c to use the same port for writing and reading (as i only have one serial port in my computer). Opening a port and writing the configuration seems to work form e.. also writing. The Problem stems from the call to:

rt_dev_ioctl(read_fd, RTSER_RTIOC_WAIT_EVENT, &rx_event);

which keeps waiting forever and never receives an interrupt. I tried a self-made loopback-adapter and a sensor with a serial interface (so at least _something_ should come back). Nothing worked. The serial port is working fine with the linux-driver, though. I already figured that the calls to rt_dev_write do not work from non-xenomai-tasks (which should really be emphasized in the documentation..)

I am already pretty much behind my schedule with the project that i am undertaking.. any (preferably fast ;) ) input is very much appreciated. I think i will update the serial driver documentation when i am through with my initial problems. I think that is desperately needed for other people that are new to xenomai.

Thanks in advance!

Cheers, Jonas

#1 lore raw
Quoted 25 lines · Jonas Witt

Hi everybody,

i am having a problem with the serial port driver in xenomai for a while now..

I have tried different programs like
http://www.captain.at/xenomai-serial-port-example.php

I have also changed the code of cross-link.c to use the same port for writing and reading (as i only have one serial port in my computer). Opening a port and writing the configuration seems to work form e.. also writing. The Problem stems from the call to:

rt_dev_ioctl(read_fd, RTSER_RTIOC_WAIT_EVENT, &rx_event);

Quoted 7 lines

which keeps waiting forever and never receives an interrupt. I tried a self-made loopback-adapter and a sensor with a serial interface (so at least _something_ should come back). Nothing worked. The serial port is working fine with the linux-driver, though. I already figured that the calls to rt_dev_write do not work from non-xenomai-tasks (which should really be emphasized in the documentation..)

Some suggestions:

o check the hardware configuration (ie. the module parameters of xeno_16550A) twice, you can easily get them wrong

o check /proc/xenomai/irq for any progress on transmission as well as on reception. If there is nothing happen on tx, the IRQ number may be wrong, if there is nothing on rx, your port configuration might be broken.

o try the driver from trunk, it can handle PnP-related issues (hardware gets powered off when Linux driver is removed)

Jan

author
#2 lore raw

Re: [Xenomai-help] Serial Port Driver (rtser): NoRTSER_RTIOC_WAIT_EVENT

Quoted 9 lines · Jonas Witt
Quoted 9 lines

Hi everybody,

i am having a problem with the serial port driver in xenomai for a while now..

Quoted 7 lines
Quoted 7 lines

I have tried different programs like
http://www.captain.at/xenomai-serial-port-example.php

I have also changed the code of cross-link.c to use the same port for writing and reading (as i only have one serial port in my computer).

Opening

Quoted 1 line
Quoted 1 line

a port and writing the configuration seems to work form e.. also

writing.

Quoted 10 lines
Quoted 10 lines

The Problem stems from the call to:

rt_dev_ioctl(read_fd, RTSER_RTIOC_WAIT_EVENT, &rx_event);

which keeps waiting forever and never receives an interrupt. I tried a self-made loopback-adapter and a sensor with a serial interface (so at >

least

Quoted 1 line
Quoted 1 line

_something_ should come back). Nothing worked. The serial port is

working

Quoted 15 lines
Quoted 4 lines

fine with the linux-driver, though. I already figured that the calls to rt_dev_write do not work from non-xenomai-tasks (which should really be emphasized in the documentation..)

Some suggestions:

o check the hardware configuration (ie. the module parameters of xeno_16550A) twice, you can easily get them wrong

o check /proc/xenomai/irq for any progress on transmission as well as on reception. If there is nothing happen on tx, the IRQ number may be wrong, if there is nothing on rx, your port configuration might be broken.

Quoted 4 lines

o try the driver from trunk, it can handle PnP-related issues (hardware gets powered off when Linux driver is removed)

Jan

Thanks for the fast reply!

I am using the following kernel parameters:

kernel /boot/vmlinuz-2.6.19-ipipe root=/dev/sda1 ro 8250.nr_uarts=0
xeno_16550A.ioaddr=0x3f8 xeno_16550A.irq=4

I got these settings from setserial prior to disabling the kernel-driver. To be honest i don't know how to 'check' /proc/xenomai/irq for progress. I took a look at the folder prior to and while running my modified cross-link-code but irq is an empty file in both cases. Is there some special trick/function to handle the files in the proc-folder?

To the last point.. so there is an updated version of the driver available? I think i will try that one.. is it just a question of executing 'make' and modprobing or are there more actions involved?

Best regards,
Jonas

#3 lore raw

Re: [Xenomai-help] Serial Port Driver (rtser): NoRTSER_RTIOC_WAIT_EVENT

Quoted 50 lines · Jonas Witt
Quoted 9 lines · Jonas Witt
Quoted 9 lines

Hi everybody,

i am having a problem with the serial port driver in xenomai for a while now..

Quoted 7 lines
Quoted 7 lines

I have tried different programs like
http://www.captain.at/xenomai-serial-port-example.php

I have also changed the code of cross-link.c to use the same port for writing and reading (as i only have one serial port in my computer).

Opening

Quoted 1 line
Quoted 1 line

a port and writing the configuration seems to work form e.. also

writing.

Quoted 10 lines
Quoted 10 lines

The Problem stems from the call to:

rt_dev_ioctl(read_fd, RTSER_RTIOC_WAIT_EVENT, &rx_event);

which keeps waiting forever and never receives an interrupt. I tried a self-made loopback-adapter and a sensor with a serial interface (so at >

least

Quoted 1 line
Quoted 1 line

_something_ should come back). Nothing worked. The serial port is

working

Quoted 17 lines
Quoted 4 lines

fine with the linux-driver, though. I already figured that the calls to rt_dev_write do not work from non-xenomai-tasks (which should really be emphasized in the documentation..)

Some suggestions:

o check the hardware configuration (ie. the module parameters of xeno_16550A) twice, you can easily get them wrong

o check /proc/xenomai/irq for any progress on transmission as well as on reception. If there is nothing happen on tx, the IRQ number may be wrong, if there is nothing on rx, your port configuration might be broken.

o try the driver from trunk, it can handle PnP-related issues (hardware gets powered off when Linux driver is removed)

Quoted 8 lines
Quoted 1 line

Jan

Thanks for the fast reply!

I am using the following kernel parameters:

kernel /boot/vmlinuz-2.6.19-ipipe root=/dev/sda1 ro 8250.nr_uarts=0
xeno_16550A.ioaddr=0x3f8 xeno_16550A.irq=4

OK, that leads to another suggestion: try going the modular path for xeno_16550A first, it's the more common one. Above /should/ be no problem /wrt the the RT driver, but kicking 8250 out of the game could cause that PnP power issue I sketched.

Quoted 6 lines

I got these settings from setserial prior to disabling the kernel-driver. To be honest i don't know how to 'check' /proc/xenomai/irq for progress. I took a look at the folder prior to and while running my modified cross-link-code but irq is an empty file in both cases. Is there some special trick/function to handle the files in the proc-folder?

You mean the file is existing but empty??? That would be fairly uncommon.

(without any driver loaded)

# cat /proc/xenomai/irq
IRQ         CPU0
217:           0
226:           0         [virtual]

The serial driver pops up here once the port is opened. The per-cpu irq hit counter should then increase as interrupts come in.

Quoted 4 lines

To the last point.. so there is an updated version of the driver available? I think i will try that one.. is it just a question of executing 'make' and modprobing or are there more actions involved?

No, it's not that easy (more files, changed Makefiles and RTDM API). First try the modular driver path, ie. keep 8250, switch off the Linux port with setserial, and load the RT driver as a module. Then, if this doesn't help, you could consider upgrading your Xenomai installation (at least for a test) to SVN trunk.

Jan

author
#4 lore raw

Re: [Xenomai-help] Serial Port Driver (rtser): NoRTSER_RTIOC_WAIT_EVENT

Quoted 28 lines · Jonas Witt
Quoted 9 lines · Jonas Witt
Quoted 9 lines

Hi everybody,

i am having a problem with the serial port driver in xenomai for a while now..

Quoted 7 lines
Quoted 7 lines

I have tried different programs like
http://www.captain.at/xenomai-serial-port-example.php

I have also changed the code of cross-link.c to use the same port for writing and reading (as i only have one serial port in my computer).

Opening

Quoted 1 line
Quoted 1 line

a port and writing the configuration seems to work form e.. also

writing.

Quoted 8 lines
Quoted 8 lines

The Problem stems from the call to:

rt_dev_ioctl(read_fd, RTSER_RTIOC_WAIT_EVENT, &rx_event);

Quoted 29 lines
Quoted 2 lines
Quoted 2 lines

which keeps waiting forever and never receives an interrupt. I tried a self-made loopback-adapter and a sensor with a serial interface (so at >

least

Quoted 1 line
Quoted 1 line

_something_ should come back). Nothing worked. The serial port is

working

Quoted 24 lines
Quoted 4 lines

fine with the linux-driver, though. I already figured that the calls to rt_dev_write do not work from non-xenomai-tasks (which should really be emphasized in the documentation..)

Some suggestions:

o check the hardware configuration (ie. the module parameters of xeno_16550A) twice, you can easily get them wrong

o check /proc/xenomai/irq for any progress on transmission as well as on reception. If there is nothing happen on tx, the IRQ number may be wrong, if there is nothing on rx, your port configuration might be broken.

o try the driver from trunk, it can handle PnP-related issues (hardware gets powered off when Linux driver is removed)

Jan

Thanks for the fast reply!

I am using the following kernel parameters:

kernel /boot/vmlinuz-2.6.19-ipipe root=/dev/sda1 ro

8250.nr_uarts=0

Quoted 9 lines
Quoted 2 lines

xeno_16550A.ioaddr=0x3f8 xeno_16550A.irq=4

OK, that leads to another suggestion: try going the modular path for xeno_16550A first, it's the more common one. Above /should/ be no problem /wrt the the RT driver, but kicking 8250 out of the game could cause that PnP power issue I sketched.

Quoted 2 lines

I got these settings from setserial prior to disabling the kernel-driver.

To

Quoted 1 line
Quoted 1 line

be honest i don't know how to 'check' /proc/xenomai/irq for progress. I

took

Quoted 1 line
Quoted 1 line

a look at the folder prior to and while running my modified

cross-link-code

Quoted 1 line
Quoted 1 line

but irq is an empty file in both cases. Is there some special

trick/function

Quoted 20 lines
Quoted 1 line

to handle the files in the proc-folder?

You mean the file is existing but empty??? That would be fairly uncommon.

(without any driver loaded)

# cat /proc/xenomai/irq
IRQ         CPU0
217:           0
226:           0         [virtual]

The serial driver pops up here once the port is opened. The per-cpu irq hit counter should then increase as interrupts come in.

Quoted 2 lines

To the last point.. so there is an updated version of the driver

available?

Quoted 1 line

I think i will try that one.. is it just a question of executing 'make'

and

Quoted 1 line

modprobing or are there more actions involved?

Quoted 7 lines

No, it's not that easy (more files, changed Makefiles and RTDM API). First try the modular driver path, ie. keep 8250, switch off the Linux port with setserial, and load the RT driver as a module. Then, if this doesn't help, you could consider upgrading your Xenomai installation (at least for a test) to SVN trunk.

Jan

Ah, ok.. ehem... i tried to look at the file with gedit.. and it displays nothing.. ;)
Now i get:

IRQ CPU0

  4:           0         rtser0
216:         521         [timer]
226:         620         [virtual]

This is how it looks like after the program starts.. after that it increases just the [virtual] and the [timer] counter . Rtser0 stays at 0 all the time (although information is successfully written to the port, judging from the return value of rt_dev_write).

So i guess that is where the problem lies.. what can I do about that?

Jonas

#5 lore raw

Re: [Xenomai-help] Serial Port Driver (rtser): NoRTSER_RTIOC_WAIT_EVENT

Quoted 108 lines · Jonas Witt
Quoted 28 lines · Jonas Witt
Quoted 9 lines · Jonas Witt
Quoted 9 lines

Hi everybody,

i am having a problem with the serial port driver in xenomai for a while now..

Quoted 7 lines
Quoted 7 lines

I have tried different programs like
http://www.captain.at/xenomai-serial-port-example.php

I have also changed the code of cross-link.c to use the same port for writing and reading (as i only have one serial port in my computer).

Opening

Quoted 1 line
Quoted 1 line

a port and writing the configuration seems to work form e.. also

writing.

Quoted 8 lines
Quoted 8 lines

The Problem stems from the call to:

rt_dev_ioctl(read_fd, RTSER_RTIOC_WAIT_EVENT, &rx_event);

Quoted 29 lines
Quoted 2 lines
Quoted 2 lines

which keeps waiting forever and never receives an interrupt. I tried a self-made loopback-adapter and a sensor with a serial interface (so at >

least

Quoted 1 line
Quoted 1 line

_something_ should come back). Nothing worked. The serial port is

working

Quoted 24 lines
Quoted 4 lines

fine with the linux-driver, though. I already figured that the calls to rt_dev_write do not work from non-xenomai-tasks (which should really be emphasized in the documentation..)

Some suggestions:

o check the hardware configuration (ie. the module parameters of xeno_16550A) twice, you can easily get them wrong

o check /proc/xenomai/irq for any progress on transmission as well as on reception. If there is nothing happen on tx, the IRQ number may be wrong, if there is nothing on rx, your port configuration might be broken.

o try the driver from trunk, it can handle PnP-related issues (hardware gets powered off when Linux driver is removed)

Jan

Thanks for the fast reply!

I am using the following kernel parameters:

kernel /boot/vmlinuz-2.6.19-ipipe root=/dev/sda1 ro

8250.nr_uarts=0

Quoted 8 lines
Quoted 2 lines

xeno_16550A.ioaddr=0x3f8 xeno_16550A.irq=4

OK, that leads to another suggestion: try going the modular path for xeno_16550A first, it's the more common one. Above /should/ be no problem /wrt the the RT driver, but kicking 8250 out of the game could cause that PnP power issue I sketched.

Quoted 1 line

I got these settings from setserial prior to disabling the kernel-driver.

To

Quoted 1 line
Quoted 1 line

be honest i don't know how to 'check' /proc/xenomai/irq for progress. I

took

Quoted 1 line
Quoted 1 line

a look at the folder prior to and while running my modified

cross-link-code

Quoted 1 line
Quoted 1 line

but irq is an empty file in both cases. Is there some special

trick/function

Quoted 16 lines
Quoted 1 line

to handle the files in the proc-folder?

You mean the file is existing but empty??? That would be fairly uncommon.

(without any driver loaded)

# cat /proc/xenomai/irq
IRQ         CPU0
217:           0
226:           0         [virtual]

The serial driver pops up here once the port is opened. The per-cpu irq hit counter should then increase as interrupts come in.

Quoted 1 line

To the last point.. so there is an updated version of the driver

available?

Quoted 1 line

I think i will try that one.. is it just a question of executing 'make'

and

Quoted 8 lines
Quoted 1 line

modprobing or are there more actions involved?

No, it's not that easy (more files, changed Makefiles and RTDM API). First try the modular driver path, ie. keep 8250, switch off the Linux port with setserial, and load the RT driver as a module. Then, if this doesn't help, you could consider upgrading your Xenomai installation (at least for a test) to SVN trunk.

Jan

Ah, ok.. ehem... i tried to look at the file with gedit.. and it displays nothing.. ;)
Now i get:

IRQ CPU0

  4:           0         rtser0
216:         521         [timer]
226:         620         [virtual]
Quoted 6 lines

This is how it looks like after the program starts.. after that it increases just the [virtual] and the [timer] counter . Rtser0 stays at 0 all the time (although information is successfully written to the port, judging from the return value of rt_dev_write).

So i guess that is where the problem lies.. what can I do about that?

Apply the other suggestion I made. You may try to talk to a dead device if 8250 is not loaded and takes over the PnP work.

Jan

author
#6 lore raw

Re: [Xenomai-help] Serial Port Driver(rtser): No RTSER_RTIOC_WAIT_EVENT

Quoted 7 lines · Jonas Witt
Quoted 6 lines · Jonas Witt
Quoted 5 lines · Jonas Witt
Quoted 5 lines

Hi everybody,

i am having a problem with the serial port driver in xenomai for a

while

Quoted 45 lines
Quoted 45 lines
Quoted 11 lines
Quoted 11 lines

now..

I have tried different programs like
http://www.captain.at/xenomai-serial-port-example.php

I have also changed the code of cross-link.c to use the same port for writing and reading (as i only have one serial port in my computer).

Opening

Quoted 1 line
Quoted 1 line

a port and writing the configuration seems to work form e.. also

writing.

Quoted 10 lines
Quoted 10 lines

The Problem stems from the call to:

rt_dev_ioctl(read_fd, RTSER_RTIOC_WAIT_EVENT, &rx_event);

which keeps waiting forever and never receives an interrupt. I tried a self-made loopback-adapter and a sensor with a serial interface (so at

least

Quoted 1 line
Quoted 1 line

_something_ should come back). Nothing worked. The serial port is

working

Quoted 17 lines
Quoted 4 lines

fine with the linux-driver, though. I already figured that the calls to rt_dev_write do not work from non-xenomai-tasks (which should really be emphasized in the documentation..)

Some suggestions:

o check the hardware configuration (ie. the module parameters of xeno_16550A) twice, you can easily get them wrong

o check /proc/xenomai/irq for any progress on transmission as well as on reception. If there is nothing happen on tx, the IRQ number may be wrong, if there is nothing on rx, your port configuration might be broken.

o try the driver from trunk, it can handle PnP-related issues (hardware gets powered off when Linux driver is removed)

Quoted 16 lines
Quoted 7 lines
Quoted 7 lines

Jan

Thanks for the fast reply!

I am using the following kernel parameters:

kernel /boot/vmlinuz-2.6.19-ipipe root=/dev/sda1 ro

8250.nr_uarts=0

Quoted 8 lines
Quoted 2 lines

xeno_16550A.ioaddr=0x3f8 xeno_16550A.irq=4

OK, that leads to another suggestion: try going the modular path for xeno_16550A first, it's the more common one. Above /should/ be no problem /wrt the the RT driver, but kicking 8250 out of the game could cause that PnP power issue I sketched.

Quoted 1 line

I got these settings from setserial prior to disabling the

kernel-driver.

Quoted 42 lines

To

Quoted 1 line
Quoted 1 line

be honest i don't know how to 'check' /proc/xenomai/irq for progress. I

took

Quoted 1 line
Quoted 1 line

a look at the folder prior to and while running my modified

cross-link-code

Quoted 1 line
Quoted 1 line

but irq is an empty file in both cases. Is there some special

trick/function

Quoted 35 lines
Quoted 1 line

to handle the files in the proc-folder?

You mean the file is existing but empty??? That would be fairly uncommon.

(without any driver loaded)

# cat /proc/xenomai/irq
IRQ         CPU0
217:           0
226:           0         [virtual]

The serial driver pops up here once the port is opened. The per-cpu irq hit counter should then increase as interrupts come in.

Quoted 1 line

To the last point.. so there is an updated version of the driver

available?

Quoted 1 line

I think i will try that one.. is it just a question of executing 'make'

and

Quoted 1 line

modprobing or are there more actions involved?

No, it's not that easy (more files, changed Makefiles and RTDM API). First try the modular driver path, ie. keep 8250, switch off the Linux port with setserial, and load the RT driver as a module. Then, if this doesn't help, you could consider upgrading your Xenomai installation (at least for a test) to SVN trunk.

Jan

Ah, ok.. ehem... i tried to look at the file with gedit.. and it displays nothing.. ;)
Now i get:

IRQ CPU0

  4:           0         rtser0
216:         521         [timer]
226:         620         [virtual]

This is how it looks like after the program starts.. after that it

increases

Quoted 1 line
Quoted 1 line

just the [virtual] and the [timer] counter . Rtser0 stays at 0 all the

time

Quoted 1 line
Quoted 1 line

(although information is successfully written to the port, judging from

the

Quoted 8 lines
Quoted 3 lines

return value of rt_dev_write).

So i guess that is where the problem lies.. what can I do about that?

Apply the other suggestion I made. You may try to talk to a dead device if 8250 is not loaded and takes over the PnP work.

Jan

I already tried my luck with a modular driver.. does not work either..

Now i compiled a new 2.6.20-kernel with xenomai-trunk. I tried to modprobe as usual:
modprobe xeno_16550A ioaddr=0x3f8 irq=4
but somehow the 'ioaddr'-parameter is not accepted by the module.. did something change there?

Jonas

#7 lore raw

Re: [Xenomai-help] Serial Port Driver(rtser): No RTSER_RTIOC_WAIT_EVENT

Quoted 119 lines · Jonas Witt
Quoted 7 lines · Jonas Witt
Quoted 6 lines · Jonas Witt
Quoted 5 lines · Jonas Witt
Quoted 5 lines

Hi everybody,

i am having a problem with the serial port driver in xenomai for a

while

Quoted 44 lines
Quoted 44 lines
Quoted 11 lines
Quoted 11 lines

now..

I have tried different programs like
http://www.captain.at/xenomai-serial-port-example.php

I have also changed the code of cross-link.c to use the same port for writing and reading (as i only have one serial port in my computer).

Opening

Quoted 1 line
Quoted 1 line

a port and writing the configuration seems to work form e.. also

writing.

Quoted 10 lines
Quoted 10 lines

The Problem stems from the call to:

rt_dev_ioctl(read_fd, RTSER_RTIOC_WAIT_EVENT, &rx_event);

which keeps waiting forever and never receives an interrupt. I tried a self-made loopback-adapter and a sensor with a serial interface (so at

least

Quoted 1 line
Quoted 1 line

_something_ should come back). Nothing worked. The serial port is

working

Quoted 17 lines
Quoted 4 lines

fine with the linux-driver, though. I already figured that the calls to rt_dev_write do not work from non-xenomai-tasks (which should really be emphasized in the documentation..)

Some suggestions:

o check the hardware configuration (ie. the module parameters of xeno_16550A) twice, you can easily get them wrong

o check /proc/xenomai/irq for any progress on transmission as well as on reception. If there is nothing happen on tx, the IRQ number may be wrong, if there is nothing on rx, your port configuration might be broken.

o try the driver from trunk, it can handle PnP-related issues (hardware gets powered off when Linux driver is removed)

Quoted 16 lines
Quoted 7 lines
Quoted 7 lines

Jan

Thanks for the fast reply!

I am using the following kernel parameters:

kernel /boot/vmlinuz-2.6.19-ipipe root=/dev/sda1 ro

8250.nr_uarts=0

Quoted 8 lines
Quoted 2 lines

xeno_16550A.ioaddr=0x3f8 xeno_16550A.irq=4

OK, that leads to another suggestion: try going the modular path for xeno_16550A first, it's the more common one. Above /should/ be no problem /wrt the the RT driver, but kicking 8250 out of the game could cause that PnP power issue I sketched.

Quoted 1 line

I got these settings from setserial prior to disabling the

kernel-driver.

Quoted 42 lines

To

Quoted 1 line
Quoted 1 line

be honest i don't know how to 'check' /proc/xenomai/irq for progress. I

took

Quoted 1 line
Quoted 1 line

a look at the folder prior to and while running my modified

cross-link-code

Quoted 1 line
Quoted 1 line

but irq is an empty file in both cases. Is there some special

trick/function

Quoted 35 lines
Quoted 1 line

to handle the files in the proc-folder?

You mean the file is existing but empty??? That would be fairly uncommon.

(without any driver loaded)

# cat /proc/xenomai/irq
IRQ         CPU0
217:           0
226:           0         [virtual]

The serial driver pops up here once the port is opened. The per-cpu irq hit counter should then increase as interrupts come in.

Quoted 1 line

To the last point.. so there is an updated version of the driver

available?

Quoted 1 line

I think i will try that one.. is it just a question of executing 'make'

and

Quoted 1 line

modprobing or are there more actions involved?

No, it's not that easy (more files, changed Makefiles and RTDM API). First try the modular driver path, ie. keep 8250, switch off the Linux port with setserial, and load the RT driver as a module. Then, if this doesn't help, you could consider upgrading your Xenomai installation (at least for a test) to SVN trunk.

Jan

Ah, ok.. ehem... i tried to look at the file with gedit.. and it displays nothing.. ;)
Now i get:

IRQ CPU0

  4:           0         rtser0
216:         521         [timer]
226:         620         [virtual]

This is how it looks like after the program starts.. after that it

increases

Quoted 1 line
Quoted 1 line

just the [virtual] and the [timer] counter . Rtser0 stays at 0 all the

time

Quoted 1 line
Quoted 1 line

(although information is successfully written to the port, judging from

the

Quoted 2 lines
Quoted 2 lines

return value of rt_dev_write).

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

So i guess that is where the problem lies.. what can I do about that?

Apply the other suggestion I made. You may try to talk to a dead device if 8250 is not loaded and takes over the PnP work.

Jan

I already tried my luck with a modular driver.. does not work either..

:-/

Quoted 5 lines

Now i compiled a new 2.6.20-kernel with xenomai-trunk. I tried to modprobe as usual:
modprobe xeno_16550A ioaddr=0x3f8 irq=4
but somehow the 'ioaddr'-parameter is not accepted by the module.. did something change there?

Yep, it has been refactored to "io=" (like other Xenomai drivers).

Jan

author
#8 lore raw

Re: [Xenomai-help] Serial Port Driver(rtser): NoRTSER_RTIOC_WAIT_EVENT

Quoted 37 lines · Jonas Witt
Quoted 7 lines · Jonas Witt
Quoted 6 lines · Jonas Witt
Quoted 5 lines · Jonas Witt
Quoted 5 lines

Hi everybody,

i am having a problem with the serial port driver in xenomai for a

while

Quoted 28 lines
Quoted 28 lines
Quoted 11 lines
Quoted 11 lines

now..

I have tried different programs like
http://www.captain.at/xenomai-serial-port-example.php

I have also changed the code of cross-link.c to use the same port for writing and reading (as i only have one serial port in my computer).

Opening

Quoted 1 line
Quoted 1 line

a port and writing the configuration seems to work form e.. also

writing.

Quoted 10 lines
Quoted 10 lines

The Problem stems from the call to:

rt_dev_ioctl(read_fd, RTSER_RTIOC_WAIT_EVENT, &rx_event);

which keeps waiting forever and never receives an interrupt. I tried a self-made loopback-adapter and a sensor with a serial interface (so at

least

Quoted 1 line
Quoted 1 line

_something_ should come back). Nothing worked. The serial port is

working

Quoted 1 line
Quoted 1 line

fine with the linux-driver, though. I already figured that the calls

to

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

rt_dev_write do not work from non-xenomai-tasks (which should really

be

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 2 lines

emphasized in the documentation..)

Some suggestions:

o check the hardware configuration (ie. the module parameters of xeno_16550A) twice, you can easily get them wrong

o check /proc/xenomai/irq for any progress on transmission as well as on reception. If there is nothing happen on tx, the IRQ number may

be

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

wrong, if there is nothing on rx, your port configuration might be broken.

o try the driver from trunk, it can handle PnP-related issues

(hardware

Quoted 12 lines
Quoted 12 lines
Quoted 9 lines
Quoted 9 lines

gets powered off when Linux driver is removed)

Jan

Thanks for the fast reply!

I am using the following kernel parameters:

kernel /boot/vmlinuz-2.6.19-ipipe root=/dev/sda1 ro

8250.nr_uarts=0

Quoted 2 lines
Quoted 2 lines

xeno_16550A.ioaddr=0x3f8 xeno_16550A.irq=4

Quoted 16 lines
Quoted 6 lines
Quoted 6 lines

OK, that leads to another suggestion: try going the modular path for xeno_16550A first, it's the more common one. Above /should/ be no problem /wrt the the RT driver, but kicking 8250 out of the game could cause that PnP power issue I sketched.

Quoted 1 line

I got these settings from setserial prior to disabling the

kernel-driver.

Quoted 9 lines

To

Quoted 1 line
Quoted 1 line

be honest i don't know how to 'check' /proc/xenomai/irq for progress. I

took

Quoted 1 line
Quoted 1 line

a look at the folder prior to and while running my modified

cross-link-code

Quoted 1 line
Quoted 1 line

but irq is an empty file in both cases. Is there some special

trick/function

Quoted 2 lines
Quoted 1 line

to handle the files in the proc-folder?

You mean the file is existing but empty??? That would be fairly

uncommon.

Quoted 21 lines
Quoted 21 lines
Quoted 21 lines

(without any driver loaded)

# cat /proc/xenomai/irq
IRQ         CPU0
217:           0
226:           0         [virtual]

The serial driver pops up here once the port is opened. The per-cpu irq hit counter should then increase as interrupts come in.

Quoted 1 line

To the last point.. so there is an updated version of the driver

available?

Quoted 1 line

I think i will try that one.. is it just a question of executing 'make'

and

Quoted 1 line

modprobing or are there more actions involved?

No, it's not that easy (more files, changed Makefiles and RTDM API). First try the modular driver path, ie. keep 8250, switch off the Linux port with setserial, and load the RT driver as a module. Then, if this doesn't help, you could consider upgrading your Xenomai installation (at least for a test) to SVN trunk.

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Jan

Ah, ok.. ehem... i tried to look at the file with gedit.. and it

displays

Quoted 20 lines
Quoted 9 lines
Quoted 9 lines

nothing.. ;)
Now i get:

IRQ CPU0

  4:           0         rtser0
216:         521         [timer]
226:         620         [virtual]

This is how it looks like after the program starts.. after that it

increases

Quoted 1 line
Quoted 1 line

just the [virtual] and the [timer] counter . Rtser0 stays at 0 all the

time

Quoted 1 line
Quoted 1 line

(although information is successfully written to the port, judging from

the

Quoted 6 lines
Quoted 3 lines

return value of rt_dev_write).

So i guess that is where the problem lies.. what can I do about that?

Apply the other suggestion I made. You may try to talk to a dead device if 8250 is not loaded and takes over the PnP work.

Quoted 8 lines
Quoted 4 lines

Jan

I already tried my luck with a modular driver.. does not work either..

:-/

Quoted 1 line

Now i compiled a new 2.6.20-kernel with xenomai-trunk. I tried to

modprobe

Quoted 8 lines
Quoted 4 lines

as usual:
modprobe xeno_16550A ioaddr=0x3f8 irq=4
but somehow the 'ioaddr'-parameter is not accepted by the module.. did something change there?

Yep, it has been refactored to "io=" (like other Xenomai drivers).

Jan

Sorry.. i drew a wrong conclusion.. actually changing to a modular serial driver and deactivating the kernel-driver with setserial does change the situation in /proc/xenomai/irq: now the rtser0 entry is counted upwards, too. Anyway this does not change the situation with my modified cross-link program (that's where i drew the wrong conclusion, since i tested with a modular serial driver before).

Anyway.. i am going to try the latest driver-version now. With the new infos, is there another thing i can check?

Jonas

author
#9 lore raw

Re: [Xenomai-help] Serial Port Driver(rtser):NoRTSER_RTIOC_WAIT_EVENT

Quoted 37 lines · Jonas Witt
Quoted 7 lines · Jonas Witt
Quoted 6 lines · Jonas Witt
Quoted 5 lines · Jonas Witt
Quoted 5 lines

Hi everybody,

i am having a problem with the serial port driver in xenomai for a

while

Quoted 28 lines
Quoted 28 lines
Quoted 11 lines
Quoted 11 lines

now..

I have tried different programs like
http://www.captain.at/xenomai-serial-port-example.php

I have also changed the code of cross-link.c to use the same port for writing and reading (as i only have one serial port in my computer).

Opening

Quoted 1 line
Quoted 1 line

a port and writing the configuration seems to work form e.. also

writing.

Quoted 10 lines
Quoted 10 lines

The Problem stems from the call to:

rt_dev_ioctl(read_fd, RTSER_RTIOC_WAIT_EVENT, &rx_event);

which keeps waiting forever and never receives an interrupt. I tried a self-made loopback-adapter and a sensor with a serial interface (so at

least

Quoted 1 line
Quoted 1 line

_something_ should come back). Nothing worked. The serial port is

working

Quoted 1 line
Quoted 1 line

fine with the linux-driver, though. I already figured that the calls

to

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

rt_dev_write do not work from non-xenomai-tasks (which should really

be

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 2 lines

emphasized in the documentation..)

Some suggestions:

o check the hardware configuration (ie. the module parameters of xeno_16550A) twice, you can easily get them wrong

o check /proc/xenomai/irq for any progress on transmission as well as on reception. If there is nothing happen on tx, the IRQ number may

be

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

wrong, if there is nothing on rx, your port configuration might be broken.

o try the driver from trunk, it can handle PnP-related issues

(hardware

Quoted 12 lines
Quoted 12 lines
Quoted 9 lines
Quoted 9 lines

gets powered off when Linux driver is removed)

Jan

Thanks for the fast reply!

I am using the following kernel parameters:

kernel /boot/vmlinuz-2.6.19-ipipe root=/dev/sda1 ro

8250.nr_uarts=0

Quoted 2 lines
Quoted 2 lines

xeno_16550A.ioaddr=0x3f8 xeno_16550A.irq=4

Quoted 16 lines
Quoted 6 lines
Quoted 6 lines

OK, that leads to another suggestion: try going the modular path for xeno_16550A first, it's the more common one. Above /should/ be no problem /wrt the the RT driver, but kicking 8250 out of the game could cause that PnP power issue I sketched.

Quoted 1 line

I got these settings from setserial prior to disabling the

kernel-driver.

Quoted 9 lines

To

Quoted 1 line
Quoted 1 line

be honest i don't know how to 'check' /proc/xenomai/irq for progress. I

took

Quoted 1 line
Quoted 1 line

a look at the folder prior to and while running my modified

cross-link-code

Quoted 1 line
Quoted 1 line

but irq is an empty file in both cases. Is there some special

trick/function

Quoted 2 lines
Quoted 1 line

to handle the files in the proc-folder?

You mean the file is existing but empty??? That would be fairly

uncommon.

Quoted 21 lines
Quoted 21 lines
Quoted 21 lines

(without any driver loaded)

# cat /proc/xenomai/irq
IRQ         CPU0
217:           0
226:           0         [virtual]

The serial driver pops up here once the port is opened. The per-cpu irq hit counter should then increase as interrupts come in.

Quoted 1 line

To the last point.. so there is an updated version of the driver

available?

Quoted 1 line

I think i will try that one.. is it just a question of executing 'make'

and

Quoted 1 line

modprobing or are there more actions involved?

No, it's not that easy (more files, changed Makefiles and RTDM API). First try the modular driver path, ie. keep 8250, switch off the Linux port with setserial, and load the RT driver as a module. Then, if this doesn't help, you could consider upgrading your Xenomai installation (at least for a test) to SVN trunk.

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Jan

Ah, ok.. ehem... i tried to look at the file with gedit.. and it

displays

Quoted 20 lines
Quoted 9 lines
Quoted 9 lines

nothing.. ;)
Now i get:

IRQ CPU0

  4:           0         rtser0
216:         521         [timer]
226:         620         [virtual]

This is how it looks like after the program starts.. after that it

increases

Quoted 1 line
Quoted 1 line

just the [virtual] and the [timer] counter . Rtser0 stays at 0 all the

time

Quoted 1 line
Quoted 1 line

(although information is successfully written to the port, judging from

the

Quoted 6 lines
Quoted 3 lines

return value of rt_dev_write).

So i guess that is where the problem lies.. what can I do about that?

Apply the other suggestion I made. You may try to talk to a dead device if 8250 is not loaded and takes over the PnP work.

Quoted 8 lines
Quoted 4 lines

Jan

I already tried my luck with a modular driver.. does not work either..

:-/

Quoted 1 line

Now i compiled a new 2.6.20-kernel with xenomai-trunk. I tried to

modprobe

Quoted 8 lines
Quoted 4 lines

as usual:
modprobe xeno_16550A ioaddr=0x3f8 irq=4
but somehow the 'ioaddr'-parameter is not accepted by the module.. did something change there?

Yep, it has been refactored to "io=" (like other Xenomai drivers).

Jan

Sorry.. i drew a wrong conclusion.. actually changing to a modular serial driver and deactivating the kernel-driver with setserial does change the situation in /proc/xenomai/irq: now the rtser0 entry is counted upwards, too. Anyway this does not change the situation with my modified cross-link program (that's where i drew the wrong conclusion, since i tested with a modular serial driver before).

Anyway.. i am going to try the latest driver-version now. With the new infos, is there another thing i can check?

Jonas

Update:
With the Xenomai-trunk version it's the exact same picture. By the way.. i don't know if this is of importance, but during the systemstart i get this message:
MP-BIOS bug: 8254 timer not connected to IO-APIC

Jonas
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help