EIB Linux Kernel Driver
EIB Linux Kernel Driver
There are two kernel driver for linux to connect to the EIB bus:
BCU1 driver: is uses the PEI 16 protocol and has sometimes timing problems.
- TPUART driver: This is a very flexible and reliable way to connect to EIB. At the institute, we use this board, which was developed by an student.
This page contains the EIB kernel driver, which I maintain. They are based on version written by other students. They have the debugging output enabled and contain some corrections, so that that all functions I need, are working correctly. I use eibd of the BCU SDK to test these drivers. At the bottom of the page, old version are still available.
I recommend to the user mode driver of for the TPUART of eibd instead of the TPUART kernel driver. The user mode driver supports more features.
The drivers require exclusive access to the serial port. Former version accessed the port without reserving the address space. If a serial driver is also loaded, you have to issue as root:
setserial /dev/ttySx uart none
This will release the resources, which a serial driver holds on a port.
If you are using our old EIB java interface (eibprog/Eiblet EIB BusCommunicator API/Eiblet BusCommunicator demo client application), you need to apply the following patch.
- Support for multiple serial ports (the minor number determines the COM port, 0 is COM1, 1 is COM2, 2 is COM3, 3 is COM4), the default major number is 121
- All device statistic related IOCTLS work as nops
- A device can only be open by one program
- A write will return, after the write operation to the BCU is finished with the result. In non blocking mode, a write operation returns immediately.
- A write operation will be aborted after ten retries.
- The communication with the BCU only happens, while the device is open.
- eib_io and eib_port parameter are not supported any more
- As inlining can cause problems with newer GCC version (3.4 or newer), unit at a time has been turned on for the BCU 1 driver. If your
build failes, because the option -funit-at-a-time is unknown, remove the line CFLAGS+=-funit-at-a-time from the Makefile. If the compiler claims, that "inlining failed in call to time_difference", you need to add CFLAGS+=-funit-at-a-time to the Makefile.
- The drivers for the Linux 2.6 kernel have been tested with Linux 2.6.10 (Fedora Core 2 2.6.10-1.9_FC2 SMP and not SMP version).
- eib-0.2.6.3 has basic sysfs support. Using the files port and irq in /sys/bus/platform/devices/eib/eibX you can get/set the port/irq used by the open operation of the specific device. base selects the UART base freqency (changeable for high speed UARTs).
- eib-0.2.6.3.1 work from Linux 2.6.10 to Linux 2.6.15. It includes as first version an example, how to grant automatically access to all users with udev.
- eib-0.2.6.4 work from Linux 2.6.10 to Linux 2.6.16. It improves the reliabilty of the driver.
- eib-0.2.6.4.1 work from Linux 2.6.10 to Linux 2.6.17. It fixes some build problems problems.
- bcu1driver-0.2.6.4.2 work from Linux 2.6.10 to Linux 2.6.18. It fixes some build problems problems. Its package name was changed to bcu1driver. It additionally supports BCU2, if they are configured to use the BCU1 protocol.
- bcu1driver-0.2.6.4.3 work from Linux 2.6.10 to Linux 2.6.21. It fixes compile problems with Linux 2.6.19.
- bcu1driver-0.2.6.5 work from Linux 2.6.10 to Linux 2.6.24. Its a complete restructured driver.
- bcu1driver-0.2.6.5.1 work from Linux 2.6.10 to Linux 2.6.27. Its fixes compile problems with newer kernels.
- bcu1driver-0.2.6.6 work from Linux 2.6.14 to Linux 2.6.31. Its fixes compile problems with newer kernels and supports high precision timers.