Release Notes for HiSax 1.5

Supported kernels :
>=2.0.26, also lower version may be work with restrictions.

HiSax_1.5.patch_for_2.0 is a linux kernel patch (against 2.0.27)

Because of problems in the the 2.1 series outside HiSax, there is no
patch for 2.1 yet. Up to 2.1.14 you can use the diff.

HiSax1.4_1.5.diff is a update for HiSax 1.4 users. It supports also
older kernels as 2.0.26 with HiSax 1.4 installed.

After patching you have to run make config (or menuconfig) and have a look 
at the new isdn options, please don't forget a make dep.

Quick install example:
cd /usr/src/linux
zcat /tmp/HiSax_1.5.patch_for_2.0.gz |patch -p1 >& /tmp/patch.log

For more informations see README.HiSax.

Supported Cards

Teles 8.0/16.0/16.3 (also PnP) and compatible
Creatix PnP 
AVM A1 (Fritz)
ELSA Microlink PCC-8 (not confirmed yet) 
ELSA Microlink PCC-16
ELSA Microlink PCF
ELSA Microlink PCF/pro
* Note PCF, PCF/Pro only the ISDN part is supported yet

Features (compared to teles)

hardware access and IRQ checking
autoprobing (ELSA only)
no hang with X75 -> HDLC calls
X75 calls from AVM/Windows works
correct Alerting
fixes in layer2 protocols
more card types
Tei remove support (important for some local exchanges, which are resetting
the S0 bus) 

Changes to 1.4
Teles 16.3 PnP works now
Fixed a bug with callback which was inserted in 1.4
Handling of TEI remove (Thanks to Sim Yskes)
Elsa PCC 8 fix (not confirmed to work)
some minor changes
 
Changes to 1.3
Elsa PCC 8 should work now (I don't have a card for verify)
l3dss1.c correct calling number without octet 3a

Many fixes for layer 2/3 came from Pekka Sarnila (Thanks again!), 
here his original notes:
isdnl1.c/h:	LAPD frames debug added
		(really usefull for watching the dance of i4l and LE on l2)

isdnl2.c:	Q.921 (LAPD) statemachine fixex:
		- C/R and F/P flag inaccurasies fixed
		  (caused serious hickups for my LE)
		  (was partially fixed in 1.3, but still hickups)
		- added and fixed some error recovery precedures
		- added I COMMAND receiving for state 8
		  (lack of it caused loss off Q.931 messages)
		- added DL_DATA for state 8
		- added PH_REQUEST_PULL to 8 -> 7 transitions for cases when
		  ACK_PULL or DL_DATA occurs while in state 8.
		- added mnemonics for LAPD frames (in isdnl2.h)

		added isdnl2.h


callc.c		state transition from IN and IN_W by DLRL (r3_1) started to
		release D channel (and went to state REL_W), while DLRL is
		the signal to inform of	the completion of the of the release
		of D channel. (should be checked for other states as well)
		(while still sending ALERTING for any incoming calls,
		this would leave the callc in state REL_W and further calls
		wouldn't go through). Changed to go straight to NULL (and
		not try to release D channel).
		(was partially fixed in 1.3, but still tryed to release D)

		Problem (serious):
		RELEASE COMPLETED message not send if transmitter busy
		(often is because sendig RR response for I (RELEASE) message);
		causes LE to try to reconnect (<- SABME)
		(This seems to be also a bug in the Q.921 recommendation:
		There is no way for leyer 3 to know if the RELEASE COMPLETE
		has been succesfully sent when it issues DL_RELEASE. If the
		Layer 2 receives DL_RELEASE while I(RELEASE COMPLETE) is still
		in I QUEUE it will be descarded. This is exactly what happens
		in isdn4linux (as it is now). However at least my LE doesn't
		like this: after the multible frame operation termination
		procedures have been completed it is still missing the
		RELEASE COMPLETE and obviously thinks that mfo was terminated
		accidentaly and tryes to reestablish it by sending SABME.
		This cuses the mfo to be established but since layer 3 has
		closed nothing happens and mfo is terminater again this time
		for good. Conclution: obviously what is needed is the way for
		layer 3 to know when sending of RELEASE COMPLETE has been
		succesfull e.i. when the I(RELEASE COMPLETE) frame has been
		acknowledged before it issues DL_RELEASE (or at least use a
		timer to wait for a while). It must thus be added to
		implementations.)
		Cause:
		There is a bug in the state machine: when the transmitter is
		busy the message is put to queue. However it immediatly
		starts to release D channel ie. goes to state LC_RELEASE_WAIT,
		L2 goes to state L2_6 (and on to L2_4) and then when the
		transmitter is free and signals ACK_PULL L2 doesn't'
		do anything (it couldn't anyway because mfo has been
		released).
		Fix:
		Now after sending RELEASE COMPLETE callc will issue FLUSH
		to LC manager which goes to FLUSH_WAIT and passes it on to L2
		which sets a flag. When sending the message has been completed
		L2 signals DL_FLUSH to LC which after delay will then issue
		DL_RELESE. From that on everything goes as before. In the
		case of my LE it is necessary to wait at least till
		acknowledgement (RR) for I(RELEASE COMPLETE) has been reseived
		from LE plus 30 ms before we could send DISC (otherwise it
		would start to send SABME after releasing mfo). So every time
		when (in L2_7 or L2_8) we receive RR response we check the
		flag. If it's set (and the send queue is empty) we signal
		DL_FLUSH to LC. Must admit it ain't very pretty but it works.
		Of my opinion it would be better to change the whole system
		so that LL doesn't need to know anything about the D channel
		(ie. should be transparent). Callc would open it when needed,
		keep a flag telling if it's open so it would not be necessary
		to immediatly close it but we could keep it open let say for
		5 s after the hanging up an interface. That would leave good
		time for RELEASE COMPLETE to be sent and acknowledged without
		preventing a new connection to be started on the same
		interface immediatly.

		added debug control for lc dlc and tei Fsm debug.

		break was missing from IOCTL case 12, returned EINVAL. Added.

tei.c		in debug string cardnumber -> cardnumber+1.

l3dss1.c:	When hanging up in state IN (L3 in 6) (rejecting the incoming
callc.c:	call) DISCONNECT is sent. This is against Q.931. Instead
		RELEASE COMPLETE whith apropriate cause must be sent. Fixed
		so that callc will send REJECT_REQ instead of DISCONNECT_REQ.
		Also added to l3dss1 reaction to REJECT_REQ when in state 6:
		RELESE COMPLETE is sent, RELEASE_IND is signaled to callc.
		Setting the cause is still missing, should get it from LL.
		(Some implementations behave differently depending the cuase
		coming from remote: e.g. only if busy try again )
		(was fixed in 1.3, but used DISCONNECT_REQ; although using
		REJECT_REQ is at the moment somewhat redundant REJECT_REQ
		is per Q.931 and makes it conseptually clearer (self
		documenting code) and better for future develpment)



Changes to 1.2
Support for ELSA PCC 8 bit PCF/Pro
more X75 fixes
some cosmetic changes
one more state machine hang workaround


Changes to 1.1
alerting for ringing devices
callback reject call conform Q.931 (DSS1)
fixed 2 blockings in state machine
fixed incomming calls are only delivered, if channel == B-channel
fixed X.75 answer of SABM response address (Thanks to Sven Sunder and Martin
      Maurer)
some cosmetic changes
LOCK/UNLOCK debugging by default disabled


Known Bugs
(*** marked are not new,and also in the teles driver)

*** l3 State machine is not fully conform to Q.931
*** X.75 problems with zmodem
*** wrong LOCK/UNLOCK with callback
channel not open: during establishing or disconnecting a connection this
    message may be happen,because of delays (this is harmless).
    If a call is established this message should not happend.


ToDo

leased line support
more documentation, entries in the setup help file
fixing statemachines
l3 timers
full DSS1 implementation
full 1TR6 implementation
fixing X75
improve card checking/autoprobing
real PnP for PnP cards
optimise code
other l3 protocols
