You are not logged in.

#1 2017-08-27 09:05:19

dakoellis
Member
Registered: 2013-03-15
Posts: 22

Problems getting SD-PCI15039 PCI Serial card working

I've been banging my head against the wall for a while now trying to get this card working on my system.  It's a PCI Serial card that has 2 ports on it, but I can't get the computer to recognize the device plugged into the other end (Insteon 2413S PLM).  I know the PLM is working from the cable out, but I'm not sure what the issue is on the computer side. 

Here's some outputs I've been looking at on the comptuer:

❯ lspci -vv | grep -i serial
05:03.0 Serial controller: Device 1c00:2273 (rev 0f) (prog-if 02 [16550])
	Kernel driver in use: serial

❯ dmesg | grep -i tty
[    0.000000] console [tty0] enabled
[    1.404373] 0000:05:03.0: ttyS0 at I/O 0xbf00 (irq = 18, base_baud = 115200) is a XScale
[    1.404499] 0000:05:03.0: ttyS1 at I/O 0xbe00 (irq = 18, base_baud = 115200) is a XScale

❯ sudo cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:XScale port:0000BF00 irq:18 tx:0 rx:0
1: uart:XScale port:0000BE00 irq:18 tx:0 rx:0
2: uart:unknown port:000003E8 irq:4
3: uart:unknown port:000002E8 irq:3

❯ setserial -g /dev/ttyS*   
/dev/ttyS0, UART: undefined, Port: 0xbf00, IRQ: 18
/dev/ttyS1, UART: undefined, Port: 0xbe00, IRQ: 18
/dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4
/dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3

I next tried to install the driver that came on the CD, thinking maybe the drivers built in don't work for it, but I'm getting an error during compilation:

❯ make
cd driver;\
make
make[1]: Entering directory '/home/foo/serialcd/WCH/CH38x/Linux/driver'
gcc -c -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -I/lib/modules/4.12.8-2-ARCH/build/include -ffixed-8 -D__SMP__ wch_main.c
Assembler messages:
Fatal error: can't create wch_main.o: Permission denied
In file included from /lib/modules/4.12.8-2-ARCH/build/include/asm/bug.h:15:0,
                 from /lib/modules/4.12.8-2-ARCH/build/include/linux/bug.h:4,
                 from /lib/modules/4.12.8-2-ARCH/build/include/linux/signal.h:4,
                 from wch_common.h:41,
                 from wch_main.c:37:
/lib/modules/4.12.8-2-ARCH/build/include/linux/kernel.h:419:5: warning: conflicting types for built-in function ‘snprintf’ [-Wbuiltin-declaration-mismatch]
 int snprintf(char *buf, size_t size, const char *fmt, ...);
     ^~~~~~~~
/lib/modules/4.12.8-2-ARCH/build/include/linux/kernel.h:421:5: warning: conflicting types for built-in function ‘vsnprintf’ [-Wbuiltin-declaration-mismatch]
 int vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
     ^~~~~~~~~
In file included from /lib/modules/4.12.8-2-ARCH/build/include/linux/signal.h:14:0,
                 from wch_common.h:41,
                 from wch_main.c:37:
/lib/modules/4.12.8-2-ARCH/build/include/linux/string.h:24:15: warning: conflicting types for built-in function ‘strncpy’ [-Wbuiltin-declaration-mismatch]
 extern char * strncpy(char *,const char *, __kernel_size_t);
               ^~~~~~~
/lib/modules/4.12.8-2-ARCH/build/include/linux/string.h:36:15: warning: conflicting types for built-in function ‘strncat’ [-Wbuiltin-declaration-mismatch]
 extern char * strncat(char *, const char *, __kernel_size_t);
               ^~~~~~~
/lib/modules/4.12.8-2-ARCH/build/include/linux/string.h:45:12: warning: conflicting types for built-in function ‘strncmp’ [-Wbuiltin-declaration-mismatch]
 extern int strncmp(const char *,const char *,__kernel_size_t);
            ^~~~~~~
/lib/modules/4.12.8-2-ARCH/build/include/linux/string.h:51:12: warning: conflicting types for built-in function ‘strncasecmp’ [-Wbuiltin-declaration-mismatch]
 extern int strncasecmp(const char *s1, const char *s2, size_t n);
            ^~~~~~~~~~~
/lib/modules/4.12.8-2-ARCH/build/include/linux/string.h:81:24: warning: conflicting types for built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch]
 extern __kernel_size_t strlen(const char *);
                        ^~~~~~
/lib/modules/4.12.8-2-ARCH/build/include/linux/string.h:93:24: warning: conflicting types for built-in function ‘strspn’ [-Wbuiltin-declaration-mismatch]
 extern __kernel_size_t strspn(const char *,const char *);
                        ^~~~~~
/lib/modules/4.12.8-2-ARCH/build/include/linux/string.h:96:24: warning: conflicting types for built-in function ‘strcspn’ [-Wbuiltin-declaration-mismatch]
 extern __kernel_size_t strcspn(const char *,const char *);
                        ^~~~~~~
/lib/modules/4.12.8-2-ARCH/build/include/linux/string.h:100:15: warning: conflicting types for built-in function ‘memset’ [-Wbuiltin-declaration-mismatch]
 extern void * memset(void *,int,__kernel_size_t);
               ^~~~~~
/lib/modules/4.12.8-2-ARCH/build/include/linux/string.h:103:15: warning: conflicting types for built-in function ‘memcpy’ [-Wbuiltin-declaration-mismatch]
 extern void * memcpy(void *,const void *,__kernel_size_t);
               ^~~~~~
/lib/modules/4.12.8-2-ARCH/build/include/linux/string.h:106:15: warning: conflicting types for built-in function ‘memmove’ [-Wbuiltin-declaration-mismatch]
 extern void * memmove(void *,const void *,__kernel_size_t);
               ^~~~~~~
/lib/modules/4.12.8-2-ARCH/build/include/linux/string.h:112:12: warning: conflicting types for built-in function ‘memcmp’ [-Wbuiltin-declaration-mismatch]
 extern int memcmp(const void *,const void *,__kernel_size_t);
            ^~~~~~
/lib/modules/4.12.8-2-ARCH/build/include/linux/string.h:115:15: warning: conflicting types for built-in function ‘memchr’ [-Wbuiltin-declaration-mismatch]
 extern void * memchr(const void *,int,__kernel_size_t);
               ^~~~~~
In file included from /lib/modules/4.12.8-2-ARCH/build/include/asm/preempt.h:4:0,
                 from /lib/modules/4.12.8-2-ARCH/build/include/linux/preempt.h:80,
                 from /lib/modules/4.12.8-2-ARCH/build/include/linux/spinlock.h:50,
                 from /lib/modules/4.12.8-2-ARCH/build/include/linux/wait.h:8,
                 from /lib/modules/4.12.8-2-ARCH/build/include/linux/fs.h:5,
                 from /lib/modules/4.12.8-2-ARCH/build/include/linux/tty.h:4,
                 from wch_common.h:42,
                 from wch_main.c:37:
/lib/modules/4.12.8-2-ARCH/build/include/linux/thread_info.h:37:10: fatal error: asm/thread_info.h: No such file or directory
 #include <asm/thread_info.h>
          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:90: wch_main.o] Error 2
make[1]: Leaving directory '/home/foo/serialcd/WCH/CH38x/Linux/driver'
make: *** [Makefile:10: driver_make] Error 2

However, I have linux-headers installed and an asm/thread_info.h exists:

❯ find /lib/modules/4.12.8-2-ARCH -name thread_info.h
/lib/modules/4.12.8-2-ARCH/build/arch/x86/include/asm/thread_info.h
/lib/modules/4.12.8-2-ARCH/build/include/linux/thread_info.h

I can't think of anything else to try, so I was hoping one of the experts here can help me out.  Thanks!

Last edited by dakoellis (2017-08-27 09:06:26)

Offline

#2 2017-08-27 11:22:00

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Problems getting SD-PCI15039 PCI Serial card working

With a serial connection your computer doesn't "recognize" whatever is connected at the other end, you configure the connection parameters (both sides must match) and then you need to have a program that needs to know how to communicate with the hardware on the other end.

That said, I would start by checking the card and kernel driver on the computer are working properly, build a loopback cable/plug and check if at least tx-rx loop back works, even better would be to also test the other pins to confirm they are working, as they may be needed if you are using hardware flow control. After that double check the serial port configuration and make sure it the same on both ends.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB