Hi , I'm trying to use the comport external in Linux and I'm finding it is quite slow. If I send 2 or 3 consecutive characters they have to be separated by about 3 msecs each using the delay object otherwise I get the message that says "Write error, maybe TX-OVERRUNS on serial line" . I want to run a fair bit of data out of the serial port so I'm using 115.2 kbaud. Could the problem be that I'm using a serial port via a USB to serial converter? Thanks. jim
Hi , I'm trying to use the comport external in Linux and I'm finding it is quite slow. If I send 2 or 3 consecutive characters they have to be separated by about 3 msecs each using the delay object otherwise I get the message that says "Write error, maybe TX-OVERRUNS on serial line" . I want to run a fair bit of data out of the serial port so I'm using 115.2 kbaud. Could the problem be that I'm using a serial port via a USB to serial converter? Thanks.
which converter you use ?
I just play with 115.2 kbaud over the comport on linux without problems... limit to 90% to 10Kbyte/sec which is 100kbaud plus some overhead ... I use debian and the standard serial output.
maybe you post us the configuration, to know more.
mfg winfried
Thanks Winfried, I'm using a Keyspan USA-19QW usb to serial interface. Below is a simple patch I'm using for testing. If I set the metro that sends 100 to the serial port to anything below 3 I get Write errors. This corresponds to about 333 bytes per second. Any thoughts on how I can improve the performance? Thanks, Jim
#N canvas 0 0 450 300 10; #X floatatom 113 159 4 0 0 0 - - -; #X obj 335 169 s comctl; #X msg 359 122 open 1; #X msg 324 71 devicename /dev/ttyUSB0; #X msg 88 82 100; #X obj 92 12 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X obj 91 191 print; #X obj 93 36 metro 2; #X obj 89 120 comport 1 115200; #X msg 354 98 close; #X connect 2 0 1 0; #X connect 3 0 1 0; #X connect 4 0 8 0; #X connect 5 0 7 0; #X connect 7 0 4 0; #X connect 8 0 0 0; #X connect 8 0 6 0; #X connect 9 0 1 0;
Hi , I'm trying to use the comport external in Linux and I'm finding it is quite slow. If I send 2 or 3 consecutive characters they have to be separated by about 3 msecs each using the delay object otherwise I get the message that says "Write error, maybe TX-OVERRUNS on serial line" . I want to run a fair bit of data out of the serial port so I'm using 115.2 kbaud. Could the problem be that I'm using a serial port via a USB to serial converter? Thanks.
which converter you use ?
I just play with 115.2 kbaud over the comport on linux without problems... limit to 90% to 10Kbyte/sec which is 100kbaud plus some overhead ... I use debian and the standard serial output.
maybe you post us the configuration, to know more.
mfg winfried
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://iem.at/cgi-bin/mailman/listinfo/pd-list
Hello,
#N canvas 0 0 450 300 10; #X floatatom 113 159 4 0 0 0 - - -; #X obj 335 169 s comctl; #X msg 359 122 open 1; #X msg 324 71 devicename /dev/ttyUSB0; #X msg 88 82 100; #X obj 92 12 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X obj 91 191 print; #X obj 93 36 metro 2; #X obj 89 120 comport 1 115200; #X msg 354 98 close; #X connect 2 0 1 0; #X connect 3 0 1 0; #X connect 4 0 8 0; #X connect 5 0 7 0; #X connect 7 0 4 0; #X connect 8 0 0 0; #X connect 8 0 6 0; #X connect 9 0 1 0;
here the "r comctl" object is missing, being connectied to comport in. you dont sent anything to the serial, so it is opened with default parameters which I think is not /dev/ttyUSB0 is not used anyhow the device I think /dev/ttyS1.
but maybe this is not the failure.
mfg winfried
Sorry Winfried, The r comctl was there before so thats not the problem. Still trying to figure this out. One thing I noticed in writing a python script is that If I send a string of charcters ie. write("abc") I don't get any errors but if I try to send
write("a") write("b") write("c")
I also get a resource not available error which is probably what happens when I continually bang a value into the comport object. jim
Hello,
#N canvas 0 0 450 300 10; #X floatatom 113 159 4 0 0 0 - - -; #X obj 335 169 s comctl; #X msg 359 122 open 1; #X msg 324 71 devicename /dev/ttyUSB0; #X msg 88 82 100; #X obj 92 12 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X obj 91 191 print; #X obj 93 36 metro 2; #X obj 89 120 comport 1 115200; #X msg 354 98 close; #X connect 2 0 1 0; #X connect 3 0 1 0; #X connect 4 0 8 0; #X connect 5 0 7 0; #X connect 7 0 4 0; #X connect 8 0 0 0; #X connect 8 0 6 0; #X connect 9 0 1 0;
here the "r comctl" object is missing, being connectied to comport in. you dont sent anything to the serial, so it is opened with default parameters which I think is not /dev/ttyUSB0 is not used anyhow the device I think /dev/ttyS1.
but maybe this is not the failure.
mfg winfried
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://iem.at/cgi-bin/mailman/listinfo/pd-list
I tried comport under windows and get much better performance. For example in windows I can string a number of values together in a message and send it to comport. ie val1, val2, val3 . In Linux when I do this I get "Write error, maybe TX-OVERRUNS on serial line" I also tried the Linux comport object with another usb to serial adapter (prolific 2303) and get the same results? Any thoughts on this? jim
I'm trying to use the comport external in Linux and I'm finding it is quite slow. If I send 2 or 3 consecutive characters they have to be separated by about 3 msecs each using the delay object otherwise I get the message that says "Write error, maybe TX-OVERRUNS on serial line" . I want to run a fair bit of data out of the serial port so I'm using 115.2 kbaud. Could the problem be that I'm using a serial port via a USB to serial converter? Thanks.
which converter you use ?
I just play with 115.2 kbaud over the comport on linux without problems... limit to 90% to 10Kbyte/sec which is 100kbaud plus some overhead ... I use debian and the standard serial output.
maybe you post us the configuration, to know more.
mfg winfried
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://iem.at/cgi-bin/mailman/listinfo/pd-list
On Mon, 4 Oct 2004, jim ruxton wrote:
I tried comport under windows and get much better performance. For example in windows I can string a number of values together in a message and send it to comport. ie val1, val2, val3 . In Linux when I do this I get "Write error, maybe TX-OVERRUNS on serial line" I also tried the Linux comport object with another usb to serial adapter (prolific 2303) and get the same results? Any thoughts on this?
If you use a 115_200 bauds serial line then you should make sure that you are not sending more than 15 kbytes each second. A USB connection works at 10_000_000 bauds, which causes either overruns or CTS/RTS flowcontrol depending on whether the converter supports the latter and whether it´s enabled. I don´t know anything at all about those converters, i´m guessing using my knowledge of RS232.
Matsjö Buschahr @ Medien.kunstLabor.AT, Graz, Österreich http://convention.puredata.info/ http://artengine.ca/matju
Thanks Matju,
Right now I'm only getting about 330 bytes/sec so I'm way below 15 Kbytes per sec. jim
On Mon, 4 Oct 2004, jim ruxton wrote:
I tried comport under windows and get much better performance. For example in windows I can string a number of values together in a message and send it to comport. ie val1, val2, val3 . In Linux when I do this I get "Write error, maybe TX-OVERRUNS on serial line" I also tried the Linux comport object with another usb to serial adapter (prolific 2303) and get the same results? Any thoughts on this?
If you use a 115_200 bauds serial line then you should make sure that you are not sending more than 15 kbytes each second. A USB connection works at 10_000_000 bauds, which causes either overruns or CTS/RTS flowcontrol depending on whether the converter supports the latter and whether it´s enabled. I don´t know anything at all about those converters, i´m guessing using my knowledge of RS232.
Matsjö Buschahr @ Medien.kunstLabor.AT, Graz, Österreich http://convention.puredata.info/ http://artengine.ca/matju
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://iem.at/cgi-bin/mailman/listinfo/pd-list
On Tue, 5 Oct 2004, jim ruxton wrote:
Right now I'm only getting about 330 bytes/sec so I'm way below 15 Kbytes per sec.
ok. now i don't know what kind of FIFO ("ring buffer") it has but the classic RS232 chips (UART 16450...) have a 14-byte or 16-byte limit. Maybe current ones have bigger buffers, but if you send one big burst of 330 bytes every sec and the buffer is 256 bytes it will blow up; whereas if the 330 bytes are well spread over each sec it will flow alright.
Matsjö Buschahr @ Medien.kunstLabor.AT, Graz, Österreich http://convention.puredata.info/ http://artengine.ca/matju