# Moxa 8 port PCI multiport Serial card



## dclarkjr1122 (Nov 22, 2009)

All, New to Freebsd so please forgive me if I sound like I have no idea what I am talking about. I have an 8 port Moxa serial card and I cannot see to get it to work. I have compiled a custom Kernel to add the line ptions COM_MULTIPORT. That didn't seem to help. Just to get started I have included the output on the card from pciconf -lv.


```
none3@pci0:4:1:0:	class=0x070080 card=0x00000000 chip=0x16801393 rev=0x01 hdr=0x00
    vendor     = 'Moxa Technologies Co Ltd'
    device     = 'C168H/PCI Smartio'
    class      = simple comms
    subclass   = UART
```
For all I know this card could be working and I need to create tty's for it. Appreciate your help


----------



## varda (Nov 24, 2009)

You need to enable puc(4) driver either in kernel or by kldload. Try both ways until it links with uart(4). Then ports will be available as /dev/ttyu? and /dev/cuau?


----------



## dclarkjr1122 (Nov 25, 2009)

varda, thanks for the tip. I tried via kldload and in /var/log/messages it stated that it found the Moxa card but I didn't have any devices in /dev/ttyu* or /dev/cuau*. I have edited my kernel and recompiling tonight and will let you know the status once it is built and loaded.
Thanks again


----------



## dclarkjr1122 (Nov 25, 2009)

verda, thanks for the help. Having the driver load in the kernel was the solution.
Thanks again


----------



## varda (Nov 25, 2009)

In order to kldload puc device with uart support you need to find and modify line in /usr/sys/conf/files:

```
dev/uart/uart_bus_puc.c         optional        uart puc
dev/sio/sio_puc.c           optional        sio puc
```
by removing trailing 'puc' to:

```
dev/uart/uart_bus_puc.c         optional        uart
dev/sio/sio_puc.c           optional        sio
```
'sio' depends on architecture. This will include puc support in uart driver and means that uart_bus_puc now is NOT optional. Anyway since uart presents in generic kernel you need to rebuild kernel and puc module if you not included it in kernel conf.

Then you can kldload puc.

Just a hint.


----------

