How do I set non-standard baud rate in Linux

I have a Windows program written in C# that I've ported to Mono on Linux.  It uses serial communication to a CP210x Serial to USB device (/dev/ttyUSB0).  It works fine on Windows at 128000, 127117, and 125000 baud rates, but fails at 115200.  However, when I run it on Linux, Linux will only accept 115200 as the closest value to the above and the data is corrupt.

I need a solution that I can use in C# or the command line.  A C based solution would be workable as a separate executable, but I don't really know how  to write it so would need a lot of details there.  This needs to work on openSUSE, RHEL5, and Debian.

My question is this, how do I change the /dev/ttyUSB0 baud rate on Linux to one of the higher values mentioned above?
StarDusterIIAsked:
Who is Participating?
 
Duncan RoeSoftware DeveloperCommented:
The parentheses surround the argument list to functions. Also parentheses can be used in the conventional mathematical way.
TIOGSERIAL error is very serious. It means that the program can't even read the characteristics of the serial line, let alone change them. So it will make no difference what baud rate you specify - it has already obeyed the exit at line 40 ("echo $?" at the shell prompt would have shown you 3 - try that if you like).
Anyway, I changed the program to open ttyS0 and it worked perfectly (see below).
"stty -F /dev/ttyUSB0 -a" should work for you too - otherwise there is something wrong with /dev/ttyUSB0.
HOWEVER, does your mono program actually work for 115200? If so, you need to find out what ioctl calls it is making. Try this:-

strace -etrace=ioctl,open <your mono program> 115200

You may see a lot of uninteresting open calls before USB0, rather more than in the sample below
07:51:32# rcsdiff ee60.c
===================================================================
RCS file: RCS/ee60.c,v
retrieving revision 1.2
diff -r1.2 ee60.c
18c18
<  int ser_dev = open ("/dev/ttyUSB0", O_RDWR);
---
>  int ser_dev = open ("/dev/ttyS0", O_RDWR);
07:51:39# ./ee60 9600
Baud base 115200, wanted baud rate 9600, remainder 0
07:51:47# stty -F /dev/ttyS0 -a
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>;
swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;
flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc
-ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl
echoke
07:51:55# 
07:51:55# 
07:51:55# 
07:51:55# strace -etrace=ioctl,open ./ee60 9600
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib/libc.so.6", O_RDONLY)        = 3
open("/dev/ttyS0", O_RDWR)              = 3
ioctl(3, TIOCGSERIAL, 0xbfc5539c)       = 0
Baud base 115200, wanted baud rate 9600, remainder 0
ioctl(3, TIOCSSERIAL, 0xbfc5539c)       = 0
08:02:45# 

Open in new window

0
 
japeteCommented:
Did you try: stty -F /dev/ttyUSB0 128000?
0
 
HappyCactusCommented:
It seems that you must use a IOCTL, since stty (and the library call counterpart, termios &co.) do not allow (for portability issues) nonstandard baudrates.

CUST_BAUD_RATE should be your requested baudrate (128000).

struct serial_struct ser_info; 
ioctl(ser_dev, TIOCGSERIAL, &ser_info); 
ser_info.flags = ASYNC_SPD_CUST | ASYNC_LOW_LATENCY; 
ser_info.custom_divisor = ser_info.baud_base / CUST_BAUD_RATE; 
ioctl(ser_dev, TIOCSSERIAL, &ser_info);

Open in new window

0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Duncan RoeSoftware DeveloperCommented:
From the command line, you might try the command below (you may need to be root):-
stty -F /dev/ttyUSB0 -baud_base 128000

Open in new window

0
 
StarDusterIIAuthor Commented:
stty was the obvious choice but as HappyCactus says, it doesn't allow for non-standard baud rates.  

stty -F /dev/ttyUSB0 128000 gives Invalid Argument
stty -F /dev/ttyUSB0 -baud_base 128000 gives Invalid Argument -baud_base 128000

I have seen the results on the web that HappyCactus suggests, but I'm at a loss as to what to do with the information... where does the struct go, how is it used, etc.  As I said in the original post, I need a lot of details there.
0
 
Duncan RoeSoftware DeveloperCommented:
My bad - miss out the hyphen

stty -F /dev/ttyUSB0 baud_base 128000

While you are at the command line, type "man setserial" to see more documentation for the command
0
 
Duncan RoeSoftware DeveloperCommented:
My worse - wrong command

setserial /dev/ttyUSB0 baud_base 128000

"man setserial" for the works
0
 
StarDusterIIAuthor Commented:
Should have mentioned this in my last post... I had tried setserial with baud_base and setserial only works for /dev/ttyS* devices, not ttyUSB*.
0
 
HappyCactusCommented:
Sure, because setserial was created for 16*50 chipset, that are ISA/EISA/PCI compatible.
You must compile and run a program that do that ioctl. Alas I have not a linux right now to help you, but it's not difficult to do it, if you have any C experience. open() the file "/dev/ttyUSB0" with F_RDWR flags, make the ioctl calls I posted before, close the handle. It should work.


#include <ioctl.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int main() 
{

 int ser_dev = open ("/dev/ttyUSB0", F_RDWR);
 if (-1 == ser_dev) {
   perror("open");
   return -1;
 }

 struct serial_struct ser_info; 
 if (ioctl(ser_dev, TIOCGSERIAL, &ser_info) < 0) {
  perror ("TIOCGSERIAL");
  return -1;
 }
 ser_info.flags = ASYNC_SPD_CUST | ASYNC_LOW_LATENCY; 
 ser_info.custom_divisor = ser_info.baud_base / CUST_BAUD_RATE; 
 if (ioctl(ser_dev, TIOCSSERIAL, &ser_info) < 0) {
  perror ("TIOCSSERIAL");
  return -1;
 }

 close (ser_dev);
 return 0;
}

Open in new window

0
 
HappyCactusCommented:
... may be I missed some #include ...

#include

... for example...
0
 
StarDusterIIAuthor Commented:
I'll give it a go and let you know.  Many thanks!

sr
0
 
StarDusterIIAuthor Commented:
Wow... That was interesting... I managed to get F_RDWR defined but having problems with the rest.

ttyUSB.c: In function ‘main’:
ttyUSB.c:22: error: storage size of ‘ser_info’ isn’t known
ttyUSB.c:23: error: ‘TIOCGSERIAL’ undeclared (first use in this function)
ttyUSB.c:23: error: (Each undeclared identifier is reported only once
ttyUSB.c:23: error: for each function it appears in.)
ttyUSB.c:27: error: ‘ASYNC_SPD_CUST’ undeclared (first use in this function)
ttyUSB.c:27: error: ‘ASYNC_LOW_LATENCY’ undeclared (first use in this function)
ttyUSB.c:29: error: ‘TIOCSSERIAL’ undeclared (first use in this function)
0
 
HappyCactusCommented:
TIOCGSERIAL is defined in "linux/include/asm-arm/ioctls.h"
ASYNC_SPD_CUST is defined in "include/linux/serial.h"
0
 
Duncan RoeSoftware DeveloperCommented:
This compiles clean for me, after I accepted CUST_BAUD_RATE from the command line. HappyCactus  - is that what you intended? If the integral division is not exact, you will likely have problems, so I inserted a printf.
I think you need O_RDWR, not F_RDWR. See "man open".
08:26:39$ cat ee60.c
/*
gcc -g3 -ggdb -Wall -Wmissing-prototypes -Wmissing-prototypes ee60.c -o ee60
*/
#include <sys/ioctl.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <linux/serial.h>


int main(int argc, char**argv) 
{

 int CUST_BAUD_RATE;
 int ser_dev = open ("/dev/ttyUSB0", O_RDWR);
 if (-1 == ser_dev) {
   perror("open");
   return -1;
 }
 
 if (argc != 2)
 {
  fprintf(stderr, "Usage: %s <baudrate>\n", argv[0]);
  return 1;
 }
 
 if (sscanf(argv[1], "%d", &CUST_BAUD_RATE) != 1)
 {
  fprintf(stderr, "Unable to convert decimal number \"%s\" to an integer\n", argv[1]);
  return 2;
 }

 struct serial_struct ser_info; 
 if (ioctl(ser_dev, TIOCGSERIAL, &ser_info) < 0) {
  perror ("TIOCGSERIAL");
  return 3;
 }
 
 printf("Baud base %d, wanted baud rate %d, remainder %d\n", ser_info.baud_base,
  CUST_BAUD_RATE, ser_info.baud_base % CUST_BAUD_RATE);
  
 ser_info.flags = ASYNC_SPD_CUST | ASYNC_LOW_LATENCY; 
 ser_info.custom_divisor = ser_info.baud_base / CUST_BAUD_RATE; 
 if (ioctl(ser_dev, TIOCSSERIAL, &ser_info) < 0) {
  perror ("TIOCSSERIAL");
  return 4;
 }

 close (ser_dev);
 return 0;
}
08:26:47$ gcc -g3 -ggdb -Wall -Wmissing-prototypes -Wmissing-prototypes ee60.c -o ee60
08:26:49$ 

Open in new window

0
 
HappyCactusCommented:
Yes, it's that. Sorry but I hadn't the time to check or compile my listing.
0
 
StarDusterIIAuthor Commented:
Duncan, many thanks for the example, that compiled fine.  I tried ./ee60 125000,  ./ee60 128000,  ./ee60 127117 and all gave me:

TIOCGSERIAL: Invalid argument

I'm assuming that's a bad thing!  ;-)   Anyway, I tried baud rates I knew were valid (1200, 9600...) and it still gives the invalid argument error.

BTW, I've never used C on Linux, what do the parameters mean?

I really appreciate your extra effort.

sr
0
 
StarDusterIIAuthor Commented:
The Mono program sort of works.  I get data consistently, but it's like it's missing the sign bit.  When I press a key on the wireless remote, the data is invalid but consistent...

pressing button 1 gives

Linux      Windows (correct values)
0 - 255   255
1 - 186   90
2 - 133   5
3 - 213   184
4 - 128   0
5 - 130   2
6 - 128   0
7 - 145   17 <- num press = this value - 16

Pressing button 2
Linux      Windows (correct values)
0 - 255   255
1 - 186   90
2 - 133   5
3 - 213   184
4 - 128   0
5 - 130   2
6 - 128   0
7 - 146   18 <- num press = this value - 16



linux-nsxk:/usr/src/Utility # stty -F /dev/ttyUSB0 -a
speed 115200 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>;
start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke


linux-nsxk:/usr/src/Utility # strace -etrace=ioctl,open ./ee60 124000
open("/usr/lib64/mpi/gcc/openmpi/lib64/tls/x86_64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/x86_64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib64/libc.so.6", O_RDONLY)      = 3
open("/dev/ttyUSB0", O_RDWR)            = 3
ioctl(3, TIOCGSERIAL, 0x7fffcd8525e0)   = -1 EINVAL (Invalid argument)
TIOCGSERIAL: Invalid argument

Here's the output from "strace -etrace=ioctl,open mono test.exe 115200"... It cut off the first part but maybe you'll see something.


open("./libX11.so.6.so", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libX11.so.6.so.la", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libX11.so.6.so.la", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libX11.so.6.so.la", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libX11.so.6.so.la", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libX11.so.6.so.la", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libgdiplus.dll.so.la", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/gdiplus.dll", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("gdiplus.dll.la", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libX11.so.6.so.la", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libX11.so.6.so.la", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libX11.so.6.so.la", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libX11.so.6.so.la", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libX11.so.6.so.la", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libX11.so.6.so.la", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libX11.so.6.so.la", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libX11.so.6.so.la", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libX11.so.6.so.la", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libX11.so.6.so.la", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libX11.so.6.so.la", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libX11.so.6.so.la", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libX11.so.6.so.la", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libX11.so.6.so.la", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libgdiplus.dll.so.la", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/gdiplus.dll", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("gdiplus.dll.la", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libgdiplus.dll.so.la", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/gdiplus.dll", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("gdiplus.dll.la", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libgdiplus.dll.so.la", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/gdiplus.dll", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("gdiplus.dll.la", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libgdiplus.dll.so.la", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/gdiplus.dll", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("gdiplus.dll.la", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libgdiplus.dll.so.la", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/gdiplus.dll", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("gdiplus.dll.la", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libgdiplus.dll.so.la", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/gdiplus.dll", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("gdiplus.dll.la", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libgdiplus.dll.so.la", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/gdiplus.dll", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("gdiplus.dll.la", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libgdiplus.dll.so.la", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/gdiplus.dll", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("gdiplus.dll.la", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libgdiplus.dll.so.la", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/gdiplus.dll", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("gdiplus.dll.la", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libgdiplus.dll.so.la", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/gdiplus.dll", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("gdiplus.dll.la", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libgdiplus.dll.so.la", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/gdiplus.dll", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("gdiplus.dll.la", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libX11.so.6.so.la", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libX11.so.6.so.la", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libgdiplus.dll.so.la", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/gdiplus.dll", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("gdiplus.dll.la", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libgdiplus.dll.so.la", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/gdiplus.dll", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("gdiplus.dll.la", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libX11.so.6.so.la", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libX11.so.6.so.la", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libX11.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libX11.so.6.so.la", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("./libX11.so.6.so.la", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libgdiplus.dll.so.la", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/gdiplus.dll", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("gdiplus.dll.la", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libgdiplus.dll.so.la", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/gdiplus.dll", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("gdiplus.dll.la", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdi32.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdi32.so", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdi32.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libgdi32.so.la", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("./libgdi32.so", O_RDONLY)         = -1 ENOENT (No such file or directory)
open("./libgdi32.so.la", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/gdi32", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/gdi32", O_RDONLY)          = -1 ENOENT (No such file or directory)
open("/usr/lib64/gdi32", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("gdi32.la", O_RDONLY)              = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdi32.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdi32.so", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdi32.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libgdi32.so.la", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("./libgdi32.so", O_RDONLY)         = -1 ENOENT (No such file or directory)
open("./libgdi32.so.la", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdi32", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdi32", O_RDONLY)       = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdi32", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("libgdi32.la", O_RDONLY)           = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdi32.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdi32.so", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdi32.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libgdi32.so.la", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("./libgdi32.so", O_RDONLY)         = -1 ENOENT (No such file or directory)
open("./libgdi32.so.la", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/gdi32", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/gdi32", O_RDONLY)          = -1 ENOENT (No such file or directory)
open("/usr/lib64/gdi32", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("gdi32.la", O_RDONLY)              = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdi32.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdi32.so", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdi32.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libgdi32.so.la", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("./libgdi32.so", O_RDONLY)         = -1 ENOENT (No such file or directory)
open("./libgdi32.so.la", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdi32", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdi32", O_RDONLY)       = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdi32", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("libgdi32.la", O_RDONLY)           = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdi32.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdi32.so", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdi32.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libgdi32.so.la", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("./libgdi32.so", O_RDONLY)         = -1 ENOENT (No such file or directory)
open("./libgdi32.so.la", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/gdi32", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/gdi32", O_RDONLY)          = -1 ENOENT (No such file or directory)
open("/usr/lib64/gdi32", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("gdi32.la", O_RDONLY)              = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdi32.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdi32.so", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdi32.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libgdi32.so.la", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("./libgdi32.so", O_RDONLY)         = -1 ENOENT (No such file or directory)
open("./libgdi32.so.la", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdi32", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdi32", O_RDONLY)       = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdi32", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("libgdi32.la", O_RDONLY)           = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdi32.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdi32.so", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdi32.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libgdi32.so.la", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("./libgdi32.so", O_RDONLY)         = -1 ENOENT (No such file or directory)
open("./libgdi32.so.la", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/gdi32", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/gdi32", O_RDONLY)          = -1 ENOENT (No such file or directory)
open("/usr/lib64/gdi32", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("gdi32.la", O_RDONLY)              = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdi32.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdi32.so", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdi32.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libgdi32.so.la", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("./libgdi32.so", O_RDONLY)         = -1 ENOENT (No such file or directory)
open("./libgdi32.so.la", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdi32", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdi32", O_RDONLY)       = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdi32", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("libgdi32.la", O_RDONLY)           = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libgdiplus.dll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libgdiplus.dll.so.la", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("./libgdiplus.dll.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/gdiplus.dll", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib64/gdiplus.dll", O_RDONLY) = -1 ENOENT (No such file or directory)
open("gdiplus.dll.la", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libc.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libc.so.6.so", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib64/libc.so.6.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libc.so.6.so.la", O_RDONLY)       = -1 ENOENT (No such file or directory)
open("./libc.so.6.so", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("./libc.so.6.so.la", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libMonoPosixHelper.so.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libMonoPosixHelper.so.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libMonoPosixHelper.so.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libMonoPosixHelper.so.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("./libMonoPosixHelper.so.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("./libMonoPosixHelper.so.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libMonoPosixHelper.so.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libMonoPosixHelper.so.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libMonoPosixHelper.so.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libMonoPosixHelper.so.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("./libMonoPosixHelper.so.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("./libMonoPosixHelper.so.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libMonoPosixHelper.so.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libMonoPosixHelper.so.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libMonoPosixHelper.so.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libMonoPosixHelper.so.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("./libMonoPosixHelper.so.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("./libMonoPosixHelper.so.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libMonoPosixHelper.so.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
open("/lib64/libMonoPosixHelper.so.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libMonoPosixHelper.so.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libMonoPosixHelper.so.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
open("./libMonoPosixHelper.so.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("./libMonoPosixHelper.so.so.la", O_RDONLY) = -1 ENOENT (No such file or directory)
--- SIGPWR (Power failure) @ 0 (0) ---
--- SIGXCPU (CPU time limit exceeded) @ 0 (0) ---
0
 
HappyCactusCommented:
Ok, I think the problem is that the usb driver for your chipset do not allow to change to a custom baudrate.
Infact you  can see from the sources: (taken from: http://www.etheus.net/media/7/71/CP210x_v0.07_2.6.11.12.patch )

+static void cp2101_set_termios (struct usb_serial_port *port,
+            struct termios *old_termios)
...
+                  default:
+                        dev_err(&port->dev, "cp2101 driver does not "
+                              "support the baudrate requested\n");
+                        break;

But the datasheet states that 128000 bps is supported - see this: http://www.silabs.com/pages/DownloadDoc.aspx?FILEURL=Support%20Documents/TechnicalDocs/CP2101.pdf&src=ProductMatrix

The best things to try is to add the 128000 bps support by changing the sources and adding the case.
But it appears to be an unstandard baudrate, infacts B128000 do not exists in termbits.h: http://tomoyo.sourceforge.jp/cgi-bin/lxr/source/include/asm-generic/termbits.h#L145

So I think your only choice is to "hack" your driver. Change some value, for example B921600, to impose 128000 as value, so when you set the baudrate via stty to 921600, it sets 128000 instead.
This means that you must take the original drivers (the file is drivers/usb/serial/cp2101.c ), look for the
 cp2101_set_termios function, look for the line

                  case B921600:      baud = 921600;      break;

and change it with this one

                  case B921600:      baud = 128000;      break;

Then recompile and reinstall the kernel and driver.
Then, after a reboot, try to set the baudrate with

stty -F /dev/ttyUSB0 128000

Since in windows it works correctly, I expect that it should work.
Hope that helps...
0
 
Duncan RoeSoftware DeveloperCommented:
The patch file that HappyCactus posted is rather old. The cp210x driver in Linux 2.6.32.8 has support for 128000 baud - you could just upgrade to that.
Looking through my collection of sources, it's not in 2.6.29.2 but it is in 2.6.30.6.


0
 
StarDusterIIAuthor Commented:
HappyCactus, I was with you right up until you said "recompile and reinstall the kernel"... did I say I'm really, really new to Linux??  ;-)

Great evaluation of the situation though.  But patching the kernel may be a problem.  I'm sure I could get it done eventually, but this is for an interactive distance learning application that's going to be distributed to thousands of different locations for a number of different client accounts.  

Although... this is a part of a product that doesn't exist today... at least in Linux form.  So, it might be possible to send a patched Kernel because everything will have to be shipped new.  Humm... pardon the rambling but too many thoughts in my head right now.  

So, do I have it right?... modify cp2101c and then recompile the kernel?  I tried to find that file on my computer and it doesn't exist so I assume it's because I don't have the source.
0
 
StarDusterIIAuthor Commented:
Duncan, I'm looking at my kernel version on openSUSE 11.2 and it's 2.6.31.12-0.2-desktop.  Shouldn't that have the 128000 support  then??
0
 
Duncan RoeSoftware DeveloperCommented:
Yes it should. Perhaps you are using a different USB driver - pls post the o/p from the "lsmod" command. Also, cd to your Linux source directory, cd drivers/usb/serial and post the o/p from "grep 128000 cp210x.c"
0
 
StarDusterIIAuthor Commented:
I don't have the Linux source, I just installed the pre-built system (openSUSE 11.2).  I could download it (if I knew where it was) if that would help.

Here's the output from lsmod:

linux-nsxk:/usr/src/Utility # lsmod
Module                  Size  Used by
ip6t_LOG                7980  9
xt_tcpudp               4104  14
xt_pkttype              2248  3
ipt_LOG                 7660  9
xt_limit                4076  18
snd_pcm_oss            60032  0
snd_mixer_oss          22728  1 snd_pcm_oss
snd_seq                78560  0
snd_seq_device         10460  1 snd_seq
edd                    13232  0
af_packet              28680  0
ip6t_REJECT             6856  3
nf_conntrack_ipv6      26632  6
i915                  284968  1
ip6table_raw            3720  1
drm                   228416  2 i915
i2c_algo_bit            8396  1 i915
video                  29156  1 i915
xt_NOTRACK              2248  4
ipt_REJECT              4136  3
xt_state                2920  12
cpufreq_conservative    10360  0
iptable_raw             3560  1
iptable_filter          4520  1
cpufreq_userspace       4364  0
cpufreq_powersave       2152  0
acpi_cpufreq           11544  0
ip6table_mangle         5000  0
nf_conntrack_netbios_ns     3400  0
nf_conntrack_ipv4      14232  6
nf_conntrack          101952  5 nf_conntrack_ipv6,xt_NOTRACK,xt_state,nf_conntrack_netbios_ns,nf_conntrack_ipv4
nf_defrag_ipv4          2856  1 nf_conntrack_ipv4
ip_tables              24536  2 iptable_raw,iptable_filter
ip6table_filter         4552  1
ip6_tables             26072  4 ip6t_LOG,ip6table_raw,ip6table_mangle,ip6table_filter
x_tables               30768  11 ip6t_LOG,xt_tcpudp,xt_pkttype,ipt_LOG,xt_limit,ip6t_REJECT,xt_NOTRACK,ipt_REJECT,xt_state,ip_tables,ip6_tables
fuse                   87984  3
loop                   22292  0
snd_hda_codec_realtek   318124  1
iTCO_wdt               15056  0
snd_hda_intel          37280  2
sr_mod                 20964  0
iTCO_vendor_support     4908  1 iTCO_wdt
snd_hda_codec         111112  2 snd_hda_codec_realtek,snd_hda_intel
intel_agp              37584  1
snd_hwdep              11216  1 snd_hda_codec
i2c_i801               15624  0
cdrom                  48232  1 sr_mod
snd_pcm               117808  3 snd_pcm_oss,snd_hda_intel,snd_hda_codec
snd_timer              32152  2 snd_seq,snd_pcm
snd                    97608  14 snd_pcm_oss,snd_mixer_oss,snd_seq,snd_seq_device,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer
snd_page_alloc         12600  2 snd_hda_intel,snd_pcm
r8169                  46412  0
cp210x                 18284  0
usbserial              49584  1 cp210x
pcspkr                  3720  0
sg                     40128  0
button                  8360  0
ext4                  426040  4
jbd2                  115712  1 ext4
crc16                   2504  1 ext4
linear                  7564  0
dm_snapshot            32316  0
dm_mod                101544  10 dm_snapshot
fan                     6352  0
processor              56932  1 acpi_cpufreq
pata_acpi               6280  0
piix                    8560  0
ide_core              148064  1 piix
thermal                25160  0
thermal_sys            21888  4 video,fan,processor,thermal
0
 
StarDusterIIAuthor Commented:
Again, I'm new to Linux so this may be a stupid question... but if the latest cp210x.c source supports 128000, couldn't you just compile that and replace the existing driver executable with the new one?
0
 
HappyCactusCommented:
What the hell, you're right.
The latest driver is here:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=drivers/usb/serial/cp210x.c;h=ec9b0449ccf6658bbd013ef3a18989a34f1afcf2;hb=HEAD

the 128000 is supported as a "quantized" value. This means that if you ask for 128100 bps the effective bps setup is 128000. that's good for you.
So I think that the problem is elsewhere...
StarDusterII, what is your kernel version? ( uname -a )
Can you update your kernel?
0
 
StarDusterIIAuthor Commented:
They say even a blind pig sometimes can find a truffle... so today, I'll be a pig!  ;-)

The kernel is 2.6.31.12-0.2-desktop (openSUSE).  I didn't install from source and as far as updating the kernel... if it doesn't involve needing the source I'm ok... with a little direction of course!  ;-)
0
 
StarDusterIIAuthor Commented:
Isn't this the sort of thing I should try...  Copying the cp210x.ko of course.

http://www.linuxforums.org/forum/wireless-internet/148376-mobidata-edge-modem-issue-linux-kernel-cp2101-c.html
0
 
Duncan RoeSoftware DeveloperCommented:
I don't think that post applies to your situation. Your modem is recognised and a device file is created for it.
You already have a good cp210x.ko, and you're using it. No room for improvement there. Please retry strace without open and with -f (follow spawned processes).
Also Linux source *should* be on your DVD whether you installed from it or not. The Linux source license is GPL so it has to be available somewhere. Just check that you have a version of cp210x.c that contains 128000 as per http:#30918878
strace -f -etrace=ioctl mono test.exe 115200

strace -f -etrace=ioctl mono test.exe 128000

Open in new window

0
 
StarDusterIIAuthor Commented:
Didn't mean to follow the reference verbatim, only to rebuild the cp210x driver.  I have a cp210x.ko but it doesn't seem to match the code that contains the 128000 support.  Compiling the cp210x.c that does would produce a .ko that we know has support.

I looked on the install DVD and it there is source on it, it's not clear where it is.  Did a search for cp21 and nothing came up.

linux-nsxk:/usr/src/Mono/test/test/bin/Debug # strace -f -etrace=ioctl mono test.exe 115200
Process 29455 attached (waiting for parent)
Process 29455 resumed (parent 29454 ready)
Process 29456 attached
Process 29457 attached (waiting for parent)
Process 29457 resumed (parent 29454 ready)
[pid 29457] --- SIGPWR (Power failure) @ 0 (0) ---
[pid 29457] --- SIGXCPU (CPU time limit exceeded) @ 0 (0) ---
[pid 29457] --- SIGPWR (Power failure) @ 0 (0) ---
[pid 29457] --- SIGXCPU (CPU time limit exceeded) @ 0 (0) ---
[pid 29457] --- SIGPWR (Power failure) @ 0 (0) ---
[pid 29457] --- SIGXCPU (CPU time limit exceeded) @ 0 (0) ---
[pid 29457] --- SIGPWR (Power failure) @ 0 (0) ---
[pid 29457] --- SIGXCPU (CPU time limit exceeded) @ 0 (0) ---
[pid 29457] --- SIGPWR (Power failure) @ 0 (0) ---
[pid 29457] --- SIGXCPU (CPU time limit exceeded) @ 0 (0) ---
[pid 29457] --- SIGPWR (Power failure) @ 0 (0) ---
[pid 29457] --- SIGXCPU (CPU time limit exceeded) @ 0 (0) ---
[pid 29454] syscall_293(0xc04534, 0x80000, 0x32, 0, 0x1, 0x180000, 0x7ffff8775cac, 0x7ffff8775cac, 0x7ffff8775cac, 0x7ffff8775cac, 0x7ffff8775cac, 0x7ffff8775cac, 0x7ffff8775cac, 0x7ffff8775cac, 0x7ffff8775cac, 0x7ffff8775cac, 0x7ffff8775cac, 0x7ffff8775cac, 0x7ffff8775cac, 0x7ffff8775cac, 0x7ffff8775cac, 0x7ffff8775cac, 0x7ffff8775cac, 0x7ffff8775cac, 0x7ffff8775cac, 0x7ffff8775cac, 0x7ffff8775cac, 0x7ffff8775cac, 0x7ffff8775cac, 0x7ffff8775cac, 0x7ffff8775cac, 0x7ffff8775cac) = 0
Process 29458 attached
[pid 29458] --- SIGPWR (Power failure) @ 0 (0) ---
[pid 29457] --- SIGPWR (Power failure) @ 0 (0) ---
[pid 29458] --- SIGXCPU (CPU time limit exceeded) @ 0 (0) ---
[pid 29457] --- SIGXCPU (CPU time limit exceeded) @ 0 (0) ---
Process 29459 attached (waiting for parent)
Process 29459 resumed (parent 29454 ready)
[pid 29454] ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
[pid 29454] ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
[pid 29459] ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 -opost -isig -icanon -echo ...}) = 0
[pid 29459] ioctl(0, SNDCTL_TMR_STOP or TCSETSW, {B115200 opost isig icanon -echo ...}) = 0
[pid 29459] ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig icanon -echo ...}) = 0
Process 29459 detached
[pid 29454] --- SIGCHLD (Child exited) @ 0 (0) ---
[pid 29454] ioctl(11, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig icanon -echo ...}) = 0
[pid 29454] ioctl(11, SNDCTL_TMR_START or TCSETS, {B115200 -opost -isig -icanon -echo ...}) = 0
[pid 29454] ioctl(11, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 -opost -isig -icanon -echo ...}) = 0
[pid 29454] ioctl(11, TIOCMGET, [TIOCM_DTR|TIOCM_RTS|TIOCM_DSR]) = 0
[pid 29454] ioctl(11, TIOCMSET, [TIOCM_RTS|TIOCM_DSR]) = 0
[pid 29454] ioctl(11, TIOCMGET, [TIOCM_RTS|TIOCM_DSR]) = 0
[pid 29454] ioctl(11, TIOCMSET, [TIOCM_DSR]) = 0
[pid 29454] ioctl(11, TIOCMGET, [TIOCM_DSR]) = 0
[pid 29454] ioctl(11, TIOCMSET, [TIOCM_DTR|TIOCM_DSR]) = 0
Process 29460 attached
Process 29461 attached (waiting for parent)
Process 29461 resumed (parent 29460 ready)
[pid 29461] ioctl(11, FIONREAD, [0])    = 0
[pid 29461] ioctl(11, FIONREAD, [0])    = 0
[pid 29461] ioctl(11, FIONREAD, [0])    = 0
[pid 29461] ioctl(11, FIONREAD, [0])    = 0
[pid 29461] ioctl(11, FIONREAD, [0])    = 0
[pid 29461] ioctl(11, FIONREAD, [0])    = 0
[pid 29461] ioctl(11, FIONREAD, [0])    = 0
[pid 29461] ioctl(11, FIONREAD, [0])    = 0
..... this continues forever.....

linux-nsxk:/usr/src/Mono/test/test/bin/Debug # strace -f -etrace=ioctl mono test.exe 128000
Process 32606 attached (waiting for parent)
Process 32606 resumed (parent 32605 ready)
Process 32607 attached
Process 32608 attached
[pid 32608] --- SIGPWR (Power failure) @ 0 (0) ---
[pid 32608] --- SIGXCPU (CPU time limit exceeded) @ 0 (0) ---
[pid 32608] --- SIGPWR (Power failure) @ 0 (0) ---
[pid 32608] --- SIGXCPU (CPU time limit exceeded) @ 0 (0) ---
[pid 32608] --- SIGPWR (Power failure) @ 0 (0) ---
[pid 32608] --- SIGXCPU (CPU time limit exceeded) @ 0 (0) ---
[pid 32608] --- SIGPWR (Power failure) @ 0 (0) ---
[pid 32608] --- SIGXCPU (CPU time limit exceeded) @ 0 (0) ---
[pid 32608] --- SIGPWR (Power failure) @ 0 (0) ---
[pid 32608] --- SIGXCPU (CPU time limit exceeded) @ 0 (0) ---
[pid 32608] --- SIGPWR (Power failure) @ 0 (0) ---
[pid 32608] --- SIGXCPU (CPU time limit exceeded) @ 0 (0) ---
[pid 32605] syscall_293(0xc04514, 0x80000, 0x32, 0, 0x1, 0x180000, 0x7fff8e2821cc, 0x7fff8e2821cc, 0x7fff8e2821cc, 0x7fff8e2821cc, 0x7fff8e2821cc, 0x7fff8e2821cc, 0x7fff8e2821cc, 0x7fff8e2821cc, 0x7fff8e2821cc, 0x7fff8e2821cc, 0x7fff8e2821cc, 0x7fff8e2821cc, 0x7fff8e2821cc, 0x7fff8e2821cc, 0x7fff8e2821cc, 0x7fff8e2821cc, 0x7fff8e2821cc, 0x7fff8e2821cc, 0x7fff8e2821cc, 0x7fff8e2821cc, 0x7fff8e2821cc, 0x7fff8e2821cc, 0x7fff8e2821cc, 0x7fff8e2821cc, 0x7fff8e2821cc, 0x7fff8e2821cc) = 0
Process 32610 attached
[pid 32608] --- SIGPWR (Power failure) @ 0 (0) ---
[pid 32610] --- SIGPWR (Power failure) @ 0 (0) ---
[pid 32610] --- SIGXCPU (CPU time limit exceeded) @ 0 (0) ---
[pid 32608] --- SIGXCPU (CPU time limit exceeded) @ 0 (0) ---
Process 32611 attached (waiting for parent)
Process 32611 resumed (parent 32605 ready)
[pid 32605] ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
[pid 32605] ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
[pid 32611] ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B9600 opost isig icanon -echo ...}) = 0
[pid 32611] ioctl(0, SNDCTL_TMR_STOP or TCSETSW, {B9600 opost isig icanon -echo ...}) = 0
[pid 32611] ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B9600 opost isig icanon -echo ...}) = 0
Process 32611 detached
[pid 32605] --- SIGCHLD (Child exited) @ 0 (0) ---
[pid 32605] ioctl(11, SNDCTL_TMR_TIMEBASE or TCGETS, {B9600 opost isig icanon -echo ...}) = 0
[pid 32605] ioctl(11, SNDCTL_TMR_START or TCSETS, {B9600 -opost -isig -icanon -echo ...}) = 0
[pid 32605] ioctl(11, SNDCTL_TMR_TIMEBASE or TCGETS, {B9600 -opost -isig -icanon -echo ...}) = 0
[pid 32605] ioctl(11, TIOCMGET, [TIOCM_DTR|TIOCM_RTS|TIOCM_DSR]) = 0
[pid 32605] ioctl(11, TIOCMSET, [TIOCM_RTS|TIOCM_DSR]) = 0
[pid 32605] ioctl(11, TIOCMGET, [TIOCM_RTS|TIOCM_DSR]) = 0
[pid 32605] ioctl(11, TIOCMSET, [TIOCM_DSR]) = 0
[pid 32605] ioctl(11, TIOCMGET, [TIOCM_DSR]) = 0
[pid 32605] ioctl(11, TIOCMSET, [TIOCM_DTR|TIOCM_DSR]) = 0
Process 32612 attached
Process 32613 attached (waiting for parent)
Process 32613 resumed (parent 32612 ready)
[pid 32613] ioctl(11, FIONREAD, [0])    = 0
[pid 32613] ioctl(11, FIONREAD, [0])    = 0
[pid 32613] ioctl(11, FIONREAD, [0])    = 0
[pid 32613] ioctl(11, FIONREAD, [0])    = 0
.... on and on....
0
 
Duncan RoeSoftware DeveloperCommented:
Looks like it's using something other than ioctl:

[pid 29454] ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
[pid 29459] ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 -opost -isig -icanon -echo ...}) = 0

These 2 ioctls read the settings of the serial line. In between, something has changed the baud rate from 38400 to 115200. In your second trace, rather than 128000, the baud rate goes to 9600.

I downloaded openSUSE-11.2-DVD-i586.iso (yes all 4.7GB) and cannot find source on it anywhere. Where did you find it? We need the source for Linux, it should be a file with a name ending .srpm. If not on the DVD, it should be available from the SUSE web site, but I couldn't find source there.

I would think it unlikely that the cp210x.ko you have does not support 128000. I expect we just need to use the right system call to access that support. Since your mono program is not using ioctl to set the baud rate, let's find out what it is using. This means running strace without limiting it to any particular system call, but that will produce a huge amount of output. Luckily you can redirect it all to a file (t5 in the example below).

Now we need to see just the portion between the first and second "ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS". I suggest you use the "less" utility (a file viewer) rather than nano (a file editor). In what follows, '$' = shell prompt, ':' = less prompt. Any line not starting with either is narrative. Narrative refers to the previous entry.

$ less t5

a screenful of the file appears

: /SNDCTL_TMR_TIMEBASE

search for the first occurrence. Expect to see 38400 as speed

:-N

turn on line numbering

:ma

Mark this line (saves you having to note what it was)

: /SNDCTL_TMR_TIMEBASE

search for second occurrence. Expect to see 115200 as speed

:'a

Yes, single-quote is a less command. It moves you back to a mark (mark a in this case)
Post all lines from that first SNDCTL_TMR_TIMEBASE to the second. Hopefully that won't be a whole lot, but post them anyway.

The next challenge will be to figure out what is the user interface to use the 128000 functionality.


strace -f mono test.exe 115200 2>t5

Open in new window

0
 
StarDusterIIAuthor Commented:
I used yast to find the source and download it.  Unfortunately, I can't find linux-headers in it anywhere so still looking for that.

Hope you have a fast connection... that's a lot of download just to see if cp210x.c is there!  ;-)

On the user interface... I'm actually setting comport.BaudRate in the C# program and recompiling to do the 115200 and then the 128000.  Don't know if that matters.  Anyway, here's the 115200 output

  7054 [pid  9691] ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS <unfinished ...>
   7055 [pid  9696] close(897 <unfinished ...>
   7056 [pid  9691] <... ioctl resumed> , {B38400 opost isig icanon echo ...}) =
   7056  0
   7057 [pid  9696] <... close resumed> )       = -1 EBADF (Bad file descriptor)
   7058 [pid  9696] close(896)                  = -1 EBADF (Bad file descriptor)
   7059 [pid  9691] ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS <unfinished ...>
   7060 [pid  9696] close(895 <unfinished ...>
   7061 [pid  9691] <... ioctl resumed> , {B38400 opost isig icanon echo ...}) =

 8077 [pid  9696] ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 -opost -isi   8077 g -icanon -echo ...}) = 0
   8078 [pid  9696] ioctl(0, SNDCTL_TMR_STOP or TCSETSW, {B115200 opost isig ica   8078 non -echo ...}) = 0
   8079 [pid  9696] ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig    8079 icanon -echo ...}) = 0

8127 [pid  9691] ioctl(11, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig   8127  icanon -echo ...}) = 0
   8128 [pid  9691] ioctl(11, SNDCTL_TMR_START or TCSETS, {B115200 -opost -isig    8128 -icanon -echo ...}) = 0
   8129 [pid  9691] ioctl(11, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 -opost -is   8129 ig -icanon -echo ...}) = 0

Using 128000... I actually copied everything between the first two uses and then the second two uses.


[pid 10204] ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS <unfinished ...>
[pid 10209] close(892 <unfinished ...>
[pid 10204] <... ioctl resumed> , {B38400 opost isig icanon echo ...}) = 0
[pid 10209] <... close resumed> )       = -1 EBADF (Bad file descriptor)
[pid 10209] close(891)                  = -1 EBADF (Bad file descriptor)
[pid 10204] ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS <unfinished ...>
[pid 10209] close(890 <unfinished ...>
[pid 10204] <... ioctl resumed> , {B38400 opost isig icanon echo ...}) = 0
[pid 10209] <... close resumed> )       = -1 EBADF (Bad file descriptor)
[pid 10209] close(889)                  = -1 EBADF (Bad file descriptor)
[pid 10209] close(798 <unfinished ...>
[pid 10204] close(11 <unfinished ...>
[pid 10209] <... close resumed> )       = -1 EBADF (Bad file descriptor)
[pid 10204] <... close resumed> )       = 0
[pid 10209] close(797)                  = -1 EBADF (Bad file descriptor)
[pid 10209] close(796)                  = -1 EBADF (Bad file descriptor)
[pid 10209] close(795 <unfinished ...>
[pid 10204] mmap(NULL, 65536, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS|MAP_32BIT, -1, 0 <unfinished ...>
[pid 10209] <... close resumed> )       = -1 EBADF (Bad file descriptor)
[pid 10204] <... mmap resumed> )        = 0x41db3000
[pid 10209] close(762 <unfinished ...>
[pid 10204] read(10,  <unfinished ...>
[pid 10209] <... close resumed> )       = -1 EBADF (Bad file descriptor)
[pid 10209] close(17)                   = -1 EBADF (Bad file descriptor)
[pid 10209] close(16)                   = -1 EBADF (Bad file descriptor)
[pid 10209] close(15)                   = -1 EBADF (Bad file descriptor)
[pid 10209] close(14)                   = -1 EBADF (Bad file descriptor)
[pid 10209] close(13)                   = -1 EBADF (Bad file descriptor)
[pid 10209] close(12)                   = -1 EBADF (Bad file descriptor)
[pid 10209] close(11)                   = 0
[pid 10209] close(10)                   = 0
[pid 10209] close(9)                    = 0
[pid 10209] close(8)                    = 0
[pid 10209] close(7)                    = 0
[pid 10209] close(6)                    = 0
[pid 10209] close(5)                    = 0
[pid 10209] close(4)                    = 0
[pid 10209] close(3)                    = 0
[pid 10209] execve("/bin/stty", ["/bin/stty", "--file", "/dev/ttyUSB0", "-raw"], [/* 83 vars */]) = 0
[pid 10209] brk(0)                      = 0x60c000
[pid 10209] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f18ab011000
[pid 10209] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f18ab010000
[pid 10209] access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
[pid 10209] open("/usr/lib64/mpi/gcc/openmpi/lib64/tls/x86_64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 10209] stat("/usr/lib64/mpi/gcc/openmpi/lib64/tls/x86_64", 0x7fffe7fff090) = -1 ENOENT (No such file or directory)
[pid 10209] open("/usr/lib64/mpi/gcc/openmpi/lib64/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 10209] stat("/usr/lib64/mpi/gcc/openmpi/lib64/tls", 0x7fffe7fff090) = -1 ENOENT (No such file or directory)
[pid 10209] open("/usr/lib64/mpi/gcc/openmpi/lib64/x86_64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 10209] stat("/usr/lib64/mpi/gcc/openmpi/lib64/x86_64", 0x7fffe7fff090) = -1 ENOENT (No such file or directory)
[pid 10209] open("/usr/lib64/mpi/gcc/openmpi/lib64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 10209] stat("/usr/lib64/mpi/gcc/openmpi/lib64", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 10209] open("/etc/ld.so.cache", O_RDONLY) = 3
[pid 10209] fstat(3, {st_mode=S_IFREG|0644, st_size=119249, ...}) = 0
[pid 10209] mmap(NULL, 119249, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f18aaff2000
[pid 10209] close(3)                    = 0
[pid 10209] open("/lib64/libc.so.6", O_RDONLY) = 3
[pid 10209] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\353\1\0\0\0\0\0"..., 832) = 832
[pid 10209] fstat(3, {st_mode=S_IFREG|0755, st_size=1408560, ...}) = 0
[pid 10209] mmap(NULL, 3516488, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f18aaa9a000
[pid 10209] fadvise64(3, 0, 3516488, POSIX_FADV_WILLNEED) = 0
[pid 10209] mprotect(0x7f18aabeb000, 2097152, PROT_NONE) = 0
[pid 10209] mmap(0x7f18aadeb000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x151000) = 0x7f18aadeb000
[pid 10209] mmap(0x7f18aadf0000, 18504, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f18aadf0000
[pid 10209] close(3)                    = 0
[pid 10209] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f18aaff1000
[pid 10209] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f18aaff0000
[pid 10209] arch_prctl(ARCH_SET_FS, 0x7f18aaff06f0) = 0
[pid 10209] mprotect(0x7f18aadeb000, 16384, PROT_READ) = 0
[pid 10209] mprotect(0x60a000, 4096, PROT_READ) = 0
[pid 10209] mprotect(0x7f18ab012000, 4096, PROT_READ) = 0
[pid 10209] munmap(0x7f18aaff2000, 119249) = 0
[pid 10209] brk(0)                      = 0x60c000
[pid 10209] brk(0x62d000)               = 0x62d000
[pid 10209] open("/usr/lib/locale/locale-archive", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 10209] open("/usr/share/locale/locale.alias", O_RDONLY) = 3
[pid 10209] fstat(3, {st_mode=S_IFREG|0644, st_size=2512, ...}) = 0
[pid 10209] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f18ab00f000
[pid 10209] read(3, "# Locale name alias data base.\n#"..., 4096) = 2512
[pid 10209] read(3, "", 4096)           = 0
[pid 10209] close(3)                    = 0
[pid 10209] munmap(0x7f18ab00f000, 4096) = 0
[pid 10209] open("/usr/lib/locale/en_US.UTF-8/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 10209] open("/usr/lib/locale/en_US.utf8/LC_IDENTIFICATION", O_RDONLY) = 3
[pid 10209] fstat(3, {st_mode=S_IFREG|0644, st_size=373, ...}) = 0
[pid 10209] mmap(NULL, 373, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f18ab00f000
[pid 10209] close(3)                    = 0
[pid 10209] open("/usr/lib64/gconv/gconv-modules.cache", O_RDONLY) = 3
[pid 10209] fstat(3, {st_mode=S_IFREG|0644, st_size=26050, ...}) = 0
[pid 10209] mmap(NULL, 26050, PROT_READ, MAP_SHARED, 3, 0) = 0x7f18ab008000
[pid 10209] close(3)                    = 0
[pid 10209] open("/usr/lib/locale/en_US.UTF-8/LC_MEASUREMENT", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 10209] open("/usr/lib/locale/en_US.utf8/LC_MEASUREMENT", O_RDONLY) = 3
[pid 10209] fstat(3, {st_mode=S_IFREG|0644, st_size=23, ...}) = 0
[pid 10209] mmap(NULL, 23, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f18ab007000
[pid 10209] close(3)                    = 0
[pid 10209] open("/usr/lib/locale/en_US.UTF-8/LC_TELEPHONE", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 10209] open("/usr/lib/locale/en_US.utf8/LC_TELEPHONE", O_RDONLY) = 3
[pid 10209] fstat(3, {st_mode=S_IFREG|0644, st_size=59, ...}) = 0
[pid 10209] mmap(NULL, 59, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f18ab006000
[pid 10209] close(3)                    = 0
[pid 10209] open("/usr/lib/locale/en_US.UTF-8/LC_ADDRESS", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 10209] open("/usr/lib/locale/en_US.utf8/LC_ADDRESS", O_RDONLY) = 3
[pid 10209] fstat(3, {st_mode=S_IFREG|0644, st_size=155, ...}) = 0
[pid 10209] mmap(NULL, 155, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f18ab005000
[pid 10209] close(3)                    = 0
[pid 10209] open("/usr/lib/locale/en_US.UTF-8/LC_NAME", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 10209] open("/usr/lib/locale/en_US.utf8/LC_NAME", O_RDONLY) = 3
[pid 10209] fstat(3, {st_mode=S_IFREG|0644, st_size=77, ...}) = 0
[pid 10209] mmap(NULL, 77, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f18ab004000
[pid 10209] close(3)                    = 0
[pid 10209] open("/usr/lib/locale/en_US.UTF-8/LC_PAPER", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 10209] open("/usr/lib/locale/en_US.utf8/LC_PAPER", O_RDONLY) = 3
[pid 10209] fstat(3, {st_mode=S_IFREG|0644, st_size=34, ...}) = 0
[pid 10209] mmap(NULL, 34, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f18ab003000
[pid 10209] close(3)                    = 0
[pid 10209] open("/usr/lib/locale/en_US.UTF-8/LC_MESSAGES", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 10209] open("/usr/lib/locale/en_US.utf8/LC_MESSAGES", O_RDONLY) = 3
[pid 10209] fstat(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 10209] close(3)                    = 0
[pid 10209] open("/usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES", O_RDONLY) = 3
[pid 10209] fstat(3, {st_mode=S_IFREG|0644, st_size=52, ...}) = 0
[pid 10209] mmap(NULL, 52, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f18ab002000
[pid 10209] close(3)                    = 0
[pid 10209] open("/usr/lib/locale/en_US.UTF-8/LC_MONETARY", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 10209] open("/usr/lib/locale/en_US.utf8/LC_MONETARY", O_RDONLY) = 3
[pid 10209] fstat(3, {st_mode=S_IFREG|0644, st_size=286, ...}) = 0
[pid 10209] mmap(NULL, 286, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f18ab001000
[pid 10209] close(3)                    = 0
[pid 10209] open("/usr/lib/locale/en_US.UTF-8/LC_COLLATE", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 10209] open("/usr/lib/locale/en_US.utf8/LC_COLLATE", O_RDONLY) = 3
[pid 10209] fstat(3, {st_mode=S_IFREG|0644, st_size=966938, ...}) = 0
[pid 10209] mmap(NULL, 966938, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f18aaf03000
[pid 10209] close(3)                    = 0
[pid 10209] open("/usr/lib/locale/en_US.UTF-8/LC_TIME", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 10209] open("/usr/lib/locale/en_US.utf8/LC_TIME", O_RDONLY) = 3
[pid 10209] fstat(3, {st_mode=S_IFREG|0644, st_size=2454, ...}) = 0
[pid 10209] mmap(NULL, 2454, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f18ab000000
[pid 10209] close(3)                    = 0
[pid 10209] open("/usr/lib/locale/en_US.UTF-8/LC_NUMERIC", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 10209] open("/usr/lib/locale/en_US.utf8/LC_NUMERIC", O_RDONLY) = 3
[pid 10209] fstat(3, {st_mode=S_IFREG|0644, st_size=54, ...}) = 0
[pid 10209] mmap(NULL, 54, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f18aafff000
[pid 10209] close(3)                    = 0
[pid 10209] open("/usr/lib/locale/en_US.UTF-8/LC_CTYPE", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 10209] open("/usr/lib/locale/en_US.utf8/LC_CTYPE", O_RDONLY) = 3
[pid 10209] fstat(3, {st_mode=S_IFREG|0644, st_size=256316, ...}) = 0
[pid 10209] mmap(NULL, 256316, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f18aaec4000
[pid 10209] close(3)                    = 0
[pid 10209] open("/dev/ttyUSB0", O_RDONLY|O_NONBLOCK) = 3
[pid 10209] dup2(3, 0)                  = 0
[pid 10209] close(3)                    = 0
[pid 10209] fcntl(0, F_GETFL)           = 0x8800 (flags O_RDONLY|O_NONBLOCK|O_LARGEFILE)
[pid 10209] fcntl(0, F_SETFL, O_RDONLY|O_LARGEFILE) = 0
[pid 10209] ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B9600 -opost -isig -icanon -echo ...}) = 0
[pid 10209] ioctl(0, SNDCTL_TMR_STOP or TCSETSW, {B9600 opost isig icanon -echo ...}) = 0
[pid 10209] ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B9600 opost isig icanon -echo ...}) = 0
[pid 10209] close(1)                    = 0


0
 
HappyCactusCommented:
I do not think that strace can give any useful information, you only need to know if the function you are using to set the baudrate is working or not. tcsetserial can't handle nonstandard baudrates (see man page), so you need to use a ioctl (TIOCSSERIAL and serial_struct).
Just see the version of your driver - modinfo cp2101 - and see if it is updated. if it is not, update it.
0
 
StarDusterIIAuthor Commented:
Here's the output of modinfo cp210x

linux-nsxk:/usr/src/Mono/test/test/bin/Debug # modinfo cp210x
filename:       /lib/modules/2.6.31.12-0.2-desktop/kernel/drivers/usb/serial/cp210x.ko
license:        GPL
version:        v0.09
description:    Silicon Labs CP210x RS232 serial adaptor driver
srcversion:     FD14A8BF15F5B70BE7E6E1E
alias:          usb:v413Cp9500d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v18EFpE00Fd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v16D6p0001d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v166Ap0303d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1555p0004d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v13ADp9999d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10CEpEA6Ad*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C5pEA61d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4pF004d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4pF003d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4pF002d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4pF001d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4pEA61d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4pEA60d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p846Ed*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p8411d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p83A8d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p8382d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p8341d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p82F9d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p8293d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p826Bd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p822Bd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p8218d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p81F2d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p81E7d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p81E2d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p81C8d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p81ACd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p81A6d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p819Fd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p815Ed*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p814Bd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p814Ad*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p813Fd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p813Dd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p8115d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p80F6d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p80DDd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p80CAd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p807Ad*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p8066d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p8054d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p8053d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p803Bd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p800Ad*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p1601d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p1101d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10C4p0F91d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10B5pAC70d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10ABp10C5d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v10A6pAA26d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0FCFp1006d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0FCFp1004d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0FCFp1003d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v08FDp000Ad*dc*dsc*dp*ic*isc*ip*
alias:          usb:v08E6p5501d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0745p1000d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0489pE000d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0471p066Ad*dc*dsc*dp*ic*isc*ip*
depends:        usbserial
vermagic:       2.6.31.12-0.2-desktop SMP preempt mod_unload modversions
parm:           debug:Enable verbose debugging messages (bool)

Looks like it's current... but how do I do an update?

sr
0
 
Duncan RoeSoftware DeveloperCommented:
Driver version looks good. 2.6.31 & 2.6.32 both have a driver labelled "v0.09" although they are slightly different (some extra dcd / rts stuff). It should certainly support 128000 baud.

Hey - you can turn on debugging by "modprobe cp210x debug=true". Be sure to rmmod it first. "true" is my guess - if it doesn't work then try "yes" or "1" (one).

I really don't think you need to do an update.

With debug on, you could check to see what it does when your mono program runs. The output should be in /var/log/debug. If there's no such file and the output doesn't appear anywhere else (see below), you'll need to change your syslog.conf. Post if you need help.
(i.e. if you look in the most recently changed *.log files in /var/log and the output is not there. Files not ending .log are unlikely to be helpful and may be binary).
0
 
StarDusterIIAuthor Commented:
Did

rmmod -s cp210x
modprobe cp210x debug=yes (it didn't like true)
mono test.exe

Couldn't find var/log/Debug... did a search and didn't pull up anything recent... obviously I messed up somewhere.

PS.  Thanks for hanging in there with me!  Really appreciate the great help.

sr
0
 
Duncan RoeSoftware DeveloperCommented:
Probably debug messages are not being logged anywhere. Please post /etc/syslog.conf. If there is a directory /etc/syslog.d, post contents of that as well.
Aaargh - the .log stuff in my previous message is rubbish. I was thinking of a system at work! Common file names are debug, messages and syslog.
0
 
StarDusterIIAuthor Commented:
Wow... feeling really bad here.  Can't find a /etc/syslog.conf or a /etc/syslog.d directory.
0
 
Duncan RoeSoftware DeveloperCommented:
Use the pgrep command to make sure syslogd is running. If not, try for log instead of syslog in vase there's some new utility that Suse uses. Look at the man page for that utility, e.g. if "pgrep -l log" finds foologd, then type "man foologd". That should tell you what the config file is called and also how to configure, although the config file may have its own man page. Post what you find.
19:53:42$ pgrep -l syslog
2749 syslogd
19:53:49$ 

Open in new window

0
 
StarDusterIIAuthor Commented:
linux-nsxk:/usr/src/Mono/test/test/bin/Debug # pgrep -l syslog
2504 rsyslogd

rsyslog.conf.txt
0
 
StarDusterIIAuthor Commented:
Oops... My bad.  Better file here.
rsyslog.conf.txt
0
 
Duncan RoeSoftware DeveloperCommented:
Uncomment line 116. Restart rsyslogd (pkill -HUP rsyslogd) and try again. Sorry I don't have time to checkl if that's exactly right - check "man rsyslogd".
0
 
StarDusterIIAuthor Commented:
Ok, here's the output of the log for both baud rates.  Still shows the 128000 putting 9600 in the baud rate.

115200.txt
128000.txt
0
 
StarDusterIIAuthor Commented:
Just for fun I was going to look at the cp210x.c file in this link to see if it had the 128000 code in it.

Apr 19 17:03:56 linux-nsxk kernel: [107590.214212] /usr/src/packages/BUILD/kernel-desktop-2.6.31.12/linux-2.6.31/drivers/usb/serial/cp210x.c: cp210x_tiocmset_port - control = 0x0300

I get to /usr/src/packages/BUILD but that directory is empty!... what's up with that?
0
 
Duncan RoeSoftware DeveloperCommented:
You see these names in the log because that was where the distributor built the kernel you installed. You won't have them.
Curiously, neither log showed any attempt to change the baud rate from what was originally read (cp210x_get_termios_port gets the current settings).
Try changing the baud rate with stty and observe the debug entries. Try several standard baud rates, and 128000. Also re-try mono after setting the baud rate to 115200. To help you interpret the results, I've attached the 2.6.31.1 source that I have - it should be close to yours.
cp210x.c.txt
0
 
StarDusterIIAuthor Commented:
This is now running the 2.6.34-RC kernel... I thought maybe the latest would make a difference... it didn't.

Output from stty -F /dev/ttyUSB0 128000

Apr 20 06:39:06 linux-nsxk kernel: [41259.845879] usbcore: deregistering interface driver cp210x
Apr 20 06:39:06 linux-nsxk kernel: [41259.845975] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
Apr 20 06:39:06 linux-nsxk kernel: [41259.845989] cp210x 4-1:1.0: device disconnected
Apr 20 06:39:06 linux-nsxk kernel: [41259.846003] USB Serial deregistering driver cp210x
Apr 20 06:39:06 linux-nsxk kernel: [41259.850203] USB Serial support registered for cp210x
Apr 20 06:39:06 linux-nsxk kernel: [41259.850223] cp210x 4-1:1.0: cp210x converter detected
Apr 20 06:39:06 linux-nsxk kernel: [41259.960016] usb 4-1: reset full speed USB device using uhci_hcd and address 2
Apr 20 06:39:06 linux-nsxk kernel: [41260.108112] usb 4-1: cp210x converter now attached to ttyUSB0
Apr 20 06:39:06 linux-nsxk kernel: [41260.108130] usbcore: registered new interface driver cp210x
Apr 20 06:39:06 linux-nsxk kernel: [41260.108133] cp210x: v0.09:Silicon Labs CP210x RS232 serial adaptor driver
Apr 20 06:39:25 linux-nsxk kernel: [41278.749517] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_open - port 0
Apr 20 06:39:25 linux-nsxk kernel: [41278.750680] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_get_termios_port - port 0
Apr 20 06:39:25 linux-nsxk kernel: [41278.751673] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_get_termios_port - baud rate = 19200
Apr 20 06:39:25 linux-nsxk kernel: [41278.752676] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_get_termios_port - data bits = 8
Apr 20 06:39:25 linux-nsxk kernel: [41278.752680] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_get_termios_port - parity = NONE
Apr 20 06:39:25 linux-nsxk kernel: [41278.752683] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_get_termios_port - stop bits = 1
Apr 20 06:39:25 linux-nsxk kernel: [41278.753673] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_get_termios_port - flow control = NONE
Apr 20 06:39:25 linux-nsxk kernel: [41278.753677] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_tiocmset_port - port 0
Apr 20 06:39:25 linux-nsxk kernel: [41278.753681] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_tiocmset_port - control = 0x0303
Apr 20 06:39:25 linux-nsxk kernel: [41278.754878] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_tiocmset_port - port 0
Apr 20 06:39:25 linux-nsxk kernel: [41278.754882] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_tiocmset_port - control = 0x0300
Apr 20 06:39:25 linux-nsxk kernel: [41278.755675] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_close - port 0
Apr 20 06:39:25 linux-nsxk kernel: [41278.755678] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_close - shutting down urbs

setting to 115200

Apr 20 06:42:10 linux-nsxk kernel: [41443.277529] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_open - port 0
Apr 20 06:42:10 linux-nsxk kernel: [41443.279192] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_get_termios_port - port 0
Apr 20 06:42:10 linux-nsxk kernel: [41443.280186] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_get_termios_port - baud rate = 19200
Apr 20 06:42:10 linux-nsxk kernel: [41443.281186] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_get_termios_port - data bits = 8
Apr 20 06:42:10 linux-nsxk kernel: [41443.281190] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_get_termios_port - parity = NONE
Apr 20 06:42:10 linux-nsxk kernel: [41443.281193] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_get_termios_port - stop bits = 1
Apr 20 06:42:10 linux-nsxk kernel: [41443.282184] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_get_termios_port - flow control = NONE
Apr 20 06:42:10 linux-nsxk kernel: [41443.282189] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_tiocmset_port - port 0
Apr 20 06:42:10 linux-nsxk kernel: [41443.282192] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_tiocmset_port - control = 0x0303
Apr 20 06:42:10 linux-nsxk kernel: [41443.283208] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_set_termios - port 0
Apr 20 06:42:10 linux-nsxk kernel: [41443.283212] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_set_termios - Setting baud rate to 115200 baud
Apr 20 06:42:10 linux-nsxk kernel: [41443.284254] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_tiocmset_port - port 0
Apr 20 06:42:10 linux-nsxk kernel: [41443.284258] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_tiocmset_port - control = 0x0300
Apr 20 06:42:10 linux-nsxk kernel: [41443.285189] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_close - port 0
Apr 20 06:42:10 linux-nsxk kernel: [41443.285193] /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/drivers/usb/serial/cp210x.c: cp210x_close - shutting down urbs
0
 
Duncan RoeSoftware DeveloperCommented:
It seems to me there must be some other system call you need to use. There is just nowhere inside a struct termios to store an integral baud rate. It can only hold a range of preset speeds, and if you ask for something else then I rather suspect cfset[io]speed() leaves the struct termios alone (cfsetispeed is the library function you call to set up the input speed request in a platform-independent fashion - cfsetospeed similarly for output).
I don't know what it is and your mono program doesn't know either. Will have a bit of a look when I get some time (might not be real soon)
0
 
HappyCactusCommented:
I think I have found the problem.
As you can see in the cp210x sources (http://lxr.free-electrons.com/source/drivers/usb/serial/cp210x.c ), in line 610, the baudrate is set only if it needs to be updated and it is not null. But baud value has been updated by the quantization function feed by the tty_get_baud_rate function (line 607).
This function takes his values from a "standard baudrate table": http://lxr.free-electrons.com/source/drivers/char/tty_ioctl.c#L430 (function tty_termios_baud_rate http://lxr.free-electrons.com/source/drivers/char/tty_ioctl.c#L243) and the table is here: http://lxr.free-electrons.com/source/drivers/char/tty_ioctl.c#L201 . As you can see, B128000 is not defined, so this means that it is not supported by the system.
This is why you do not have any debug message when you pass 1280000 as a value.
The only option you have is to modify the driver to use a different way to extract the values (not using the table), or, a better way, to add a private ioctl to send the appropriate configuration command to the chip.
I am sorry but these are the only options you have.
And, of course, change the application requirements and change the nonstandard baudrate on the board to use a more standard baudrate (this should be the correct solution - why you choosed 128000?)
Hope that helps.
0
 
StarDusterIIAuthor Commented:
HappyCactus, that's pretty amazing work!!  Not necessarily the answer I wanted to hear, but does seem to tell the story!  ;-)

Talking to the manufactuer of the remote about the rates.  128000 was supported because the wireless remote transmits audio and needs at least 128000.  The CP2102 chip we're using supports it so that's what was used.  I noticed that in cp210x.c it supports 153600 but looking at the tables in tty_ioctl.c it references B150000 so I'm guessing I'd have the same problem using 153600 or 150000!  

I'm on the road right now and need to run but I want to look at this further.  Thanks again for the great investigation!
0
 
StarDusterIIAuthor Commented:
I wish I could give both these guys 500 points they worked so hard to find a solution.  We never got the baud rate set but I sure got an education!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.