Menu

Tree [ebd755] master ul_drv-1.1.2-release /
 History

HTTPS access


File Date Author Commit
 config 2024-08-04 Pavel Pisa Pavel Pisa [ebd755] uLAN driver version updated to 1.1.2
 debian 2024-08-04 Pavel Pisa Pavel Pisa [ebd755] uLAN driver version updated to 1.1.2
 lazarus 2012-04-28 Pavel Pisa Pavel Pisa [3bede9] Lazarus uLan package requires uloicom library t...
 ul_dll 2021-04-23 Petr Smolik Petr Smolik [b5eafd] ul_drv: driver and ulanclass VC2019 projects
 ul_drv 2024-08-04 Pavel Pisa Pavel Pisa [ebd755] uLAN driver version updated to 1.1.2
 ul_iss 2024-08-04 Pavel Pisa Pavel Pisa [ebd755] uLAN driver version updated to 1.1.2
 ul_lib 2022-10-29 Petr Smolik Petr Smolik [26e058] fixed seeking after reading
 utils 2023-03-28 Pavel Pisa Pavel Pisa [c35683] Proceed version update to 1.1.1.
 .gitignore 2019-01-18 Pavel Pisa Pavel Pisa [f074a1] Include shared libraries dependencies to binary...
 COPYING 2004-09-10 ppisa ppisa [f00119] Initial revision
 Makefile 2009-11-05 Pavel Pisa Pavel Pisa [62b72b] Integration fixes after uLan project splitting ...
 Makefile.omk 2006-04-07 smolik smolik [88d067] ul_lib is possible compile with ul_log staff fr...
 Makefile.rules 2024-06-27 Pavel Pisa Pavel Pisa [274c64] kernelcfg2mk: preserve quotes in LINUX_CFLAGS/K...
 Makefile.std 2004-09-10 ppisa ppisa [83b6d2] Initial import of uLan driver UL_DRV-0.6.9 sources
 README 2009-12-23 Pavel Pisa Pavel Pisa [3b1873] ul_drv: README updated for prepared release.
 README.makerules 2009-11-05 Pavel Pisa Pavel Pisa [62b72b] Integration fixes after uLan project splitting ...
 dkms.conf 2024-08-04 Pavel Pisa Pavel Pisa [ebd755] uLAN driver version updated to 1.1.2
 kernelcfg2mk 2024-06-27 Pavel Pisa Pavel Pisa [274c64] kernelcfg2mk: preserve quotes in LINUX_CFLAGS/K...
 set_new_version.sh 2024-08-04 Pavel Pisa Pavel Pisa [ebd755] uLAN driver version updated to 1.1.2
 switch2omk 2009-11-05 Pavel Pisa Pavel Pisa [62b72b] Integration fixes after uLan project splitting ...
 switch2std 2009-11-05 Pavel Pisa Pavel Pisa [62b72b] Integration fixes after uLan project splitting ...
 ul_drv.lsm 2024-08-04 Pavel Pisa Pavel Pisa [ebd755] uLAN driver version updated to 1.1.2

Read Me

== ul_drv - uLan RS-485 Communication Driver ==
[http://ulan.sourceforge.net/]
[http://freshmeat.net/projects/ul_drv/]
Copyright (C) 1999-2009 Pavel Pisa  (pisa@cmp.felk.cvut.cz)

uLan provides 9-bit message oriented communication protocol,
which is transfered over RS-485 link. Characters are transfered
same way as for RS-232 asynchronous transfer except parity
bit, which is used to distinguish between data characters
and protocol control information. Physical layer consist
of one twisted pair of leads and RS-485 transceivers.

ul_drv is Linux device driver designed to access uLan network. 
Latest versions of the ul_drv can be compiled from same 
source into Windows NT KMD (ul_drv.mak) or Windows WDM
driver for Windows 2000/XP/Vista (ul_wdm.mak).
Supported hardware:
  - OX16C954 PCI based addons cards
    They are produced by Tedia (i.e. PCI-1482U)
    and Advantech (i.e. PCI-1602)
  - Active converter dongle for standard 16C450
    RS-232 ports
  - Intel i82510 and InnovASIC P82510 based RS-485 cards
  - USB to uLan converters (i.e. U2Uv1 and U2Uv2 from PiKRON)
  - Embedded UARTs based on 16C450 register sets (i.e. LPC21xx)
  - PowerPC MPC5200 integrated UARTs
  - Virtual interface/chip support for testing without real hardware

This version of driver was compiled and tested with 
Linux 2.6.32 kernel. Header file k_compat.h should enable
compilation for 2.6.xx. Compatibility with 2.4.xx and older
kernels is kept with reasonable effort. The 2.4.xx support
is expected to be deprecated in future versions.

The default build system is based on OMK Ocera Make System
[http://rtime.felk.cvut.cz/omk/] which allows build of the
driver and utilities for Linux system (native and cross-compile),
embedded targets (i.e. LPC21xx without operating system)
and utilities and support libraries for Windows under MINGW32
environment. Driver build for Windows requires WDF or ReactOS
tool-chain.

== Linux Native Build Step by Step ==

1) Preparation

 tar -xzf ul_drv-X.Y.Z.tar.gz
 cd ul_drv-X.Y.Z
 make default-config

2) Configuration

  The driver configuration options can be defined in config.omk file.
  Set of recognized options and their default values can be found
  in config.omk-default file. Next sequence enables multiple subdevices
  per single physical interface support, self identification immediate
  reply and virtual interface support

 echo CONFIG_OC_UL_DRV_WITH_MULTI_DEV=y >>config.omk
 echo CONFIG_OC_UL_DRV_WITH_IAC=y       >>config.omk
 echo CONFIG_OC_UL_DRV_WITH_VIRTUAL=y   >>config.omk

3) Build

 make

4) Installation for Linux system native build

  Installation process requires root privileges

 MODULES_DIR="/lib/modules/$(uname -r)/misc"
 mkdir -p $MODULES_DIR
 cp -v _compiled/modules/ul_drv.ko $MODULES_DIR
 chown root:root $MODULES_DIR/ul_drv.ko
 depmod -a
 cp -v ul_drv/config/linux/10-ulan.rules /etc/udev/rules.d
 modprobe ul_drv

The device files /dev/ulan0, /dev/ulan1 etc. should be created
by udev without need for user intervention. The 10-ulan.rules
description even ensures creation of convenience
symbolic link /dev/ulan for first found port which is used
as default interface when no interface is specified during
open.

== uLan Project Build with Use of Provided Scripts ==

The scripts to download current sources, build driver
and utilities native a install driver can be found
in uLan project GIT repository

 http://ulan.git.sourceforge.net/git/gitweb.cgi

Next sequence to obtain and run these scripts can be used

 ULAN_SRIPTS="http://ulan.git.sourceforge.net/git/gitweb.cgi?p=ulan/ulan;a=blob_plain;f=scripts"
 wget $ULAN_SRIPTS/get-git-ulan        -O get-git-ulan
 wget $ULAN_SRIPTS/build-ulan-host     -O build-ulan-host
 wget $ULAN_SRIPTS/build-ulan-embedded -O build-ulan-embedded
 wget $ULAN_SRIPTS/install-ul_drv      -O install-ul_drv
 chmod +x get-git-ulan build-ulan-host build-ulan-embedded install-ul_drv
 ./get-git-ulan 
 ./build-ulan-host
 sudo ./install-ul_drv
 sudo modprobe ul_drv

== Driver Runtime Options ==

There no need for any options for basic PCI and USB hardware setup.

The setup for ISA based cards or motherboard integrated 16C450
based UARTs with RS-485 converter dongle is more complicated.
Driver can control up to nine devices, but does not check for
ISA devices  after "insmod ul_drv" by default.
Because of driver controls same hardware as Linux serial
driver, it is necessary to disable default kernel driver
for same port in case of conflict. It can be done for example
by

 setserial /dev/ttyS2 uart none

Port numbers and others parameters can be defined by module 
parameters. To access driver from programs special character
device files must be created if udev is not used.

 mknod /dev/ulan0 c 248 0
 mknod /dev/ulan1 c 248 1
 ln -sf /dev/ulan0 /dev/ulan

"/dev/ulan" is default name for client programs.
Major number 248 is in experimental range and will
be changed in future. Number is defined in ul_hdep.h.
If defined as zero, dynamic number is assigned after insmod.

ul_drv module parameters

  port=<iop>{,<iop> ...}
	up to four IO port numbers separated by comas
        for up to four uLan devices

  irq=<int>{,<int> ...}
	select for every defined device corresponding
	IRQ number. Value 0 means auto-probe.

  baud=<spd>{,<spd> ...}
	defines transfer baud-rate for every device
	default value is 9600

  my_adr=<adr>{,<adr> ...}
	address of every computer interface as seen
	from uLan network 
	range is from 1 to 64
	default value is 2 for all interfaces

  chip=<chip_type>{,<chip_type> ...}
        the known types are: auto, 82510, 16450, 16950-pci, virtual

Bellow are example parameters for dongle converter plugged
to regular COM2 port.

    setserial /dev/ttyS1 uart none
    insmod ul_drv port=0x2f8 irq=3 baud=9600 my_adr=2

Add next lines to /etc/modprobe.d/ulan enable to define
parameters for subsequent module loading

 echo >/etc/modprobe.d/ulan options ul_drv port=0x2f8 irq=3 baud=9600 my_adr=2

Next example loads module and creates two virtual uLan interfaces

 modprobe ul_drv chip=virual,virtual