[SOLVED] problem building a serial port card driver

hi there,
i have a little problem.

i recently purchased a pcie card with 2 serial ports (i need them to program an eeprom).
in windows everything it's fine.
now, i'm trying to install it's driver in manjaro, (yes, it does provide linux driver), but when i try to build the software that's what my system says:

[diego@diego-pc ~]$ cd /home/diego/Scaricati/Archive/CH38XDRV/DRV_2S/LINUX/driver 
[diego@diego-pc driver]$ make
make: *** Nessun obiettivo.  Arresto.

i'm italian and this complicates things...
i think in english it should sound like

No targets specified.  Stop.

this is the driver directory content:

[diego@diego-pc driver]$ ls
Makefile  wch_common.h  wch_devtable.c  wch_main.c  wch_serial.c

what am i missing? i'm quite sure that's a stupid problem...
thank you in advance for your time!

ps. don't know if it can help, but i'll just post it:

[diego@diego-pc ~]$ inxi -Fxz
System:
  Host: diego-pc Kernel: 4.19.56-1-MANJARO x86_64 bits: 64 compiler: gcc 
  v: 9.1.0 Desktop: KDE Plasma 5.16.2 Distro: Manjaro Linux 
Machine:
  Type: Desktop Mobo: MSI model: Z97 GAMING 5 (MS-7917) v: 1.0 
  serial: <filter> UEFI: American Megatrends v: 1.12 date: 08/11/2015 
CPU:
  Topology: Quad Core model: Intel Core i7-4790K bits: 64 type: MT MCP 
  arch: Haswell rev: 3 L2 cache: 8192 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx 
  bogomips: 64022 
  Speed: 2300 MHz min/max: 800/4400 MHz Core speeds (MHz): 1: 2300 
  2: 2299 3: 2301 4: 2300 5: 2303 6: 2304 7: 2305 8: 2303 
Graphics:
  Device-1: NVIDIA GM204 [GeForce GTX 970] vendor: ZOTAC driver: nvidia 
  v: 430.26 bus ID: 01:00.0 
  Display: x11 server: X.Org 1.20.5 driver: nvidia 
  resolution: 1920x1080~60Hz 
  OpenGL: renderer: GeForce GTX 970/PCIe/SSE2 v: 4.6.0 NVIDIA 430.26 
  direct render: Yes 
Audio:
  Device-1: Intel 9 Series Family HD Audio vendor: Micro-Star MSI 
  driver: snd_hda_intel v: kernel bus ID: 00:1b.0 
  Device-2: NVIDIA GM204 High Definition Audio vendor: ZOTAC 
  driver: snd_hda_intel v: kernel bus ID: 01:00.1 
  Sound Server: ALSA v: k4.19.56-1-MANJARO 
Network:
  Device-1: Qualcomm Atheros Killer E220x Gigabit Ethernet 
  vendor: Micro-Star MSI driver: alx v: kernel port: d000 bus ID: 03:00.0 
  IF: enp3s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
Drives:
  Local Storage: total: 938.73 GiB used: 16.36 GiB (1.7%) 
  ID-1: /dev/sda vendor: Seagate model: ST1000LM014-1EJ164 
  size: 931.51 GiB 
  ID-2: /dev/sdb type: USB vendor: Kingston model: DataTraveler 2.0 
  size: 7.22 GiB 
Partition:
  ID-1: / size: 906.94 GiB used: 16.36 GiB (1.8%) fs: ext4 dev: /dev/sda2 
  ID-2: swap-1 size: 8.80 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda3 
Sensors:
  System Temperatures: cpu: 27.0 C mobo: N/A gpu: nvidia temp: 37 C 
  Fan Speeds (RPM): N/A gpu: nvidia fan: 28% 
Info:
  Processes: 218 Uptime: 1h 25m Memory: 7.74 GiB used: 1.60 GiB (20.6%) 
  Init: systemd Compilers: gcc: 9.1.0 Shell: bash v: 5.0.7 inxi: 3.0.34

Please post:

lspci -v

lsmod | sort
2 Likes

What's the brand and model?

Where did you download the driver? Without seeing the source files it's a little hard to help.

1 Like

I think this may be it:

Quite strange how you chose to share some information.
If you run the make command in the driver folder of the source, is clear that it will not find any target. Run the commands specific to make and/or sudo make install in the "root" folder of the source for linux driver...

thanks for your answers.
i'll try to share something useful:

[diego@diego-pc ~]$ lspci -v
00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06)
        Subsystem: Micro-Star International Co., Ltd. [MSI] 4th Gen Core Processor DRAM Controller
        Flags: bus master, fast devsel, latency 0
        Capabilities: <access denied>
        Kernel driver in use: hsw_uncore

00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06) (prog-if 00 [Normal decode])
        Flags: bus master, fast devsel, latency 0, IRQ 16
        Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
        I/O behind bridge: 0000e000-0000efff [size=4K]
        Memory behind bridge: f6000000-f70fffff [size=17M]
        Prefetchable memory behind bridge: 00000000e0000000-00000000f1ffffff [size=288M]
        Capabilities: <access denied>
        Kernel driver in use: pcieport

00:14.0 USB controller: Intel Corporation 9 Series Chipset Family USB xHCI Controller (prog-if 30 [XHCI])
        Subsystem: Micro-Star International Co., Ltd. [MSI] 9 Series Chipset Family USB xHCI Controller
        Flags: bus master, medium devsel, latency 0, IRQ 26
        Memory at f7300000 (64-bit, non-prefetchable) [size=64K]
        Capabilities: <access denied>
        Kernel driver in use: xhci_hcd
        Kernel modules: xhci_pci

00:16.0 Communication controller: Intel Corporation 9 Series Chipset Family ME Interface #1
        Subsystem: Micro-Star International Co., Ltd. [MSI] 9 Series Chipset Family ME Interface
        Flags: bus master, fast devsel, latency 0, IRQ 27
        Memory at f7319000 (64-bit, non-prefetchable) [size=16]
        Capabilities: <access denied>
        Kernel driver in use: mei_me
        Kernel modules: mei_me

00:1a.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #2 (prog-if 20 [EHCI])
        Subsystem: Micro-Star International Co., Ltd. [MSI] 9 Series Chipset Family USB EHCI Controller
        Flags: bus master, medium devsel, latency 0, IRQ 16
        Memory at f7317000 (32-bit, non-prefetchable) [size=1K]
        Capabilities: <access denied>
        Kernel driver in use: ehci-pci
        Kernel modules: ehci_pci

00:1b.0 Audio device: Intel Corporation 9 Series Chipset Family HD Audio Controller
        Subsystem: Micro-Star International Co., Ltd. [MSI] 9 Series Chipset Family HD Audio Controller
        Flags: bus master, fast devsel, latency 0, IRQ 28
        Memory at f7310000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: <access denied>
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel

00:1c.0 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 1 (rev d0) (prog-if 00 [Normal decode])
        Flags: bus master, fast devsel, latency 0, IRQ 16
        Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
        I/O behind bridge: None
        Memory behind bridge: None
        Prefetchable memory behind bridge: None
        Capabilities: <access denied>
        Kernel driver in use: pcieport

00:1c.3 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 4 (rev d0) (prog-if 00 [Normal decode])
        Flags: bus master, fast devsel, latency 0, IRQ 19
        Bus: primary=00, secondary=03, subordinate=03, sec-latency=0
        I/O behind bridge: 0000d000-0000dfff [size=4K]
        Memory behind bridge: f7200000-f72fffff [size=1M]
        Prefetchable memory behind bridge: None
        Capabilities: <access denied>
        Kernel driver in use: pcieport

00:1c.6 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 7 (rev d0) (prog-if 00 [Normal decode])
        Flags: bus master, fast devsel, latency 0, IRQ 18
        Bus: primary=00, secondary=04, subordinate=04, sec-latency=0
        I/O behind bridge: 0000c000-0000cfff [size=4K]
        Memory behind bridge: f7100000-f71fffff [size=1M]
        Prefetchable memory behind bridge: 00000000f2100000-00000000f21fffff [size=1M]
        Capabilities: <access denied>
        Kernel driver in use: pcieport

00:1d.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #1 (prog-if 20 [EHCI])
        Subsystem: Micro-Star International Co., Ltd. [MSI] 9 Series Chipset Family USB EHCI Controller
        Flags: bus master, medium devsel, latency 0, IRQ 23
        Memory at f7316000 (32-bit, non-prefetchable) [size=1K]
        Capabilities: <access denied>
        Kernel driver in use: ehci-pci
        Kernel modules: ehci_pci

00:1f.0 ISA bridge: Intel Corporation Z97 Chipset LPC Controller
        Subsystem: Micro-Star International Co., Ltd. [MSI] Z97 Chipset LPC Controller
        Flags: bus master, medium devsel, latency 0
        Capabilities: <access denied>
        Kernel driver in use: lpc_ich
        Kernel modules: lpc_ich

00:1f.2 SATA controller: Intel Corporation 9 Series Chipset Family SATA Controller [AHCI Mode] (prog-if 01 [AHCI 1.0])
        Subsystem: Micro-Star International Co., Ltd. [MSI] 9 Series Chipset Family SATA Controller [AHCI Mode]
        Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 25
        I/O ports at f070 [size=8]
        I/O ports at f060 [size=4]
        I/O ports at f050 [size=8]
        I/O ports at f040 [size=4]
        I/O ports at f020 [size=32]
        Memory at f7315000 (32-bit, non-prefetchable) [size=2K]
        Capabilities: <access denied>
        Kernel driver in use: ahci
        Kernel modules: ahci

00:1f.3 SMBus: Intel Corporation 9 Series Chipset Family SMBus Controller
        Subsystem: Micro-Star International Co., Ltd. [MSI] 9 Series Chipset Family SMBus Controller
        Flags: medium devsel, IRQ 18
        Memory at f7314000 (64-bit, non-prefetchable) [size=256]
        I/O ports at f000 [size=32]
        Kernel driver in use: i801_smbus
        Kernel modules: i2c_i801

01:00.0 VGA compatible controller: NVIDIA Corporation GM204 [GeForce GTX 970] (rev a1) (prog-if 00 [VGA controller])
        Subsystem: ZOTAC International (MCO) Ltd. GM204 [GeForce GTX 970]
        Flags: bus master, fast devsel, latency 0, IRQ 34
        Memory at f6000000 (32-bit, non-prefetchable) [size=16M]
        Memory at e0000000 (64-bit, prefetchable) [size=256M]
        Memory at f0000000 (64-bit, prefetchable) [size=32M]
        I/O ports at e000 [size=128]
        [virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
        Capabilities: <access denied>
        Kernel driver in use: nvidia
        Kernel modules: nouveau, nvidia_drm, nvidia

01:00.1 Audio device: NVIDIA Corporation GM204 High Definition Audio Controller (rev a1)
        Subsystem: ZOTAC International (MCO) Ltd. GM204 High Definition Audio Controller
        Flags: bus master, fast devsel, latency 0, IRQ 17
        Memory at f7080000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: <access denied>
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel

03:00.0 Ethernet controller: Qualcomm Atheros Killer E220x Gigabit Ethernet Controller (rev 13)
        Subsystem: Micro-Star International Co., Ltd. [MSI] Killer E220x Gigabit Ethernet Controller
        Flags: bus master, fast devsel, latency 0, IRQ 19
        Memory at f7200000 (64-bit, non-prefetchable) [size=256K]
        I/O ports at d000 [size=128]
        Capabilities: <access denied>
        Kernel driver in use: alx
        Kernel modules: alx

04:00.0 Serial controller: Device 1c00:3253 (rev 10) (prog-if 05 [16850])
        Subsystem: Device 1c00:3253
        Flags: fast devsel, IRQ 18
        I/O ports at c000 [size=256]
        Memory at f2100000 (32-bit, prefetchable) [size=32K]
        I/O ports at c100 [size=4]
        Expansion ROM at f7100000 [disabled] [size=32K]
        Capabilities: <access denied>
        Kernel driver in use: serial

[diego@diego-pc ~]$ lsmod | sort
aesni_intel           200704  0
aes_x86_64             20480  1 aesni_intel
agpgart                49152  1 drm
ahci                   40960  3
alx                    49152  0
coretemp               16384  0
crc16                  16384  1 ext4
crc32c_generic         16384  0
crc32c_intel           24576  2
crc32_pclmul           16384  0
crct10dif_pclmul       16384  0
cryptd                 28672  3 crypto_simd,ghash_clmulni_intel,aesni_intel
crypto_simd            16384  1 aesni_intel
crypto_user            16384  0
drm                   495616  9 drm_kms_helper,nvidia_drm
drm_kms_helper        208896  1 nvidia_drm
ehci_hcd               94208  1 ehci_pci
ehci_pci               16384  0
evdev                  24576  13
ext4                  737280  1
fat                    86016  1 vfat
fb_sys_fops            16384  1 drm_kms_helper
fscrypto               32768  1 ext4
fuse                  118784  3
ghash_clmulni_intel    16384  0
glue_helper            16384  1 aesni_intel
hid                   135168  2 usbhid,hid_generic
hid_generic            16384  0
i2c_i801               32768  0
input_leds             16384  0
intel_cstate           16384  0
intel_powerclamp       16384  0
intel_rapl             24576  0
intel_rapl_perf        16384  0
intel_uncore          135168  0
ipmi_devintf           20480  0
ipmi_msghandler        65536  2 ipmi_devintf,nvidia
ip_tables              28672  0
irqbypass              16384  1 kvm
iTCO_vendor_support    16384  1 iTCO_wdt
iTCO_wdt               16384  0
jbd2                  126976  1 ext4
joydev                 24576  0
kvm                   733184  1 kvm_intel
kvm_intel             245760  0
libahci                40960  1 ahci
libata                270336  2 libahci,ahci
lpc_ich                28672  0
mac_hid                16384  0
mbcache                16384  1 ext4
mdio                   16384  1 alx
mei                   114688  1 mei_me
mei_me                 45056  0
Module                  Size  Used by
mousedev               24576  0
mxm_wmi                16384  0
nls_cp437              20480  1
nls_iso8859_1          16384  1
nvidia              18825216  723 nvidia_modeset
nvidia_drm             53248  6
nvidia_modeset       1114112  15 nvidia_drm
pcbc                   16384  0
pcc_cpufreq            16384  0
pcspkr                 16384  0
scsi_mod              253952  4 sd_mod,usb_storage,uas,libata
sd_mod                 61440  4
snd                    98304  16 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm
snd_hda_codec         151552  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
snd_hda_codec_generic    86016  1 snd_hda_codec_realtek
snd_hda_codec_hdmi     57344  1
snd_hda_codec_realtek   122880  1
snd_hda_core           94208  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
snd_hda_intel          45056  4
snd_hwdep              16384  1 snd_hda_codec
snd_pcm               131072  4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
snd_timer              36864  1 snd_pcm
soundcore              16384  1 snd
syscopyarea            16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
sysimgblt              16384  1 drm_kms_helper
uas                    28672  0
uinput                 20480  0
usbhid                 57344  0
usb_storage            73728  1 uas
vfat                   20480  1
wmi                    28672  1 mxm_wmi
x86_pkg_temp_thermal    16384  0
xhci_hcd              262144  1 xhci_pci
xhci_pci               16384  0
x_tables               45056  1 ip_tables

chinese brand: sienoc, the model number is OC-PI08-DE.
the chipset is CH382L

the driver was in the cd that came with the card..
so i have the source code, do i have to upload it to somewhere?

the "driver" folder was created by me, and it contains the source code of the driver, makefile included..

Please post a link to the source, there can be Makefile in subfolders too, but that doesn't mean is the right one to use the make command on it.

Try:

sudo modprobe serial

or

sudo modprobe serial_cs

The module is not loaded. You should not have to build this driver. It is included in the kernel.

This is the exact adapter that I posted in my above link. Please read that link.

1 Like

this is the entire driver, hope this helps https://drive.google.com/file/d/1XFYwJNcO_iiy3b7enH9U7tgbtTRG_kiN/view?usp=sharing

i already did, before posting. it didn't work.. but maybe it's just me

Please post the inputs and outputs of both of the above commands.

On troubleshooting threads you never just say "it didn't work".

No input/outputs it never happened.

1 Like

Right, but does this driver has a github page or something else where to read about and not only an archive on google drive? From the Readme inside CH38XDRV/DRV_2S/LINUX:

So, have you run:
make clean
then
make install
?

you're right, i'm sorry.. here you are:

[diego@diego-pc ~]$ sudo modprobe serial
[sudo] password di diego: 
modprobe: FATAL: Module serial not found in directory /lib/modules/4.19.56-1-MANJARO
[diego@diego-pc ~]$ sudo modprobe serial_cs
[diego@diego-pc ~]$ 

no output of the second command, an error on the first

That means the driver loaded correctly!!!

1 Like

oh i'm an idiot! i'm sorry man

1 Like

The following command will generate the configuration file required to automatically load the driver at boot time:

echo 'serial_cs' | sudo tee /etc/modules-load.d/serial_cs.conf

done. thank you so much for your help and patience!

Are your serial ports fully working now?

i think they are, but there must be some other issues with my eeprom programmer, still not working.
i'll try something else for that later.
here are my ports

[diego@diego-pc ~]$ sudo dmesg | grep tty
[    0.150130] console [tty0] enabled
[    0.678963] 00:05: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    0.679308] 0000:04:00.0: ttyS1 at I/O 0xc0c0 (irq = 18, base_baud = 115200) is a XR16850
[    0.679413] 0000:04:00.0: ttyS2 at I/O 0xc0c8 (irq = 18, base_baud = 115200) is a XR16850
[    8.168602] audit: type=1006 audit(1563349531.962:30): pid=608 uid=0 old-auid=4294967295 auid=1000 tty=(none) old-ses=4294967295 ses=1 res=1
[    8.190798] audit: type=1006 audit(1563349531.985:32): pid=613 uid=0 old-auid=4294967295 auid=1000 tty=(none) old-ses=4294967295 ses=2 res=1

ttys1 and ttys2 is what i was looking for, isn't it?

I'm not sure how you set it up, it's been like over 15 years since I've had to use my serial ports.

You need to be part of the group uucp. It took me a while to figure out for my programmer that was the issue. Once i added my user to the group i had full serial communications.

sudo usermod -a -G uucp diego

Logout and back in again and it should be good, assuming your driver issue is resolved.

1 Like