# Linux compat/drivers



## devilro (Jan 9, 2012)

Hello.

  I had an old server that I installed with one temperature sensor and one humidity sensor, and they were connected on the parallel port, with the sensor I also purchased a Linux program that was acting as a daemon and sending information and stuff on request, everything was ok for two years. Now we replaced the server with a new powerful i7, but the motherboard didn't come with a parallel port, like all the new ones, so I purchased an add-on parallel port card PCI Parallel Gembird LPC, installed it and all was ok, freebsd FreeBSD detected it, added the stuff in /dev , lpt0, lpt0.ctl, ppi0.

Started the daemon for the sensors, and it didn't work, it tries to connect 0x378, but the address for the board is 0xd250 (not 0x378 like the one on the other server). Disused with the company I purchased the software from, and they sent me the same stuff but with using ioctl (remember both softwares are used in linux compatibility mode), after I symlinked /dev/lp0 -> /dev/ppi0 but with this version I get: 


```
linux: pid 42593 (pcmeasure): ioctl fd=4, cmd=0x60b ('\^F',11) is not implemented
```

I have no clue how to make this work, or if I could find an add-on card that has the physical address 0x378 so I can use the old version or daemon, and I really don't want to not use the sensors any more.


```
#cat /var/run/dmesg.boot | grep -i ppc
ppc1: <NetMos NM9805 1284 Printer port> port 0xd250-0xd257,0xd240-0xd247,0xd230-0xd237,
0xd220-0xd227,0xd210-0xd217,0xd200-0xd20f irq 19 at device 0.0 on pci9
ppc1: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode
ppc1: [ITHREAD]
ppbus0: <Parallel port bus> on ppc1
ppc0: cannot reserve I/O port range
ppc1: <NetMos NM9805 1284 Printer port> port 0xd250-0xd257,0xd240-0xd247,0xd230-0xd237,
0xd220-0xd227,0xd210-0xd217,0xd200-0xd20f irq 19 at device 0.0 on pci9
ppc1: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode
ppc1: [ITHREAD]
ppbus0: <Parallel port bus> on ppc1
ppc0: cannot reserve I/O port range
```
FreeBSD 8.2-RELEASE
generic kernel

Thanks for your time, and sorry for my English.


----------



## wblock@ (Jan 10, 2012)

ppc1 kind of implies that there is a parallel port on the motherboard, maybe there's a header for it.

Does the card have jumpers to configure its address?  Or maybe a fancy one has a firmware configuration.  But why isn't the software configurable to any given port address?

Check the BIOS for options about the port addresses.  The error messages look like something is interfering.


----------



## devilro (Jan 10, 2012)

```
dmesg rest
ppbus0: <Parallel port bus> on ppc1
ppbus0: IEEE1284 device found /PS2/ECP/ECP_RLE/EPP
ppbus0: Probing for PnP devices:
ppbus0: <unknown unknown>
plip0: <PLIP network interface> on ppbus0
plip0: [ITHREAD]
lpt0: <Printer> on ppbus0
lpt0: [ITHREAD]
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
```

You could say that if this is ppc1, there must be something else on ppc0 but it's not.


```
ppc0: cannot reserve I/O port range
```

And no there are no jumpers to configure its address. The software allows me to configure in the conf file part of the address in the case of 0x378, it allows me to specify iface=$378, and it worked on the old server. I tried to specify iface=$d250, as it appears in dmesg, with no result.

The error I believe is that the linux kernel module dose not support the ioctl commands it requests (it is linux binary). The ioctl commands it uses are LPGETSTATUS, LP_PBUSY, LP_PACK, LP_POUTPA, LP_PSELECD.

I don't believe it's a fancy add-on card because it costs 12 Euro. And why would BIOS be able the change the port address for the add-on card?

All the informations that are to be found can be found here: http://gembird.be/Repository/3246/LPC-1_driver---d0ca54d4-014b-45c6-91a2-efd0dbe1c400.zip and there is not too well documented stuff.


----------

