# Moxa serial module driver



## j4ck (Oct 14, 2012)

Hi friends.
How can install a new hardware driver in FreeBSD?

Thanks ...


----------



## SirDice (Oct 15, 2012)

What driver?


----------



## j4ck (Oct 16, 2012)

a Moxa serial module. model is : CP-104EL-A V1.5 ...


----------



## SirDice (Oct 16, 2012)

It should already be detected. If it's not, it's not supported.


----------



## wblock@ (Oct 16, 2012)

Words are cheap.  Please use as many as necessary to explain the situation.  Did the vendor provide a driver or are you hoping to find one already in FreeBSD?  What version of FreeBSD?


----------



## kfoda (Oct 19, 2012)

j4ck said:
			
		

> a Moxa serial module. model is : CP-104EL-A V1.5 ...



Try listing devices with 

`# pciconf -vl`

The older 4 port PCI express card (CP-104EL) shows as:

```
puc0@pci0:10:0:0:       class=0x070002 card=0x10431393 chip=0x10431393 rev=0x00 hdr=0x00
    vendor     = 'Moxa Technologies Co Ltd'
    device     = 'CP104EL (4-port RS-232 Smart PCI Express)'
    class      = simple comms
    subclass   = UART
```
 /usr/src/sys/dev/puc/pucdata.c contains:

```
{   0x1393, 0x1043, 0xffff, 0,
            "Moxa Technologies, Smartio CP-104EL/PCIe",
            DEFAULT_RCLK * 8,
            PUC_PORT_4S, 0x18, 0, 8,
        },
```

Which matches the card/chip id from pciconf(8). If the id has changed, but they are using the same controller then you could just try adding a new similar block of code to /usr/src/sys/dev/puc/pucdata.c with the new id, then rebuild new kernel (puc(4) is device in GENERIC).

If it uses a new controller then you are probably out of luck.


Cheers,


----------

